forked from libretro/retroarch-snap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
404 lines (398 loc) · 11.9 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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
name: retroarch
version: "1.17.0"
title: RetroArch
summary: RetroArch is the official reference frontend for the libretro API.
description: |
The official reference frontend for the libretro API.
RetroArch provides a variety of advanced user-facing features and powerful configuration capabilities to programs that target the libretro API. While a majority of these programs are emulators for retro gaming consoles, various gaming engines and other multimedia applications are also represented. The programs, known as "cores", can be downloaded and updated directly from RetroArch's built-in Online Updater.
RetroArch defaults to a gamepad-friendly 10-foot/leanback interface that is perfect for use with living-room and home theater PCs, but there is also a more traditional keyboard-and-mouse interface available by pressing F5.
RetroArch is written in portable C and licensed GPLv3.
license: GPL-3.0
icon: snap/gui/retroarch.svg
confinement: strict
grade: stable
architectures:
- build-on: amd64
run-on: amd64
- build-on: armhf
run-on: armhf
- build-on: arm64
run-on: arm64
- build-on: ppc64el
run-on: ppc64el
base: core20
layout:
/usr/share/vulkan:
symlink: $SNAP/usr/share/vulkan
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_intel.so:
symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_intel.so
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_radeon.so:
symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_radeon.so
/usr/share/libdrm:
bind: $SNAP/usr/share/libdrm
apps:
retroarch:
command: bin/desktop-launch $SNAP/usr/bin/snapcraft-preload $SNAP/usr/local/bin/retroarch.wrapper
environment:
LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa-gl:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/xorg
plugs:
- network
- network-bind
- x11
- opengl
- home
- alsa
- audio-playback
- bluez
- joystick
- raw-usb
- removable-media
- wayland
- unity7
- desktop
- desktop-legacy
- screen-inhibit-control
- browser-support
- hardware-observe
- mount-observe
# daemon:
# command: $SNAP/usr/bin/snapcraft-preload $SNAP/usr/local/bin/daemon-start.sh $SNAP/usr/local/bin/retroarch.wrapper
# environment:
# LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa-gl:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/xorg
# daemon: simple
# restart-condition: always
# plugs:
# - network
# - network-bind
# - opengl
# - home
# - alsa
# - audio-playback
# - bluez
# - joystick
# - raw-usb
# - removable-media
# - wayland
# - unity7
# - screen-inhibit-control
parts:
snapcraft-preload:
source: https://github.com/sergiusens/snapcraft-preload.git
plugin: cmake
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr -DLIBPATH=/lib
build-packages:
- on amd64:
- gcc-multilib
- g++-multilib
stage-packages:
- on amd64:
- lib32stdc++6
retroarch-wrapper:
plugin: dump
after: [desktop-qt5]
source: .
organize:
retroarch.wrapper: usr/local/bin/retroarch.wrapper
# daemon-start.sh: usr/local/bin/daemon-start.sh
stage:
- usr/local/bin/retroarch.wrapper
# - usr/local/bin/daemon-start.sh
retroarch:
plugin: autotools
# source-type: tar
# source: https://github.com/libretro/RetroArch/archive/v1.13.0.tar.gz
source-type: git
source: https://github.com/libretro/RetroArch.git
after: [sdl2,libdecor,retroarch-wrapper]
build-environment:
- MAKEFLAGS: HAVE_BUILTINZLIB=0 HAVE_ZLIB_COMMON=1
autotools-configure-parameters:
- --enable-kms
- --enable-xvideo
- --enable-ffmpeg
- --enable-ssa
- --disable-coreaudio
- --enable-jack
- --enable-pulse
- --disable-roar
- --disable-rsound
- --disable-sdl
- --enable-sdl2
- --disable-vg
- --disable-v4l2
- --disable-xinerama
- --enable-qt
- --enable-vulkan
- --enable-discord
- --enable-dbus
stage-packages:
- libnotify-bin
- fonts-dejavu-core
- freeglut3-dev
- libasound2
- libavcodec58
- libavformat58
- libavutil56
- libdrm2
- libegl1-mesa
- libfreetype6
- libgbm1
- libgl1-mesa-dri
- libgl1-mesa-glx
- libgles2-mesa
- libjack-jackd2-0
- libminizip1
- libopenal1
- libpulse0
- libswresample3
- libswscale5
- libudev1
- libusb-1.0-0
- libwayland-client0
- libwayland-egl1-mesa
- libx11-6
- libx11-dev
- libxrandr-dev
- libxext6
- libxinerama1
- libxkbcommon0
- libxv1
- libxxf86vm1
- zlib1g
- qt5-default
- qtwayland5
- libqt5waylandclient5
- libstdc++6
- libgcc1
- liblzma5
- libbz2-1.0
- libpcre3
- libsystemd0
- libvulkan1
- libvulkan-dev
- mesa-vulkan-drivers
- libass9
- libfribidi0
- libsdl1.2debian
- libsdl-net1.2
- libbluetooth3
- libxi6
- libaio1
build-packages:
- gcc
- make
- libasound2-dev
- libass-dev
- libavcodec-dev
- libavdevice-dev
- libavformat-dev
- libdrm-dev
- libegl1-mesa-dev
- libfreetype6-dev
- libgbm-dev
- libgl1-mesa-dev
- libjack-jackd2-dev
- libpulse-dev
- libswscale-dev
- libusb-1.0-0-dev
- libudev-dev
- libx11-xcb-dev
- libxml2-dev
- libxv-dev
- mesa-common-dev
- xserver-xorg-input-all
- zlib1g-dev
- qt5-default
- libvulkan-dev
- libxxf86vm-dev
- libdbus-1-dev
override-build: |
snapcraftctl build
ln -sf ../usr/lib/libsnapcraft-preload.so $SNAPCRAFT_PART_INSTALL/lib/libsnapcraft-preload.so
retroarch-filters:
plugin: autotools
after: [retroarch]
source: https://github.com/libretro/RetroArch.git
source-type: git
override-build: |
cd libretro-common/audio/dsp_filters/ && ./configure && make && make install DESTDIR=$SNAPCRAFT_PART_INSTALL/.config/filters/audio INSTALLDIR=
cd ../../../gfx/video_filters/ && ./configure && make && make install DESTDIR=$SNAPCRAFT_PART_INSTALL/.config/filters/video INSTALLDIR=
stage:
- .config/filters/video
- .config/filters/audio
retroarch-assets:
plugin: dump
after: [retroarch-wrapper]
source: https://github.com/libretro/retroarch-assets/archive/master.tar.gz
source-type: tar
organize:
xmb: .config/assets/xmb/
glui: .config/assets/glui/
rgui: .config/assets/rgui/
ozone: .config/assets/ozone/
sounds: .config/assets/sounds/
menu_widgets: .config/assets/menu_widgets/
filesets:
assets: [.config/assets/menu_widgets/*, .config/assets/sounds/*, .config/assets/ozone/*, .config/assets/rgui/*, .config/assets/xmb/*, -.config/assets/xmb/*/src, .config/assets/glui/*.png, .config/assets/glui/*.ttf]
stage:
- -configure
- -Makefile
- $assets
prime:
- $assets
retroarch-autoconfig:
plugin: dump
after: [retroarch-assets]
source: https://github.com/libretro/retroarch-joypad-autoconfig/archive/master.tar.gz
source-type: tar
organize:
udev: .config/autoconfig/udev/
linuxraw: .config/autoconfig/linuxraw/
hid: .config/autoconfig/hid/
x: .config/autoconfig/x/
filesets:
autoconfig: [ .config/autoconfig/udev, .config/autoconfig/linuxraw, .config/autoconfig/hid, .config/autoconfig/x]
stage:
- $autoconfig
prime:
- $autoconfig
retroarch-database:
plugin: dump
after: [retroarch-autoconfig]
source: https://github.com/libretro/libretro-database/archive/master.tar.gz
source-type : tar
organize:
rdb: .config/database/rdb/
cursors: .config/database/cursors/
cht: .config/cheats/
stage:
- .config/database
- .config/cheats
retroarch-info:
plugin: dump
after: [retroarch-database]
source: https://github.com/libretro/libretro-super/archive/master.tar.gz
source-type : tar
organize:
dist/info: .config/cores/
stage:
- .config/cores
retroarch-overlays:
plugin: dump
after: [retroarch-info]
source: https://github.com/libretro/common-overlays/archive/master.tar.gz
source-type : tar
organize:
"*": .config/overlay/
stage:
- .config/overlay
retroarch-glsl-shaders:
plugin: dump
after: [retroarch-overlays]
source: https://github.com/libretro/glsl-shaders/archive/master.tar.gz
source-type : tar
organize:
"*": .config/shaders/shaders_glsl/
stage:
- .config/shaders
retroarch-slang-shaders:
plugin: dump
after: [retroarch-glsl-shaders]
source: https://github.com/libretro/slang-shaders/archive/master.tar.gz
source-type : tar
organize:
"*": .config/shaders/shaders_slang/
stage:
- .config/shaders
# Provides libdecor to implement Wayland CSD on desktop environments not using xdg-decoration (GNOME), SDL2 >= v2.0.16 adds support for libdecor
# SDL2 in focal repositories is at v2.0.10 so we need to include a newer version.
libdecor:
plugin: meson
source: https://gitlab.gnome.org/jadahl/libdecor.git
source-type: git
source-tag: "0.1.0"
meson-parameters:
- -Dprefix=/usr
- -Ddemo=false
stage-packages:
- libwayland-cursor0
- libwayland-client0
- libdbus-1-3
build-packages:
- wayland-protocols
- libwayland-dev
- libcairo2-dev
- libpango1.0-dev
sdl2:
plugin: cmake
after: [libdecor]
source: https://github.com/libsdl-org/SDL.git
source-tag: release-2.0.20
cmake-generator: Ninja
cmake-parameters:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_C_COMPILER=gcc-10
- -DCMAKE_CXX_COMPILER=g++-10
- -DLIB_INSTALL_DIR:PATH=/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
- -DSHARE_INSTALL_PREFIX:PATH=/usr/share
- -DINCLUDE_INSTALL_DIR:PATH=/usr/include
- -DSDL_PULSEAUDIO_SHARED=ON
- -DSDL_DLOPEN=ON
- -DARTS=OFF
- -DESD=OFF
- -DNAS=OFF
- -DSDL_VIDEO_KMSDRM=ON
- -DSDL_JACK_SHARED=ON
- -DSDL_PIPEWIRE_SHARED=ON
- -DSDL_ALSA=ON
- -DSDL_STATIC=ON
- -DSDL_VIDEO_VULKAN=ON
- -DSDL_LIBDECOR_SHARED=ON
- -DSDL_VIDEO_WAYLAND=ON
- -DRPATH=OFF
- -DCLOCK_GETTIME=ON
override-build: |
snapcraftctl build
rsync -a --ignore-existing $SNAPCRAFT_PART_INSTALL/ /
build-packages:
- gcc-10
- g++-10
- rsync
stage:
- -usr/include
- -usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake
# This part installs the qt5 dependencies and a `desktop-launch` script to initialise
# desktop-specific features such as fonts, themes and the XDG environment.
#
# It is copied straight from the snapcraft desktop helpers project. Please periodically
# check the source for updates and copy the changes.
# https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/snapcraft.yaml
#
desktop-qt5:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
plugin: make
after: [snapcraft-preload]
make-parameters: ["FLAVOR=qt5"]
build-packages:
- build-essential
- qtbase5-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgtk2.0-0
- libgdk-pixbuf2.0-0
- libqt5svg5 # for loading icon themes which are svg
- try: [appmenu-qt5] # not available on core18
- locales-all
- xdg-user-dirs
- fcitx-frontend-qt5