mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 16:03:24 +00:00
DISTS: Sync snapcraft build recipe
This commit is contained in:
parent
51377d84c6
commit
4ed734757e
@ -1,22 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$(id -u)" = "0" ] && [ "$(snapctl get daemon)" = "false" ]
|
||||
then
|
||||
# If not configured to run as a daemon we have to stop here
|
||||
# (There's no "snapctl disable ...")
|
||||
snapctl stop $SNAP_NAME.daemon
|
||||
exit 0
|
||||
real_xdg_runtime_dir=$(dirname "${XDG_RUNTIME_DIR}")
|
||||
real_wayland=${real_xdg_runtime_dir}/${WAYLAND_DISPLAY:-wayland-0}
|
||||
|
||||
if [ ! -O "${real_wayland}" ]; then
|
||||
# On core systems mir-kiosk may also need to create the host XDG_RUNTIME_DIR
|
||||
if [ ! -O "${real_xdg_runtime_dir}" ]; then
|
||||
echo waiting for host XDG_RUNTIME_DIR...
|
||||
until [ -O "${real_xdg_runtime_dir}" ]
|
||||
do
|
||||
inotifywait --event create $(dirname "${real_xdg_runtime_dir}") || sleep 4
|
||||
done
|
||||
fi
|
||||
|
||||
echo waiting for Wayland socket...
|
||||
until [ -O "${real_wayland}" ]
|
||||
do
|
||||
inotifywait --event create $(dirname "${real_wayland}") || sleep 4
|
||||
done
|
||||
|
||||
echo ...waiting done
|
||||
fi
|
||||
|
||||
mkdir -p "$XDG_RUNTIME_DIR" -m 700
|
||||
|
||||
if [ -z "${WAYLAND_DISPLAY}" ]
|
||||
then WAYLAND_DISPLAY=wayland-0
|
||||
fi
|
||||
|
||||
real_wayland=$(dirname "$XDG_RUNTIME_DIR")/${WAYLAND_DISPLAY}
|
||||
while [ ! -O "${real_wayland}" ]; do echo waiting for Wayland socket; sleep 4; done
|
||||
|
||||
ln -sf "${real_wayland}" "$XDG_RUNTIME_DIR"
|
||||
|
||||
exec "$@"
|
||||
exec "$@"
|
||||
|
15
dists/snap/snap/hooks/configure
vendored
15
dists/snap/snap/hooks/configure
vendored
@ -1,2 +1,15 @@
|
||||
#!/bin/sh
|
||||
snapctl restart $SNAP_NAME
|
||||
|
||||
if [ "$(snapctl get daemon)" = "" ]; then
|
||||
# By default, we run as a daemon on core, otherwise configure the daemon to stop
|
||||
if grep -q -e snap_core= -e snapd_recovery_mode= /proc/cmdline
|
||||
then snapctl set daemon=true
|
||||
else snapctl set daemon=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$(snapctl get daemon)" = "true" ]; then
|
||||
snapctl start --enable $SNAP_NAME.daemon 2>&1 || true
|
||||
else
|
||||
snapctl stop --disable $SNAP_NAME.daemon 2>&1 || true
|
||||
fi
|
||||
|
@ -1,12 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
if [ "$(snapctl get daemon)" = "" ]
|
||||
then
|
||||
# We run as a daemon on core, otherwise configure the daemon to stop
|
||||
# (There's no "snapctl disable ...")
|
||||
if grep -q snap_core= /proc/cmdline
|
||||
then snapctl set daemon=true
|
||||
else snapctl set daemon=false
|
||||
fi
|
||||
fi
|
||||
# we install with the daemon disabled, the configure hook
|
||||
# will start it if appropriate
|
||||
snapctl stop --disable $SNAP_NAME.daemon
|
||||
|
@ -1,12 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
if [ "$(snapctl get daemon)" = "" ]
|
||||
then
|
||||
# We run as a daemon on core, otherwise configure the daemon to stop
|
||||
# (There's no "snapctl disable ...")
|
||||
if grep -q snap_core= /proc/cmdline
|
||||
then snapctl set daemon=true
|
||||
else snapctl set daemon=false
|
||||
fi
|
||||
fi
|
||||
# we install with the daemon disabled, the configure hook
|
||||
# will start it if appropriate
|
||||
snapctl stop --disable $SNAP_NAME.daemon
|
||||
|
@ -20,6 +20,7 @@ description: |
|
||||
you will find some really obscure adventures and truly hidden gems to explore.
|
||||
confinement: strict
|
||||
grade: stable
|
||||
compression: lzo
|
||||
|
||||
apps:
|
||||
scummvm:
|
||||
@ -42,6 +43,7 @@ apps:
|
||||
- mount-observe
|
||||
- system-observe
|
||||
- network-observe
|
||||
- hardware-observe
|
||||
- joystick
|
||||
environment:
|
||||
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
|
||||
@ -49,7 +51,7 @@ apps:
|
||||
DBUS_FATAL_WARNINGS: 0
|
||||
|
||||
daemon:
|
||||
command: bin/daemon-start.sh $SNAP/bin/scummvm-launch.sh -f
|
||||
command: bin/daemon-start.sh $SNAP/snap/command-chain/desktop-launch $SNAP/bin/wayland-if-possible.sh $SNAP/bin/scummvm-launch.sh -f
|
||||
daemon: simple
|
||||
restart-condition: always
|
||||
plugs:
|
||||
@ -62,9 +64,13 @@ apps:
|
||||
- network-bind
|
||||
- removable-media
|
||||
- joystick
|
||||
- mount-observe
|
||||
- system-observe
|
||||
- network-observe
|
||||
- hardware-observe
|
||||
environment:
|
||||
SDL_VIDEODRIVER: wayland
|
||||
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
|
||||
LD_LIBRARY_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
|
||||
ESPEAK_DATA_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/espeak-ng-data"
|
||||
PULSE_SYSTEM: 1
|
||||
PULSE_RUNTIME_PATH: /var/run/pulse
|
||||
@ -125,6 +131,7 @@ parts:
|
||||
- libfluidsynth-dev
|
||||
- libfreetype6-dev
|
||||
- libfribidi-dev
|
||||
- libgif-dev
|
||||
- libglew-dev
|
||||
- libgtk-3-dev
|
||||
- libieee1284-3-dev
|
||||
@ -153,6 +160,7 @@ parts:
|
||||
- libflac8
|
||||
- libfluidsynth1
|
||||
- libfribidi0
|
||||
- libgif7
|
||||
- libgl1-mesa-dri
|
||||
- libgl1-mesa-glx
|
||||
- libglew2.0
|
||||
@ -240,14 +248,15 @@ parts:
|
||||
stage-packages:
|
||||
- libasound2
|
||||
- libasound2-plugins
|
||||
|
||||
- inotify-tools
|
||||
|
||||
scripts:
|
||||
plugin: dump
|
||||
source: scripts
|
||||
|
||||
games:
|
||||
plugin: dump
|
||||
source: https://www.scummvm.org/frs/extras/storefront/games-bundle.zip
|
||||
source: https://downloads.scummvm.org/frs/extras/storefront/games-bundle.zip
|
||||
source-checksum: sha256/5c16f3db7fda3660d1bddb52e76aa27ada8eb8268872f5e045490f3eabb603e1
|
||||
organize:
|
||||
games-bundle: usr/share/scummvm/
|
||||
|
Loading…
x
Reference in New Issue
Block a user