Skip to content

Commit

Permalink
Merge pull request #743 from NickvisionApps/snap
Browse files Browse the repository at this point in the history
simplified snap
  • Loading branch information
nlogozzo authored Nov 20, 2023
2 parents b053cc0 + 3a23fde commit c890b71
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: denaro
name: denaro
base: core22
adopt-info: denaro
source-code: https://github.com/nlogozzo/NickvisionMoney
issues: https://github.com/nlogozzo/NickvisionMoney/issues
donation: https://github.com/sponsors/nlogozzo
contact: https://matrix.to/#/#nickvision:matrix.org
grade: stable
confinement: strict
architectures:
Expand All @@ -13,6 +15,7 @@ architectures:
parts:
# When the snap of `blueprint-compiler` comes up, we can remove this part upto L21
blueprint-compiler:
source-depth: 1
source: https://gitlab.gnome.org/jwestman/blueprint-compiler.git
source-tag: 'v0.10.0'
plugin: meson
Expand All @@ -23,13 +26,15 @@ parts:
after: # remove this and next line too when the snap of `blueprint-compiler` comes up
- blueprint-compiler
plugin: nil
source: .
#build-environment:
# - PYTHONPATH: $CRAFT_STAGE/usr/lib/python3/dist-packages:$PYTHONPATH
# - GI_TYPELIB_PATH: /snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/girepository-1.0:/snap/gnome-42-2204-sdk/current/usr/lib/girepository-1.0
#build-snaps: # when available
#- blueprint-compiler
build-packages:
source: .
parse-info: [ usr/share/metainfo/org.nickvision.money.metainfo.xml ]
build-environment:
- DOTNET_CLI_TELEMETRY_OPTOUT: '1'
- PATH: $HOME/.dotnet:$HOME/.dotnet/tools:$HOME/.cargo/bin:$PATH
- DOTNET_ROOT: $HOME/.dotnet
- PYTHONPATH: $CRAFT_STAGE/usr/lib/python3/dist-packages:$PYTHONPATH
- GI_TYPELIB_PATH: /snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/girepository-1.0:/snap/gnome-42-2204-sdk/current/usr/lib/girepository-1.0
build-packages:
- wget
override-pull: |
craftctl default
Expand All @@ -38,10 +43,7 @@ parts:
./dotnet-install.sh --channel 8.0
patch -p1 < $CRAFT_PROJECT_DIR/snap/denaro.patch
override-build: |
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$HOME/.dotnet:$HOME/.dotnet/tools:$HOME/.cargo/bin
export PYTHONPATH=$CRAFT_STAGE/usr/lib/python3/dist-packages:$PYTHONPATH
export GI_TYPELIB_PATH=/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/girepository-1.0:/snap/gnome-42-2204-sdk/current/usr/lib/girepository-1.0
craftctl default
cd $CRAFT_PART_SRC
dotnet tool restore
dotnet cake --target=Publish --prefix=/snap/denaro/current/usr --ui=gnome --self-contained
Expand All @@ -53,7 +55,16 @@ parts:
done
organize:
snap/denaro/current: .
parse-info: [ usr/share/metainfo/org.nickvision.money.metainfo.xml ]
prime:
- -snap/current

slots:
denaro:
interface: dbus
bus: session
name: org.nickvision.denaro


apps:
denaro:
command: usr/bin/org.nickvision.money
Expand Down

0 comments on commit c890b71

Please sign in to comment.