From 2dfa1fa71e07385e5bcc1e5da6cb34d88561dc7c Mon Sep 17 00:00:00 2001
From: Colin Snover <github.com@zetafleet.com>
Date: Thu, 23 Nov 2017 11:50:28 -0600
Subject: [PATCH] DEVTOOLS: Add Snap manifest to update-version.pl

---
 devtools/update-version.pl |  1 +
 snapcraft.yaml             |  2 +-
 snapcraft.yaml.in          | 63 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+), 1 deletion(-)
 create mode 100644 snapcraft.yaml.in

diff --git a/devtools/update-version.pl b/devtools/update-version.pl
index 0e2879ffd92..75f6f0e7c8f 100755
--- a/devtools/update-version.pl
+++ b/devtools/update-version.pl
@@ -51,6 +51,7 @@ my @subs_files = qw(
 	dists/gph/scummvm.ini
 	dists/riscos/!Boot,feb
 	backends/platform/psp/README.PSP
+	snapcraft.yaml
 	);
 
 my %subs = (
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 178a3234142..eee5e6ae421 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,5 +1,5 @@
 name: scummvm
-version: "1.9.0git"
+version: "2.0.0git"
 summary: ScummVM
 description: |
     ScummVM is a program which allows you to run certain classic graphical
diff --git a/snapcraft.yaml.in b/snapcraft.yaml.in
new file mode 100644
index 00000000000..a95477707a0
--- /dev/null
+++ b/snapcraft.yaml.in
@@ -0,0 +1,63 @@
+name: scummvm
+version: "@VERSION@"
+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!
+confinement: strict
+
+apps:
+  scummvm:
+    command: scummvm
+    plugs: [x11, home, pulseaudio, unity7, opengl]
+
+parts:
+  scummvm:
+    source: .
+    plugin: autotools
+#    Quick test build
+#    configflags:
+#      - --disable-all-engines
+#      - --enable-engine=scumm
+    build-packages:
+      - g++
+      - make
+      - libsdl2-dev
+      - libjpeg62-dev
+      - libmpeg2-4-dev
+      - libogg-dev
+      - libvorbis-dev
+      - libflac-dev
+      - libmad0-dev
+      - libpng12-dev
+      - libtheora-dev
+      - libfaad-dev
+      - libfluidsynth-dev
+      - libfreetype6-dev
+      - zlib1g-dev
+      - libunity-dev
+    stage-packages:
+      - libicu55
+      - libasound2
+      - libc6
+      - libfaad2
+      - libflac8
+      - libfluidsynth1
+      - libgl1-mesa-dri
+      - libgl1-mesa-glx
+      - libjpeg62
+      - libjpeg8
+      - libmad0
+      - libmpeg2-4
+      - libogg0
+      - libpng12-0
+      - libsdl2-2.0-0
+      - libsndio6.1
+      - libstdc++6
+      - libtheora0
+      - libvorbis0a
+      - libvorbisfile3
+      - zlib1g