-
Notifications
You must be signed in to change notification settings - Fork 5
/
snapcraft.yaml
142 lines (129 loc) · 4.19 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: gnome-clocks
adopt-info: gnome-clocks
summary: Simple GNOME app with stopwatch, timer, and world clock support
description: |
GNOME Clocks is a simple application to show the time and date in multiple
locations and set alarms or timers. A stopwatch is also included.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict
base: core24
layout:
/usr/share/libgweather-4:
symlink: $SNAP/usr/share/libgweather-4
/usr/lib/$CRAFT_ARCH_TRIPLET/libgweather-4:
symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/libgweather-4
# Launchpad doesn't recognize these fields yet
passthrough:
license: GPL-2.0+
title: GNOME Clocks
slots:
# for GtkApplication registration
gnome-clocks:
interface: dbus
bus: session
name: org.gnome.clocks
apps:
gnome-clocks:
command: usr/bin/gnome-clocks
extensions: [ gnome ]
plugs:
- audio-playback
desktop: usr/share/applications/org.gnome.clocks.desktop
parts:
buildenv:
plugin: nil
build-environment: &buildenv
- PATH: $CRAFT_STAGE/usr/bin:$PATH
- ACLOCAL_PATH: $CRAFT_STAGE/usr/share/aclocal
- XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/usr/share:$XDG_DATA_DIRS
- LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/vala-0.54:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET:$LD_LIBRARY_PATH
- GDK_PIXBUF_MODULE_FILE: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/gdk-pixbuf-2.0/2.10.0/loaders.cache
- PKG_CONFIG_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig:$CRAFT_STAGE/usr/lib/pkgconfig:$CRAFT_STAGE/usr/share/pkgconfig:$PKG_CONFIG_PATH
libgeocode:
source: https://gitlab.gnome.org/GNOME/geocode-glib.git
source-tag: '3.26.4'
source-depth: 1
# ext:updatesnap
# version-format:
# lower-than: '3.27'
# no-9x-revisions: true
plugin: meson
meson-parameters:
- --prefix=/usr
- --buildtype=release
- -Denable-installed-tests=false
- -Denable-introspection=true
- -Denable-gtk-doc=false
- -Dsoup2=true
build-packages:
- libnghttp2-dev
libgweather:
after: [ libgeocode ]
source: https://gitlab.gnome.org/GNOME/libgweather.git
source-tag: '4.1.1'
# ext:updatesnap
# version-format:
# lower-than: '4.2'
# no-9x-revisions: true
source-depth: 1
plugin: meson
meson-parameters:
- --prefix=/usr
- --buildtype=release
- -Dintrospection=true
- -Dgtk_doc=false
- -Dtests=false
- -Dsoup2=true
gnome-clocks:
after: [ libgweather ]
source: https://gitlab.gnome.org/GNOME/gnome-clocks.git
source-tag: '47.0'
# ext:updatesnap
# version-format:
# lower-than: '46'
# no-9x-revisions: true
source-depth: 1
source-type: git
plugin: meson
parse-info: [usr/share/metainfo/org.gnome.clocks.appdata.xml]
meson-parameters:
- --prefix=/usr
- --buildtype=release
build-packages:
- itstool
- gettext
- gsettings-desktop-schemas-dev
- desktop-file-utils
- appstream-util
- appstream
- libgnome-desktop-3-dev
- libgeoclue-2-dev
override-pull: |
craftctl default
craftctl set version=$(git describe --tags --abbrev=10)
build-environment: *buildenv
stage-packages:
- libgeoclue-2-0
override-build: |
craftctl default
sed -i 's|Icon=org.gnome.clocks$|Icon=${SNAP}/meta/gui/org.gnome.clocks.svg|g' $CRAFT_PART_INSTALL/usr/share/applications/org.gnome.clocks.desktop
mkdir -p $CRAFT_PART_INSTALL/meta/gui
cp $CRAFT_PART_SRC/data/icons/hicolor/scalable/apps/org.gnome.clocks.svg $CRAFT_PART_INSTALL/meta/gui/
cleanup:
after: [ gnome-clocks ]
plugin: nil
override-prime: |
set -eux
rm -rf usr/share/doc
rm -rf usr/share/man
rm -rf usr/libexec/*/installed-tests
rm -rf usr/libexec/installed-tests
rm -f usr/lib/*.la
rm -f usr/lib/*/*.la
rm -rf usr/include
rm -rf usr/lib/$CRAFT_ARCH_TRIPLET/gdk-pixbuf-2.0
rm -rf usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig
find . -type d -empty -delete
for snap in "core24" "gtk-common-themes" "gnome-46-2404"; do
cd "/snap/$snap/current" && find . -type f,l -name *.so.* -exec rm -f "$CRAFT_PRIME/{}" \;
done