-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
84 lines (83 loc) · 2.78 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: saber # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
adopt-info: saber
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
license: GPL-3.0
compression: lzo
icon: icon.png
donation: https://github.com/sponsors/adil192
source-code: https://github.com/adil192/saber
issues: https://github.com/adil192/saber/issues
contact: soumyadeepghosh2004@zohomail.in
architectures:
- build-on: amd64
parts:
rustup:
plugin: nil
build-packages: [wget]
build-environment:
- RUSTUP_HOME: $CRAFT_PART_INSTALL/usr/share/rust
- CARGO_HOME: $CRAFT_PART_INSTALL/usr/share/rust
- CARGO_BUILD_JOBS: $CRAFT_PARALLEL_BUILD_COUNT
override-pull: |
wget https://sh.rustup.rs -O $CRAFT_PART_SRC/rustup-init.sh
chmod +x $CRAFT_PART_SRC/rustup-init.sh
override-build: |
$CRAFT_PART_SRC/rustup-init.sh -y --no-modify-path
mkdir -p $CRAFT_PART_INSTALL/usr/bin
for i in `ls $RUSTUP_HOME/bin/`; do
ln -s ../share/rust/bin/$i $CRAFT_PART_INSTALL/usr/bin/$i
done
override-prime: |
echo 'Skip Prime'
saber:
after: [rustup]
source: https://github.com/adil192/saber.git
source-tag: v0.13.1
plugin: flutter
#build-attributes: [enable-patchelf]
build-packages:
- curl
- jq
- libjsoncpp-dev
build-snaps:
- cmake
stage-packages:
- libjsoncpp25
- zenity
build-environment:
- RUSTUP_HOME: $CRAFT_STAGE/usr/share/rust
- CARGO_HOME: $CRAFT_STAGE/usr/share/rust
- CARGO_BUILD_JOBS: $CRAFT_PARALLEL_BUILD_COUNT
override-build: |
craftctl default
mkdir -p $CRAFT_PART_INSTALL/meta/gui
mv $CRAFT_PART_SRC/flatpak/com.adilhanney.saber.desktop $CRAFT_PART_INSTALL/meta/gui/saber.desktop
mkdir $CRAFT_PART_INSTALL/metainfo
mv $CRAFT_PART_SRC/flatpak/com.adilhanney.saber.metainfo.xml $CRAFT_PART_INSTALL/metainfo/
parse-info: [metainfo/com.adilhanney.saber.metainfo.xml]
cleanup:
after: # Make this part run last; list all your other parts here
- saber
- rustup
plugin: nil
build-snaps: # List all content-snaps and base snaps you're using here
- core22
- gnome-42-2204
- gtk-common-themes
override-prime: |
set -eux
for snap in "core22" "gnome-42-2204" "gtk-common-themes" ; do # List all content-snaps and base snaps you're using here
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
done
apps:
saber:
command: saber
desktop: meta/gui/saber.desktop
extensions: [gnome]
common-id: com.adilhanney.saber
plugs:
- home
- network
- network-status