diff options
author | Ainola | 2017-01-22 18:34:49 -0700 |
---|---|---|
committer | Ainola | 2017-01-22 18:34:49 -0700 |
commit | 8655cf39c6eb481954c6b60b5b008423415009b7 (patch) | |
tree | 5512eec3147b64f579ce21b5e7f131cf1407798f | |
parent | a30093b5f10f306f913e93e4b09b96ea4f5513ef (diff) | |
download | aur-gone-home-hib.tar.gz |
include firejail support
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | gone-home-hib | 12 |
3 files changed, 29 insertions, 9 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Tue Feb 2 14:02:40 UTC 2016 +# Mon Jan 23 01:34:28 UTC 2017 pkgbase = gone-home-hib pkgdesc = Gone home is an interactive exploration simulator by Fullbright. pkgver = 1.1 - pkgrel = 3 + pkgrel = 4 url = http://www.gonehomegame.com/ install = gone-home-hib.install arch = i686 @@ -12,12 +12,15 @@ pkgbase = gone-home-hib depends = glu depends = libxext depends = libxcursor + optdepends = firejail: Automatically sandbox this application from your OS source = hib://GoneHome_v1.1.tar.gz source = gone-home-hib.desktop source = gone-home-hib.install + source = gone-home-hib sha256sums = ecd01fcde184f7d1937579e7d5d4a791007887b88f9baa10039747166bb2d097 sha256sums = dea74a9436b2b37a63265c0606195293cb751855e2de473e678ab85600c92053 sha256sums = ea11e510a7c52e485cf1e87eb985691029b62fc694830a0c57f14b4173ac8edd + sha256sums = fa70977fb6bc2686f627d1131c158fcf39fcebb3b93c63b29b0c4a29e6df1b23 pkgname = gone-home-hib @@ -2,18 +2,22 @@ pkgname=gone-home-hib pkgver=1.1 -pkgrel=3 +pkgrel=4 pkgdesc="Gone home is an interactive exploration simulator by Fullbright." arch=('i686' 'x86_64') url="http://www.gonehomegame.com/" license=('custom: commercial') depends=('glu' 'libxext' 'libxcursor') +# If Firejail is installed, this application will be sandboxed automatically. +optdepends=('firejail: Automatically sandbox this application from your OS') source=("hib://GoneHome_v${pkgver}.tar.gz" "${pkgname}.desktop" - "${pkgname}.install") -sha256sums=("ecd01fcde184f7d1937579e7d5d4a791007887b88f9baa10039747166bb2d097" - "dea74a9436b2b37a63265c0606195293cb751855e2de473e678ab85600c92053" - "ea11e510a7c52e485cf1e87eb985691029b62fc694830a0c57f14b4173ac8edd") + "${pkgname}.install" + "$pkgname") +sha256sums=('ecd01fcde184f7d1937579e7d5d4a791007887b88f9baa10039747166bb2d097' + 'dea74a9436b2b37a63265c0606195293cb751855e2de473e678ab85600c92053' + 'ea11e510a7c52e485cf1e87eb985691029b62fc694830a0c57f14b4173ac8edd' + 'fa70977fb6bc2686f627d1131c158fcf39fcebb3b93c63b29b0c4a29e6df1b23') install="${pkgname}.install" [ "$CARCH" == "x86_64" ] && _arch="x86_64" || _arch="x86" # Prevent compressing final package @@ -28,7 +32,7 @@ PKGEXT='.pkg.tar' # DLAGENTS+=('hib::/usr/bin/hib-dlagent -k $KEY -u $USER -p $PASS -o %o %u') # # The following is just a fallback to the above to notify the user: -DLAGENTS+=("hib::/usr/bin/echo %u - This is is not a real URL, you need to download the humble bundle file manually to \"$PWD\" or setup a hib:// DLAGENT. Read this PKGBUILD for more information.") +DLAGENTS+=("hib::/usr/bin/echo %u Download the HIB installer to \"$PWD\" or set up a hib:// DLAGENT. Read this PKGBUILD for more information.") package() { # Launcher and Data @@ -37,7 +41,8 @@ package() { # Install Binaries/Launchers mkdir -p "$pkgdir/usr/bin" - ln -s "/opt/${pkgname}/GoneHome.${_arch}" "${pkgdir}/usr/bin/${pkgname}" + install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" + sed -i "s/ARCH/$_arch/" "$pkgdir/usr/bin/$pkgname" # Desktop Integration mkdir -p "$pkgdir/usr/share/pixmaps" diff --git a/gone-home-hib b/gone-home-hib new file mode 100644 index 000000000000..a564287768da --- /dev/null +++ b/gone-home-hib @@ -0,0 +1,12 @@ +#!/bin/sh + +run='/opt/gone-home-hib/GoneHome.ARCH' +cd /opt/gone-home-hib/ || exit 1 # The launcher fails unless in its dir. + +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 |