summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorruniq2017-01-28 18:16:19 +0100
committerruniq2017-01-28 18:16:19 +0100
commit01312520639b61ede61d21db32dcdd0eb3cac1fa (patch)
tree343fa178c6621b59076cb82021e8ed018a1534be
downloadaur-01312520639b61ede61d21db32dcdd0eb3cac1fa.tar.gz
Initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD51
-rw-r--r--gog-bastion13
-rw-r--r--gog-bastion.desktop10
4 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0ae31ce8f87b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = gog-bastion
+ pkgdesc = An action role-playing game set in a lush imaginative world (GOG version)
+ pkgver = 2.0.0.1
+ pkgrel = 1
+ url = http://www.supergiantgames.com/games/bastion
+ arch = i686
+ arch = x86_64
+ license = custom
+ optdepends = firejail: Automatically sandbox this application from your OS
+ source = gog://gog_bastion_2.0.0.1.sh
+ source = gog-bastion.desktop
+ source = gog-bastion
+ sha256sums = 8c5e08d8a22d24b928b06472bb12ac2c039e1dec1931cef89999c305e96478f6
+ sha256sums = fafd66b2441bf8e889ad7331bdc162efb6989b5999bb4235f2ba07fef9f6c718
+ sha256sums = b18220f78b29d6a1f9eb92a9def50021f217784eeaf447b7564b99e11a24ad40
+
+pkgname = gog-bastion
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..34a08814ee7c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Patrice Peterson <runiq@archlinux.us>
+# Thanks to: Ainola for the base PKGBUILD (gog-undertale)
+
+pkgname=gog-bastion
+pkgver=2.0.0.1
+pkgrel=1
+pkgdesc="An action role-playing game set in a lush imaginative world (GOG version)"
+url="http://www.supergiantgames.com/games/bastion"
+license=('custom')
+arch=('i686' 'x86_64')
+# If Firejail is installed, this application will be sandboxed automatically.
+optdepends=('firejail: Automatically sandbox this application from your OS')
+source=(
+ "gog://${pkgname//-/_}_${pkgver}.sh"
+ "${pkgname}.desktop"
+ "$pkgname")
+sha256sums=('8c5e08d8a22d24b928b06472bb12ac2c039e1dec1931cef89999c305e96478f6'
+ 'fafd66b2441bf8e889ad7331bdc162efb6989b5999bb4235f2ba07fef9f6c718'
+ 'b18220f78b29d6a1f9eb92a9def50021f217784eeaf447b7564b99e11a24ad40')
+
+# You need to download the gog.com installer file manually or with lgogdownloader.
+DLAGENTS+=("gog::/usr/bin/echo %u Download the GOG file to \"$PWD\" or set up a gog:// DLAGENT.")
+
+# Prevent compressing final package
+PKGEXT=".pkg.tar"
+
+package(){
+ cd "${srcdir}"
+
+ # Install game
+ install -d "${pkgdir}/opt/${pkgname}/"
+ install -d "${pkgdir}/opt/${pkgname}/support"
+ install -d "${pkgdir}/usr/bin/"
+ cp -r "data/noarch/game/" "${pkgdir}/opt/${pkgname}/"
+
+
+ find "${pkgdir}/opt/${pkgname}" -type d -exec chmod 755 {} \;
+ install -Dm755 "data/noarch/start.sh" \
+ "${pkgdir}/opt/${pkgname}/"
+ install -Dm755 data/noarch/support/*.{sh,shlib} -t \
+ "${pkgdir}/opt/${pkgname}/support"
+
+ # Desktop integration
+ install -Dm 644 "data/noarch/support/icon.png" \
+ "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ install -Dm644 "data/noarch/docs/End User License Agreement.txt" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm 644 "${srcdir}/${pkgname}.desktop" \
+ "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -Dm755 "$srcdir/$pkgname" "$pkgdir/usr/bin/$pkgname"
+}
diff --git a/gog-bastion b/gog-bastion
new file mode 100644
index 000000000000..328adee58934
--- /dev/null
+++ b/gog-bastion
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+run="/opt/gog-bastion/start.sh"
+# The launcher fails unless in its dir.
+cd "$(dirname "$run")" || exit 1
+
+if which firejail >/dev/null 2>&1 && [ -z "$FIREJAIL_IGNORE" ]; then
+ echo "Firejail detected. Enforcing a sandbox"
+ echo "To bypass Firejail enforcement, run FIREJAIL_IGNORE=1 $run."
+ firejail --caps.drop=all "$run"
+else
+ "$run"
+fi
diff --git a/gog-bastion.desktop b/gog-bastion.desktop
new file mode 100644
index 000000000000..78b229a97e55
--- /dev/null
+++ b/gog-bastion.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Bastion
+Comment=An action role-playing game set in a lush imaginative world
+Exec=gog-bastion
+Icon=gog-bastion
+Type=Application
+Terminal=false
+StartupNotify=true
+Categories=Game;AudioVideo;
+Encoding=UTF-8