Skip to content

Commit

Permalink
snap: update for core24 (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyaDghosh authored Jul 10, 2024
1 parent ab9bd94 commit e3c1ee9
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 16 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/snap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ jobs:
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
- name: Use source from current branch
run: |
sed -i 's/source:.*/source: ./g' snap/snapcraft.yaml
- name: Build Test Mousam Snap
uses: snapcore/action-build@v1
id: snapcraft-build
with:
snapcraft-args: "-v"
path: build-aux
- uses: actions/upload-artifact@v4
with:
name: mousam-snap
Expand Down
60 changes: 60 additions & 0 deletions build-aux/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: mousam
adopt-info: mousam
grade: stable
confinement: strict
base: core24
platforms:
amd64:
arm64:

parts:
python-deps:
source: .
plugin: python
python-packages:
- requests==2.30.0
prime:
- -usr/bin/activate*
- -usr/bin/Activate*
- -usr/bin/pip*
- -usr/bin/python*
- -include
- -lib
- -lib64
- -share
- -pyvenv.cfg
organize:
lib/python3.12/site-packages: usr/lib/python3/dist-packages
bin: usr/bin

mousam:
source: https://github.com/amit9838/mousam.git
source-depth: 1
#source-tag: used when there will be a new release with these fixes
plugin: meson
meson-parameters: [ --prefix=/snap/mousam/current/usr ]
override-build: |
craftctl default
sed -e '1c#!/usr/bin/env python3' -i ${CRAFT_PART_INSTALL}/snap/mousam/current/usr/bin/mousam
parse-info: [ usr/share/appdata/io.github.amit9838.mousam.appdata.xml ]
organize:
snap/mousam/current: .
prime:
- -snap/mousam

slots:
mousam:
interface: dbus
bus: session
name: io.github.amit9838.mousam

apps:
mousam:
command: usr/bin/mousam
common-id: io.github.amit9838.mousam
desktop: usr/share/applications/io.github.amit9838.mousam.desktop
extensions: [ gnome ]
environment:
PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$PYTHONPATH
plugs:
- network
37 changes: 24 additions & 13 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
name: mousam
adopt-info: mousam

grade: stable
confinement: strict

base: core22
architectures:
- build-on: amd64
- build-on: arm64
- build-on: armhf
base: core24
platforms:
amd64:
arm64:

parts:
python-deps:
source: .
plugin: python
python-packages:
- requests==2.30.0
prime:
- -usr/bin/activate*
- -usr/bin/Activate*
- -usr/bin/pip*
- -usr/bin/python*
- -include
- -lib
- -lib64
- -share
- -pyvenv.cfg
organize:
lib/python3.12/site-packages: usr/lib/python3/dist-packages
bin: usr/bin

mousam:
source: https://github.com/amit9838/mousam.git
source-depth: 1
#source-tag: used when there will be a new release with these fixes
plugin: meson
meson-parameters: [ --prefix=/snap/mousam/current/usr ]
override-pull: |
craftctl default
pip install --prefix=$CRAFT_PART_INSTALL/usr requests==2.30.0
override-build: |
craftctl default
sed -e '1c#!/usr/bin/env python3' -i ${CRAFT_PART_INSTALL}/snap/mousam/current/usr/bin/mousam
parse-info: [ usr/share/appdata/io.github.amit9838.mousam.appdata.xml ]
organize:
snap/mousam/current: .
usr/local: usr
usr/lib/python3: usr/lib/python3.10
prime:
- -snap/mousam

Expand All @@ -44,6 +55,6 @@ apps:
desktop: usr/share/applications/io.github.amit9838.mousam.desktop
extensions: [ gnome ]
environment:
PYTHONPATH: $SNAP/usr/lib/python3.10/dist-packages:$PYTHONPATH
PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$PYTHONPATH
plugs:
- network

0 comments on commit e3c1ee9

Please sign in to comment.