-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsnapcraft.yaml
200 lines (188 loc) · 6.47 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: gedit
adopt-info: gedit
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict
base: core24
layout:
/usr/lib/$CRAFT_ARCH_TRIPLET/libpeas-1.0:
symlink: $SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET/libpeas-1.0
/usr/lib/$CRAFT_ARCH_TRIPLET/gedit:
symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/gedit
/usr/lib/$CRAFT_ARCH_TRIPLET/peas-demo:
symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/peas-demo
/usr/share/gedit:
symlink: $SNAP/usr/share/gedit
slots:
# for GtkApplication registration
gedit:
interface: dbus
bus: session
name: org.gnome.gedit
apps:
gedit:
command: usr/bin/gedit
extensions: [gnome]
plugs:
- avahi-observe
- cups-control
- home
- network
- mount-observe
- removable-media
common-id: org.gnome.gedit.desktop
environment:
GI_TYPELIB_PATH: $SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/gedit/girepository-1.0:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/girepository-1.0:$SNAP/gnome-platform/usr/lib/girepository-1.0:$SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET/girepository-1.0
parts:
gtksourceview:
source: https://gitlab.gnome.org/GNOME/gtksourceview.git
source-tag: '4.8.4'
# ext:updatesnap
# version-format:
# lower-than: '5'
# no-9x-revisions: true
source-depth: 1
plugin: meson
meson-parameters:
- --prefix=/usr
- --buildtype=release
build-packages:
- gettext
- libxml2-dev
- gobject-introspection
build-environment:
- PYTHONPATH: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/gobject-introspection${PYTHONPATH:+:$PYTHONPATH}
override-pull: |
set -eux
craftctl default
sed -i 's#Werror=missing-include-dirs#Wmissing-include-dirs#g' meson.build
amtk:
# ext:updatesnap
# version-format:
# allow-neither-tag-nor-branch: true
source: https://gitlab.gnome.org/World/gedit/libgedit-amtk.git
source-tag: '5.9.0'
source-depth: 1
source-type: git
# ext:updatesnap
# version-format:
# allow-neither-tag-nor-branch: true
plugin: meson
meson-parameters:
- --prefix=/usr
- -Dgtk_doc=false
gedit-gtksourceview:
# ext:updatesnap
# version-format:
# allow-neither-tag-nor-branch: true
source: https://gitlab.gnome.org/World/gedit/libgedit-gtksourceview.git
source-tag: '299.3.0'
source-depth: 1
source-type: git
plugin: meson
after: [gtksourceview]
meson-parameters:
- --prefix=/usr
- -Dgtk_doc=false
- --buildtype=release
build-environment:
- M4PATH: /snap/gnome-46-2404-sdk/current/usr/lib/glibmm-2.4
- PKG_CONFIG_PATH: $CRAFT_STAGE/usr/lib/pkgconfig:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
build-packages:
- gtk-doc-tools
- ninja-build
- meson
tepl:
after: [ gedit-gtksourceview, amtk ]
source: https://gitlab.gnome.org/World/gedit/libgedit-tepl.git
source-depth: 1
source-tag: '6.11.0'
plugin: meson
meson-parameters:
- --prefix=/usr
- -Dgtk_doc=false
gedit:
after: [ gedit-gtksourceview, amtk, tepl ]
source: https://gitlab.gnome.org/World/gedit/gedit.git
source-tag: '46.2'
source-depth: 1
source-type: git
# ext:updatesnap
# version-format:
# lower-than: '47'
# no-9x-revisions: true
parse-info: [usr/share/metainfo/org.gnome.gedit.appdata.xml]
plugin: meson
meson-parameters:
- --prefix=/usr
- --buildtype=release
- -Dvala_args="--vapidir=$CRAFT_STAGE/usr/share/vala/vapi"
build-environment:
- C_INCLUDE_PATH: $CRAFT_STAGE/usr/include/gtksourceview-4
- PYTHONPATH: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/gobject-introspection${PYTHONPATH:+:$PYTHONPATH}
#- PKG_CONFIG_PATH: $CRAFT_STAGE/usr/lib/pkgconfig:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
#- LD_LIBRARY_PATH: /snap/gnome-46-2404-sdk/current/usr/lib:/snap/gnome-46-2404-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${PKG_LIBRARY_PATH:+:$PKG_LIBRARY_PATH}
override-pull: |
craftctl default
patch -p1 < $CRAFT_PROJECT_DIR/patches/gedit.diff
override-build: |
sed -i.bak -e 's|Icon=org.gnome.gedit$|Icon=${SNAP}/meta/gui/org.gnome.gedit.svg|g' $CRAFT_PART_SRC/data/org.gnome.gedit.desktop.in
sed -i.bak -e "s|symlink_media: true|symlink_media: false|g" $CRAFT_PART_SRC/help/meson.build
craftctl default
mkdir -p $CRAFT_PART_INSTALL/meta/gui/
cp $CRAFT_PART_SRC/data/icons/org.gnome.gedit.svg $CRAFT_PART_INSTALL/meta/gui/
gedit-plugins:
after: [ gedit ]
source: https://gitlab.gnome.org/World/gedit/gedit-plugins.git
source-tag: '44.2'
# ext:updatesnap
# version-format:
# lower-than: '45'
# no-9x-revisions: true
source-depth: 1
source-type: git
plugin: meson
meson-parameters:
- --prefix=/snap/gedit/current/usr
- -Dplugin_bookmarks=true
- -Dplugin_bracketcompletion=true
- -Dplugin_charmap=true
- -Dplugin_codecomment=true
- -Dplugin_colorpicker=true
- -Dplugin_drawspaces=true
- -Dplugin_git=true
- -Dplugin_joinlines=true
- -Dplugin_multiedit=false
- -Dplugin_smartspaces=true
- -Dplugin_terminal=true
- -Dplugin_textsize=true
- -Dplugin_wordcompletion=true
- --buildtype=release
organize:
snap/gedit/current/usr: usr
build-environment:
- C_INCLUDE_PATH: $CRAFT_STAGE/usr/include:$CRAFT_STAGE/usr/include/gedit-46:$CRAFT_STAGE/usr/include/gtksourceview-4
- LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/gedit
- PKG_CONFIG_PATH: $PKG_CONFIG_PATH:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig
build-packages:
- libgit2-glib-1.0-dev
- libgucharmap-2-90-dev
- libvte-2.91-dev
libraries:
plugin: nil
stage-packages:
- libuchardet0
- libfribidi0
prime:
- usr/lib/*/libuchardet*
- usr/lib/*/libfribidi*
# Find files provided by the base and platform snap and ensure they aren't
# duplicated in this snap
cleanup:
after: [gedit-plugins, libraries]
plugin: nil
build-snaps: [core24, gtk-common-themes, gnome-46-2404]
override-prime: |
set -eux
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