diff --git a/dists/snap/README.md b/dists/snap/README.md
new file mode 100644
index 00000000000..e33f0da58ae
--- /dev/null
+++ b/dists/snap/README.md
@@ -0,0 +1,78 @@
+
+
+
+ ScummVM
+
+
+This is the snap for ScummVM, "ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files.". It works on Ubuntu, Fedora, Debian, and other major Linux
+distributions.
+
+
+
+## Install
+
+ sudo snap install scummvm
+
+([Don't have snapd installed?](https://snapcraft.io/docs/core/install))
+
+
+
+Published for
with :gift_heart: by Snapcrafters
+
+## Remaining tasks
+
+Snapcrafters ([join us](https://forum.snapcraft.io/t/join-snapcrafters/1325))
+are working to land snap install documentation and
+the [snapcraft.yaml](https://github.com/snapcrafters/fork-and-rename-me/blob/master/snap/snapcraft.yaml)
+upstream so ScummVM can authoritatively publish future releases.
+
+ - [x] Fork the [Snapcrafters template](https://github.com/snapcrafters/fork-and-rename-me) repository to your own GitHub account.
+ - If you have already forked the Snapcrafter template to your account and want to create another snap, you'll need to use GitHub's [Import repository](https://github.com/new/import) feature because you can only fork a repository once.
+ - [x] Rename the forked Snapcrafters template repository
+ - [x] Update logos and references to `[Project]` and `[my-snap-name]`
+ - [ ] Create a snap that runs in `devmode`
+ - [x] Register the snap in the store, **using the preferred upstream name**
+ - [ ] Add a screenshot to this `README.md`
+ - [ ] Publish the `devmode` snap in the Snap store edge channel
+ - [x] Add install instructions to this `README.md`
+ - [ ] Update snap store metadata, icons and screenshots
+ - [x] Convert the snap to `strict` confinement, or `classic` confinement if it qualifies
+ - [ ] Publish the confined snap in the Snap store beta channel
+ - [x] Update the install instructions in this `README.md`
+ - [ ] Post a call for testing on the [Snapcraft Forum](https://forum.snapcraft.io) - [link]()
+ - [ ] Ask a [Snapcrafters admin](https://github.com/orgs/snapcrafters/people?query=%20role%3Aowner) to fork your repo into github.com/snapcrafters, transfer the snap name from you to snapcrafters, and configure the repo for automatic publishing into edge on commit
+ - [ ] Add the provided Snapcraft build badge to this `README.md`
+ - [x] Publish the snap in the Snap store stable channel
+ - [x] Update the install instructions in this `README.md`
+ - [ ] Post an announcement in the [Snapcraft Forum](https://forum.snapcraft.io) - [link]()
+ - [ ] Submit a pull request or patch upstream that adds snap install documentation - [link]()
+ - [ ] Submit a pull request or patch upstream that adds the `snapcraft.yaml` and any required assets/launchers - [link]()
+ - [ ] Add upstream contact information to the `README.md`
+ - If upstream accept the PR:
+ - [ ] Request upstream create a Snap store account
+ - [ ] Contact the Snap Advocacy team to request the snap be transferred to upstream
+ - [ ] Ask the Snap Advocacy team to celebrate the snap - [link]()
+
+If you have any questions, [post in the Snapcraft forum](https://forum.snapcraft.io).
+
+
+
+
diff --git a/dists/snap/scripts/bin/daemon-start.sh b/dists/snap/scripts/bin/daemon-start.sh
new file mode 100755
index 00000000000..12f9d785879
--- /dev/null
+++ b/dists/snap/scripts/bin/daemon-start.sh
@@ -0,0 +1,22 @@
+#!/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
+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 "$@"
\ No newline at end of file
diff --git a/dists/snap/scripts/bin/scummvm-launch.sh b/dists/snap/scripts/bin/scummvm-launch.sh
new file mode 100755
index 00000000000..bc7c996ec99
--- /dev/null
+++ b/dists/snap/scripts/bin/scummvm-launch.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -x
+
+if [ -z "${XDG_CONFIG_HOME}" ]
+then
+ if [ -z "${HOME}" ]
+ then XDG_CONFIG_HOME=$SNAP_USER_DATA/.config
+ else XDG_CONFIG_HOME=${HOME}/.config
+ fi
+fi
+
+# Hook up speech-dispatcher
+mkdir -p $XDG_RUNTIME_DIR/speech-dispatcher
+$SNAP/usr/bin/speech-dispatcher -d -C "$SNAP/etc/speech-dispatcher" -S "$XDG_RUNTIME_DIR/speech-dispatcher/speechd.sock" -m "$SNAP/usr/lib/speech-dispatcher-modules" -t 30
+
+# We need to do this for the user that launches scummvm, so
+# it can't be done on installation
+while [ ! -f "${XDG_CONFIG_HOME}/scummvm/.added-games-bundle" ]
+do
+ mkdir -p ${XDG_CONFIG_HOME}/scummvm/
+ touch ${XDG_CONFIG_HOME}/scummvm/.added-games-bundle
+ if ! grep -E "comi|drascula|dreamweb|lure|myst|queen|sky|sword" ${XDG_CONFIG_HOME}/scummvm/scummvm.ini
+ then
+ # Register the bundled games. We use a "while" loop as we can't easily
+ # tell when scummvm is finished.
+ $SNAP/bin/scummvm -p /usr/share/scummvm/ --recursive --add
+ sleep 1
+ fi
+done
+
+exec $SNAP/bin/scummvm "$@"
\ No newline at end of file
diff --git a/dists/snap/scripts/bin/wayland-if-possible.sh b/dists/snap/scripts/bin/wayland-if-possible.sh
new file mode 100755
index 00000000000..9951d69230b
--- /dev/null
+++ b/dists/snap/scripts/bin/wayland-if-possible.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ -O "$XDG_RUNTIME_DIR/${WAYLAND_DISPLAY:-wayland-0}" ] && [ -e $SNAP_COMMON/wayland.connected ]; then export SDL_VIDEODRIVER=wayland; fi
+
+exec "$@"
diff --git a/dists/snap/snap/gui/scummvm.desktop b/dists/snap/snap/gui/scummvm.desktop
new file mode 100644
index 00000000000..e0013d266cc
--- /dev/null
+++ b/dists/snap/snap/gui/scummvm.desktop
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Name=ScummVM
+Comment=Interpreter for numerous adventure games and RPGs
+Comment[pl]=Interpreter graficznych gier przygodowych
+Comment[sv]=Tolk för flera äventyrsspel
+Comment[he]=פרשן למספר משחקי הרפתקאות
+Comment[de]=Interpreter für zahlreiche Abenteuerspiele und RPGs
+Comment[es]=Intérprete para varias aventuras gráficas
+Comment[ca]=Intèrpret per diverses aventures gràfiques
+Exec=scummvm
+Icon=${SNAP}/meta/gui/scummvm.png
+Terminal=false
+Type=Application
+Categories=Game;AdventureGame;
+StartupNotify=false
diff --git a/dists/snap/snap/gui/scummvm.png b/dists/snap/snap/gui/scummvm.png
new file mode 100644
index 00000000000..6910e410452
Binary files /dev/null and b/dists/snap/snap/gui/scummvm.png differ
diff --git a/dists/snap/snap/hooks/configure b/dists/snap/snap/hooks/configure
new file mode 100755
index 00000000000..ad46d7b9e27
--- /dev/null
+++ b/dists/snap/snap/hooks/configure
@@ -0,0 +1,2 @@
+#!/bin/sh
+snapctl restart $SNAP_NAME
diff --git a/dists/snap/snap/hooks/connect-plug-wayland b/dists/snap/snap/hooks/connect-plug-wayland
new file mode 100755
index 00000000000..51fb593d0b1
--- /dev/null
+++ b/dists/snap/snap/hooks/connect-plug-wayland
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+touch $SNAP_COMMON/wayland.connected
diff --git a/dists/snap/snap/hooks/disconnect-plug-wayland b/dists/snap/snap/hooks/disconnect-plug-wayland
new file mode 100755
index 00000000000..ff58b77d258
--- /dev/null
+++ b/dists/snap/snap/hooks/disconnect-plug-wayland
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+rm -f $SNAP_COMMON/wayland.connected
diff --git a/dists/snap/snap/hooks/install b/dists/snap/snap/hooks/install
new file mode 100755
index 00000000000..6b2ad9108a5
--- /dev/null
+++ b/dists/snap/snap/hooks/install
@@ -0,0 +1,12 @@
+#!/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
diff --git a/dists/snap/snap/hooks/post-refresh b/dists/snap/snap/hooks/post-refresh
new file mode 100755
index 00000000000..6b2ad9108a5
--- /dev/null
+++ b/dists/snap/snap/hooks/post-refresh
@@ -0,0 +1,12 @@
+#!/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
diff --git a/dists/snap/snap/snapcraft.yaml b/dists/snap/snap/snapcraft.yaml
new file mode 100644
index 00000000000..c7e2a4566fc
--- /dev/null
+++ b/dists/snap/snap/snapcraft.yaml
@@ -0,0 +1,250 @@
+name: scummvm
+base: core18
+license: GPL-2.0
+adopt-info: scummvm
+summary: ScummVM
+description: |
+ ScummVM is a program which allows you to run certain classic graphical
+ point-and-click adventure games, provided you already have their data
+ files. The clever part about this: ScummVM just replaces the executables
+ shipped with the game, allowing you to play them on systems for which
+ they were never designed!
+
+ Currently, ScummVM supports a huge library of adventures with over
+ 250 games in total.
+
+ It supports many classics published by legendary studios like LucasArts,
+ Sierra On-Line, Revolution Software, Cyan, Inc. and Westwood Studios.
+ Next to ground-breaking titles like the Monkey Island series,
+ Broken Sword, Myst, Blade Runner and countless other games,
+ you will find some really obscure adventures and truly hidden gems to explore.
+confinement: strict
+grade: stable
+
+# **Workaround** The following are duplicated for "daemon" (putting them at the top level doesn't work in *this* snap)
+plugs:
+ wayland:
+ opengl:
+ alsa:
+ audio-playback:
+ network:
+ network-bind:
+ removable-media:
+
+apps:
+ scummvm:
+ command-chain: ["snap/command-chain/alsa-launch"]
+ extensions: [gnome-3-28]
+ command: desktop-launch $SNAP/bin/wayland-if-possible.sh $SNAP/bin/scummvm-launch.sh
+ plugs:
+ - wayland
+ - x11
+ - opengl
+ - unity7
+ - pulseaudio
+ - alsa
+ - audio-playback
+ - network
+ - network-bind
+ - removable-media
+ - home
+ - gsettings
+ - mount-observe
+ 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/"
+ ESPEAK_DATA_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/espeak-ng-data"
+ DBUS_FATAL_WARNINGS: 0
+
+ daemon:
+ command: daemon-start.sh $SNAP/bin/scummvm-launch.sh -f
+ daemon: simple
+ restart-condition: always
+ plugs:
+ - pulseaudio
+ # **Workaround** The following are duplicated for "daemon" (putting them at the top level doesn't work in *this* snap)
+ - wayland
+ - opengl
+ - alsa
+ - audio-playback
+ - network
+ - network-bind
+ - removable-media
+ 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/"
+ ESPEAK_DATA_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/espeak-ng-data"
+ PULSE_SYSTEM: 1
+ PULSE_RUNTIME_PATH: /var/run/pulse
+
+layout:
+ /usr/share/glvnd/egl_vendor.d:
+ bind: $SNAP/usr/share/glvnd/egl_vendor.d
+ /usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri:
+ bind: $SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri
+ /usr/share/X11/xkb:
+ bind: $SNAP/usr/share/X11/xkb
+ /usr/share/scummvm:
+ bind: $SNAP/usr/share/scummvm
+ /usr/share/applications:
+ bind: $SNAP/usr/share/applications
+ /usr/share/alsa:
+ bind: $SNAP/usr/share/alsa
+
+parts:
+ scummvm:
+ after: [alsa-mixin]
+ source: https://github.com/scummvm/scummvm.git
+ override-build: |
+ last_committed_tag="$(git tag --list | tac | head -n1)"
+ trimmed_tag="$(echo $last_committed_tag | sed 's/desc\///' | sed 's/git//' | sed 's/^v//')"
+ last_released_tag="$(snap info scummvm | awk '$1 == "latest/beta:" { print $2 }')"
+ # If the latest tag from the upstream project has not been released to
+ # beta, build that tag instead of master.
+ if [ "${trimmed_tag}" != "${last_released_tag}" ]; then
+ git fetch
+ git checkout "${last_committed_tag}"
+ snapcraftctl set-version $(git -C ../src tag --list | tac | head -n1 | sed 's/desc\///' | sed 's/git//' | sed 's/^v//')
+ else
+ snapcraftctl set-version $(git -C ../src describe | sed 's/desc\///')
+ fi
+ snapcraftctl build
+
+ plugin: autotools
+ configflags:
+ - --enable-release
+ - --enable-tts
+ - --enable-opl2lpt
+ - --enable-c++11
+ - --disable-debug
+
+ build-packages:
+ - libsdl2-dev
+ - libgtk-3-dev
+ - libjpeg62-dev
+ - libmpeg2-4-dev
+ - liba52-dev
+ - libogg-dev
+ - libvorbis-dev
+ - libflac-dev
+ - libmad0-dev
+ - libpng-dev
+ - libtheora-dev
+ - libfaad-dev
+ - libfluidsynth-dev
+ - libfreetype6-dev
+ - libfribidi-dev
+ - zlib1g-dev
+ - libunity-dev
+ - libcurl4-openssl-dev
+ - libsdl2-net-dev
+ - libieee1284-3-dev
+ - libspeechd-dev
+ stage-packages:
+ - libicu60
+ - libfaad2
+ - libflac8
+ - libfluidsynth1
+ - libfribidi0
+ - libgl1-mesa-dri
+ - libgl1-mesa-glx
+ - libglu1-mesa
+ - libwayland-egl1-mesa
+ - libjpeg62
+ - libjpeg8
+ - libmad0
+ - libmpeg2-4
+ - libogg0
+ - libpng16-16
+ - libpulse0
+ - libsdl2-2.0-0
+ - libsndio6.1
+ - libtheora0
+ - libvorbis0a
+ - libvorbisfile3
+ - zlib1g
+ - libdbusmenu-glib4
+ - libdee-1.0-4
+ - libslang2
+ - libunity-protocol-private0
+ - libunity9
+ - freeglut3
+ - libcurl4
+ - libsdl2-net-2.0-0
+ - liba52-0.7.4
+ - libieee1284-3
+ - locales-all
+ - ttf-ubuntu-font-family
+ - espeak-ng
+ - espeak-ng-data
+ - libspeechd2
+ - speech-dispatcher
+ - speech-dispatcher-audio-plugins
+ - speech-dispatcher-espeak-ng
+
+ alsa-mixin:
+ plugin: nil
+ source: https://github.com/diddlesnaps/snapcraft-alsa.git
+ override-pull: |
+ cat > asound.conf < alsa-launch <