Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snap: update for core24 #152

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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