-
Notifications
You must be signed in to change notification settings - Fork 10
/
snapcraft.yaml
67 lines (63 loc) · 2.03 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
name: jdim
adopt-info: jdim
license: "GPL-2.0"
confinement: strict
base: core18
grade: stable
icon: jdim.png
# https://snapcraft.io/gnome-3-34-1804
# Snap Store does not provide gnome-3-34-1804 package for i386, ppc64el and s390x
architectures:
- build-on: amd64
run-on: amd64
- build-on: arm64
run-on: arm64
- build-on: armhf
run-on: armhf
# https://snapcraft.io/blog/gnome-3-34-snapcraft-extension
parts:
jdim:
plugin: meson
source: https://github.com/JDimproved/JDim.git
source-type: git
source-branch: master
source-depth: 1
meson-parameters:
# Use dpkg-buildflags to set compiler flags instead of meson options
- --buildtype=plain
- --prefix=/
- -Dbuild_tests=disabled
- -Dcompat_cache_dir=disabled
- -Dpangolayout=enabled
build-environment:
# https://wiki.debian.org/Hardening
# Use -isystem to suppress compiler warning:
# /snap/gnome-3-34-1804-sdk/current/usr/include/limits.h:124:3: warning: #include_next is a GCC extension
- CPPFLAGS: "$(dpkg-buildflags --get CPPFLAGS) -isystem /snap/gnome-3-34-1804-sdk/current/usr/include"
- CXXFLAGS: "$(dpkg-buildflags --get CXXFLAGS)"
- LDFLAGS: "$(dpkg-buildflags --get LDFLAGS)"
build-packages:
- libgnutls28-dev
- libsigc++-2.0-dev
override-build: |
set -eu
snapcraftctl build
strip -s ${SNAPCRAFT_PART_INSTALL}/bin/jdim
VER="$(${SNAPCRAFT_PART_INSTALL}/bin/jdim -V | sed -n -e '1s%^[^0-9]*\([^-]\+\)-\([^(]\+\)(git:\([0-9a-f]\+\).*$%\1-\2-\3%p')"
echo "version ${VER}"
snapcraftctl set-version "${VER}"
override-prime: |
set -eu
snapcraftctl prime
sed --in-place -e 's|^Icon=.*|Icon=\${SNAP}/share/icons/hicolor/48x48/apps/jdim.png|' \
${SNAPCRAFT_PRIME}/share/applications/jdim.desktop
parse-info: [jdim.metainfo.xml]
apps:
jdim:
command: bin/jdim
common-id: com.github.jdimproved.jdim
desktop: share/applications/jdim.desktop
extensions: [gnome-3-34]
plugs:
- home
- network