diff --git a/snap/hooks/configure b/snap/hooks/configure new file mode 100755 index 0000000..ad46d7b --- /dev/null +++ b/snap/hooks/configure @@ -0,0 +1,2 @@ +#!/bin/sh +snapctl restart $SNAP_NAME diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..a39d5cc --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,158 @@ +name: pinball-table-gnu +version: git +summary: Pinball table dedicated to GNU project with Emilia game +description: | + Another Emilia pinball table to have fun, behaviour plugin. + The table is dedicated to GNU project. + It features multiballs, magnets and bumpers. + +confinement: strict +grade: devel +base: core20 +license: GPL-2.0+ + +plugs: + alsa: + audio-playback: + home: + joystick: + network-bind: # Mir/Xwayland + opengl: + pulseaudio: + wayland: + x11: + +environment: + __EGL_VENDOR_LIBRARY_DIRS: "$SNAP/etc/glvnd/egl_vendor.d:$SNAP/usr/share/glvnd/egl_vendor.d" + LD_LIBRARY_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio" + LIBGL_DRIVERS_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri" + PINBALL_TABLE: gnu + PULSE_SERVER: unix:$XDG_RUNTIME_DIR/../pulse/native + XWAYLAND_FULLSCREEN_WINDOW_HINT: title="Emilia Pinball" + +apps: + daemon: + command-chain: + - bin/run-daemon + - bin/wayland-launch + command: usr/local/bin/pinball --fullscreen + daemon: simple + restart-condition: always + pinball: + command: usr/local/bin/pinball + mir-kiosk-pinball: + command-chain: + - bin/wayland-launch + command: usr/local/bin/pinball + +layout: + /etc/alsa: + bind: $SNAP/etc/alsa + /etc/pinball: + bind: $SNAP/etc/pinball + /usr/local: + bind: $SNAP/usr/local + /usr/share/alsa: + bind: $SNAP/usr/share/alsa + /usr/share/X11: + bind: $SNAP/usr/share/X11 + /usr/bin/xkbcomp: + symlink: $SNAP/usr/bin/xkbcomp + /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib: + bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib +parts: + pinball: + source: https://github.com/rzr/pinball.git + plugin: autotools + override-build: | + snapcraftctl build + install -d $SNAPCRAFT_PART_INSTALL/etc/pinball + install extra/profile/pincab/etc/pinball/pinball $SNAPCRAFT_PART_INSTALL/etc/pinball/ + build-packages: + - libasound2-dev + - libgl1-mesa-dev + - libjpeg-dev + - libltdl-dev + - libogg-dev + - libpng-dev + - libsdl2-image-dev + - libsdl2-mixer-dev + - libsdl2-dev + - libtool-bin + - libvorbis-dev + stage-packages: + - alsa-utils + - libasound2 + - libasyncns0 + - libflac8 + - libfluidsynth2 + - libgl1 + - libglvnd0 + - libglx0 + - libinstpatch-1.0-2 + - libjack-jackd2-0 + - libjbig0 + - libjpeg-turbo8 + - libltdl7 + - libmodplug1 + - libmpg123-0 + - libogg0 + - libopus0 + - libopusfile0 + - libpng16-16 + - libpulse0 + - libsdl2-2.0-0 + - libsdl2-image-2.0-0 + - libsdl2-mixer-2.0-0 + - libsndfile1 + - libtiff5 + - libvorbis0a + - libvorbisenc2 + - libvorbisfile3 + - libwayland-client0 + - libwayland-cursor0 + - libwayland-egl1 + - libwebp6 + - libx11-6 + - libxau6 + - libxcb1 + - libxcursor1 + - libxdmcp6 + - libxext6 + - libxfixes3 + - libxi6 + - libxinerama1 + - libxkbcommon0 + - libxrandr2 + - libxrender1 + - libxss1 + - libxxf86vm1 + + pinball-table-gnu: + source: https://github.com/rzr/pinball-table-gnu.git + plugin: autotools + build-packages: + - automake + - libtool + - libltdl-dev + - libsdl2-dev + build-environment: + - PATH: $SNAPCRAFT_PART_INSTALL/../../pinball/install/usr/local/bin:${PATH} + override-build: | + sed \ + -e "s|prefix=/\(.*\)|prefix=$SNAPCRAFT_PART_INSTALL/../../pinball/install/\1|g" \ + -e "s|exec_prefix=/\(.*\)|exec_prefix=$SNAPCRAFT_PART_INSTALL/../../pinball/install/\1|g" \ + -i "$SNAPCRAFT_PART_INSTALL/../../pinball/install/usr/local/bin/pinball-config" + snapcraftctl build + + mir-kiosk-snap-launch: + plugin: dump + source: https://github.com/MirServer/mir-kiosk-snap-launch.git + override-build: $SNAPCRAFT_PART_BUILD/build-with-plugs.sh opengl audio-playback alsa wayland hardware-observe + stage-packages: + - inotify-tools + + mesa: + plugin: nil + stage-packages: + - libwayland-egl1-mesa