Fastest way of creating Snap of already existing binary


Sorry for maybe stupid question, but what is the best and fastest way of creating snap of already existing binary?

Let’s say, I have an ./myapp, and I want create snap, which just executes this binary (which doesn’t need any special dependencies), how a snapcraft.yaml for this would look like? My suggestion is making simple build type, and overriding it with:

cp myapp prime/usr/bin/myapp

But it looks a bit clunky.

What do you think?

Use the dump plugin and the stage keyword to do this:

name: myapp
base: core20
version: '1.0'
summary: 'myapp'
description: Snap a premade binary.
grade: devel
confinement: devmode

    command: myapp

    plugin: dump
    source: .
    stage: [myapp]