/
snapcraft.yaml
325 lines (307 loc) · 8.42 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
name: audacity
adopt-info: audacity
description: |
Audacity® is a free, easy-to-use, multi-track audio editor and recorder for Windows,
Mac OS X, GNU/Linux and other operating systems. The interface is translated into
many languages.
You can use Audacity to:
* Record live audio
* Convert tapes and records into digital recordings or CDs
* Edit WAV, AIFF, FLAC, MP2, MP3 or Ogg Vorbis sound files
* Cut, copy, splice or mix sounds together
* Change the speed or pitch of a recording
* Apply a wide range of other effects to audio recordings
grade: stable
confinement: strict
base: core20
compression: lzo
architectures:
- build-on: amd64
- build-on: armhf
- build-on: arm64
layout:
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib
/usr/lib/x86_64-linux-gnu/audacity:
bind: $SNAP/usr/lib/x86_64-linux-gnu/audacity
/usr/share/alsa:
bind: $SNAP/usr/share/alsa
/usr/share/audacity:
bind: $SNAP/usr/share/audacity
/usr/share/locale:
bind: $SNAP/usr/share/locale
plugs:
gtk-2-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes:gtk-2-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes:sound-themes
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes:icon-themes
environment:
GTK_PATH: $SNAP/lib/gtk-2.0
LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib
XDG_DATA_DIRS: $SNAP/data-dir:$SNAP/usr/share:$XDG_DATA_DIRS
apps:
audacity:
command: usr/bin/audacity
# extensions: [gnome-3-28]
command-chain:
- bin/desktop-launch
- snap/command-chain/alsa-launch
desktop: usr/share/applications/audacity.desktop
common-id: org.audacityteam.Audacity
plugs:
- alsa
- audio-playback
- audio-record
- desktop
- desktop-legacy
- gsettings
- home
- jack1
- network
- network-bind
- pulseaudio
- removable-media
- unity7
- wayland
- x11
parts:
desktop-gtk2:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: gtk
plugin: make
make-parameters: ["FLAVOR=gtk2"]
build-packages:
- libgtk2.0-dev
stage-packages:
- libxkbcommon0 # XKB_CONFIG_ROOT
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libatk-adaptor
- libcanberra-gtk-module
- libgail-common
- libgtk2.0-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk2.0-bin
- unity-gtk2-module
- libappindicator1
- locales-all
- ibus-gtk
- libibus-1.0-5
- appmenu-gtk2-module
engines:
plugin: nil
stage-packages:
- gtk2-engines
- gtk2-engines-pixbuf
- gtk2-engines-murrine
organize:
usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gtk-2.0: lib/gtk-2.0
stage:
- lib/gtk-2.0/*/engines/libhcengine.so
- lib/gtk-2.0/*/engines/libmurrine.so
- lib/gtk-2.0/*/engines/libpixmap.so
# Adwaita, Adwaita-dark: adwaita, pixmap
# HighContrast: hcengine
gnome-themes-extra:
plugin: autotools
source: https://gitlab.gnome.org/GNOME/gnome-themes-extra.git
source-type: git
autotools-configure-parameters:
- --enable-gtk2-engine
- --disable-gtk3-engine
build-packages:
- gnome-common
- libgtk2.0-dev
- gtk-update-icon-cache
stage:
- lib/gtk-2.0/*/engines/libadwaita.so
alsa-mixin:
plugin: dump
source: https://github.com/diddlesnaps/snapcraft-alsa.git
source-subdir: snapcraft-assets
build-packages:
- libasound2-dev
stage-packages:
- libasound2
- libasound2-plugins
- yad
audacity:
after: [alsa-mixin, desktop-gtk2]
plugin: cmake
source: https://github.com/audacity/audacity.git
parse-info: [usr/share/metainfo/audacity.appdata.xml]
override-pull: |
rm -f /usr/bin/cc /usr/bin/c++
pip3 install conan
snapcraftctl pull
VERSION=$(curl https://api.github.com/repos/audacity/audacity/releases/latest | jq -r '.tag_name')
git fetch
git checkout "$VERSION"
snapcraftctl set-version "$(echo "$VERSION" | sed -E -e "s|^$SNAPCRAFT_PROJECT_NAME-?||i")"
sed -i -E 's|Icon=.*|Icon=/usr/share/icons/hicolor/scalable/apps/audacity.svg|' src/audacity.desktop.in
sed -i -E 's|Exec=env UBUNTU_MENUPROXY=0 |Exec=|' src/audacity.desktop.in
git show -s --format="#define REV_LONG \"%H\"%n#define REV_TIME \"%cd\"%n" | tee src/RevisionIdent.h
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DAUDACITY_BUILD_LEVEL=2
- -Daudacity_conan_allow_prebuilt_binaries=Off
- -Daudacity_lib_preference=system
- -Daudacity_has_networking=Off
- -Daudacity_has_sentry_reporting=Off
- -Daudacity_has_crashreports=Off
- -Daudacity_has_updates_check=Off
- -Daudacity_use_ffmpeg=loaded
build-snaps:
- cmake
- jq
build-environment:
- PATH: /snap/bin:$PATH
- CFLAGS: -O2 -pipe
- CXXFLAGS: -O2 -pipe
build-packages:
- build-essential
- curl
- libavcodec-dev
- libavformat-dev
- libavutil-dev
- libcurl4-openssl-dev
- libexpat1-dev
- libflac-dev
- libflac++-dev
- libgstreamer-plugins-base1.0-dev
- libgstreamer-plugins-good1.0-dev
- libgstreamer1.0-dev
- libid3tag0-dev
- libjack-jackd2-dev
- libjpeg-turbo8-dev
- liblilv-dev
- lv2-dev
- libmad0-dev
- libmp3lame-dev
- libogg-dev
- libopus-dev
- libportmidi-dev
- libportsmf-dev
- libpulse-dev
- libsbsms-dev
- libserd-dev
- libsndfile1-dev
- libsord-dev
- libsoundtouch-dev
- libsoxr-dev
- libsqlite3-dev
- libsratom-dev
- libsuil-dev
- libtwolame-dev
- libvorbis-dev
- nasm
- portaudio19-dev
- python3-pip
- re2c
- uuid-dev
- vamp-plugin-sdk
- zlib1g-dev
stage-packages:
- libavcodec58
- libavformat58
- libavutil56
- libcurl4
- libdouble-conversion3
- libexpat1
- libflac8
- libflac++6v5
- libgl1
- libglvnd0
- libglx0
- libgstreamer-plugins-base1.0-0
- libgstreamer-plugins-good1.0-0
- libgstreamer1.0-0
- libid3tag0
- libjack-jackd2-0
- libjpeg-turbo8
- liblilv-0-0
- libmad0
- libmp3lame0
- libopus0
- libogg0
- libpcre2-16-0
- libportaudio2
- libportmidi0
- libportsmf0v5
- libpulse0
- libqt5core5a
- libqt5gui5
- libqt5widgets5
- libsbsms10
- libserd-0-0
- libsndfile1
- libsord-0-0
- libsoundtouch1
- libsoxr0
- libsqlite3-0
- libsratom-0-0
- libsuil-0-0
- libtwolame0
- libuuid1
- libvamp-hostsdk3v5
- libvamp-sdk2v5
- libvorbis0a
- libvorbisenc2
- zlib1g
gtk-locales:
plugin: nil
build-packages:
- apt
- dpkg
override-pull: |
set -eux
apt download "language-pack-gnome-*-base"
override-build: |
set -eux
for deb in *.deb; do dpkg-deb -x $deb .; done
find usr/share/locale-langpack -type f -not -name "gtk20*.mo" -exec rm '{}' \;
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share
cp -R usr/share/locale-langpack $SNAPCRAFT_PART_INSTALL/usr/share/
# Ship a default set of GSettings schemas so that the correct theme is used
# in Wayland sessions on Ubuntu (see https://forum.snapcraft.io/t/7806/3).
desktop-settings-packages:
after: [ desktop-gtk2 ]
plugin: nil
build-packages:
- libglib2.0-bin
stage-packages:
- gsettings-desktop-schemas
- ubuntu-settings
prime:
- usr/share/glib-2.0/schemas/*
desktop-settings-build:
plugin: nil
after: [ audacity, desktop-settings-packages ]
override-prime: |
set -eux
glib-compile-schemas usr/share/glib-2.0/schemas
cleanup:
after: [ audacity, desktop-settings-build ]
plugin: nil
build-snaps:
- core20
- gtk-common-themes
override-prime: |
set -eux
cd /snap/gtk-common-themes/current
find . -type f,l -exec rm -f $SNAPCRAFT_PRIME/usr/{} \;
mkdir $SNAPCRAFT_PRIME/data-dir