summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Beste2017-01-28 13:03:41 -0600
committerDan Beste2017-01-28 13:03:41 -0600
commitc39f429efda590f7d38174fab23ecb51c5eac3ee (patch)
treeeb3d59375ff6f0087720714a46fb2199d6bfc0d2
parent73d97ef942c9bf125451e784b4c70ab586cdba43 (diff)
downloadaur-c39f429efda590f7d38174fab23ecb51c5eac3ee.tar.gz
Cleanup
Clean PKGBUILD Refactor gog-owlboy script
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD55
-rwxr-xr-x[-rw-r--r--]gog-owlboy29
3 files changed, 66 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9dc65e6b820..1b331c84472 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,13 +6,21 @@ pkgbase = gog-owlboy
arch = i686
arch = x86_64
license = custom
+ depends = libogg
+ depends = libvorbis
+ depends = openal
+ depends = sdl2
optdepends = firejail: Automatically sandbox this application from your OS
source = gog://gog_owlboy_2.0.0.1.sh
source = gog-owlboy.desktop
source = gog-owlboy
sha256sums = 76958e0bb434d2514873aaddb892bc6c7055c39799ecde5f62a56345136853fc
sha256sums = 8574e2463800004ddf97e49d2760d834413bf51fda4b1a57ead8cc10b07ac4f2
- sha256sums = 22b307b01c96852220e1be33e1cfa19410c7dd009135540e6d48ed35bace17f0
+ sha256sums = 160b4d0fb275d3c1d4d6d574ca4085579e944e67dd32bd0a0c6e79f2e3d105a6
+ depends_i686 = lib32-libogg
+ depends_i686 = lib32-libvorbis
+ depends_i686 = lib32-openal
+ depends_i686 = lib32-sdl2
pkgname = gog-owlboy
diff --git a/PKGBUILD b/PKGBUILD
index 2d137d8d115..20d1b2f9f49 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,51 @@
# Maintainer: Krakn - Dan.Ray.Beste@gmail.com
# Thanks to: Ainola for the base PKGBUILD (gog-undertale)
+# All dependencies are included with the gog_owlboy_$version.sh file.
+# For good measure I was able to track all but 2 down:
+# libmojoshader - https://icculus.
+# libXNAFileDialog - https://github.com/flibitijibibo/XNAFileDialog
+
pkgname=gog-owlboy
pkgver=2.0.0.1
pkgrel=1
pkgdesc="Owlboy is a 'hi-bit' adventure game, where you can fly and explore a brand new world in the clouds!"
url="http://www.owlboygame.com/"
-license=('custom')
-arch=('i686' 'x86_64')
-# Dependencies are included with the gog_owlboy_$version.sh file.
-depends_x86_64=()
-depends_i686=()
-# If Firejail is installed, this application will be sandboxed automatically.
-optdepends=('firejail: Automatically sandbox this application from your OS')
+license=(
+ 'custom'
+)
+arch=(
+ 'i686'
+ 'x86_64'
+)
+depends_x86_64=(
+ 'libogg'
+ 'libvorbis'
+ 'openal'
+ 'sdl2'
+)
+depends_i686=(
+ 'lib32-libogg'
+ 'lib32-libvorbis'
+ 'lib32-openal'
+ 'lib32-sdl2'
+)
+optdepends=(
+ 'firejail: Automatically sandbox this application from your OS'
+)
source=(
"gog://${pkgname//-/_}_${pkgver}.sh"
"${pkgname}.desktop"
- "$pkgname")
+ "$pkgname"
+)
sha256sums=(
- "76958e0bb434d2514873aaddb892bc6c7055c39799ecde5f62a56345136853fc"
- "8574e2463800004ddf97e49d2760d834413bf51fda4b1a57ead8cc10b07ac4f2"
- "22b307b01c96852220e1be33e1cfa19410c7dd009135540e6d48ed35bace17f0"
+ '76958e0bb434d2514873aaddb892bc6c7055c39799ecde5f62a56345136853fc'
+ '8574e2463800004ddf97e49d2760d834413bf51fda4b1a57ead8cc10b07ac4f2'
+ '160b4d0fb275d3c1d4d6d574ca4085579e944e67dd32bd0a0c6e79f2e3d105a6'
+)
+DLAGENTS=(
+ "gog::/usr/bin/echo %u Download the GOG file to $PWD or set up a gog:// DLAGENT."
)
-
-# 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}"
@@ -52,5 +70,6 @@ package(){
"${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"
+ install -Dm755 "${srcdir}/${pkgname}" \
+ "${pkgdir}/usr/bin/${pkgname}"
}
diff --git a/gog-owlboy b/gog-owlboy
index 0e19fcd06d8..4642d87e61b 100644..100755
--- a/gog-owlboy
+++ b/gog-owlboy
@@ -1,13 +1,24 @@
-#! /bin/sh
+#! /bin/bash
-run="/opt/gog-owlboy/start.sh"
-# The launcher fails unless in its dir.
-cd /opt/gog-undertale/ || exit 1
+pkgname="gog-owlboy"
+pkgdir="/opt/${pkgname}/"
+run="${pkgdir}/start.sh"
-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"
+if hash firejail; then
+ echo "Firejail detected; attempting to enforce a sandbox..."
+ if [[ -f "${XDG_CONFIG_HOME}/firejail/${pkgname}.profile" ]]; then
+ echo "Firejail profile for ${pkgname} found in ${XDG_CONFIG_HOME}/firejail/"
+ echo "Enforcing a sandbox!"
+ firejail "${run}"
+ elif [[ -f "/etc/firejail/${pkgname}.profile" ]]; then
+ echo "Firejail profile for ${pkgname} found in /etc/firejail/"
+ echo "Enforcing a sandbox!"
+ firejail "${run}"
+ else
+ echo "No Firejail profile detected!"
+ echo "Skipping Firejail sandbox..."
+ "${run}"
+ fi
else
- "$run"
+ "${run}"
fi