Difference between revisions of "Create snap package"

From Lazarus wiki
(Created page with "=Create snapcraft.yaml= * Install snapcraft to your Ubuntu machine with '''sudo apt install snapcraft''' * Create '''snap''' subdirectory in your project * Execute '''snapcraf...")
 
Line 11: Line 11:
 
   Some more detailed multi-line description.
 
   Some more detailed multi-line description.
 
confinement: devmode
 
confinement: devmode
base: core18
+
base: core20
 
grade: devel
 
grade: devel
  
Line 24: Line 24:
 
     - lcl
 
     - lcl
 
     - lcl-utils
 
     - lcl-utils
 +
    override-build: |
 +
      lazbuild --build-mode=Release myapp.lpi
  
 
apps:
 
apps:
 
   myapp:
 
   myapp:
 
     command: myapp
 
     command: myapp
 +
    desktop: /usr/share/applications/myapp.desktop
 
</pre>
 
</pre>
 +
See [https://snapcraft.io/docs/snapcraft-yaml-reference Snapcraft.yaml reference] for full list of supported properties.
  
 
=Register app in snap store=
 
=Register app in snap store=

Revision as of 13:36, 24 April 2021

Create snapcraft.yaml

  • Install snapcraft to your Ubuntu machine with sudo apt install snapcraft
  • Create snap subdirectory in your project
  • Execute snapcraft init to create snap/snapcraft.yaml initial file
  • Sample file:
name: myapp
version: '1.0'
summary: Short description of package.
description: |
  Some more detailed multi-line description.
confinement: devmode
base: core20
grade: devel

parts:
  myapp:
    plugin: dump
    source: https://somehost/source/location
    source-type: subversion
    build-packages: 
    - fpc
    - lazarus
    - lcl
    - lcl-utils
    override-build: |
      lazbuild --build-mode=Release myapp.lpi

apps:
  myapp:
    command: myapp
    desktop: /usr/share/applications/myapp.desktop

See Snapcraft.yaml reference for full list of supported properties.

Register app in snap store

Setup build on Launchpad

Snap packages can be built automatically on Launchpad. Open Create snap package link form your application branch page.

See also