summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Beste2017-01-28 12:41:44 -0600
committerDan Beste2017-01-28 12:55:23 -0600
commit82b6be862296321efe4bac679a632f9c1a9fbb0e (patch)
treec3f2cac078c4234d7dac880f4bbb8d56b5701936
parentfe54a438d7ef7ffebb67345f0772f27485591ce7 (diff)
downloadaur-82b6be862296321efe4bac679a632f9c1a9fbb0e.tar.gz
Cleanup
Clean PKGBUILD Refactor gog-stardew-valley script
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD55
-rwxr-xr-x[-rw-r--r--]gog-stardew-valley29
3 files changed, 60 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aa884396129..658ab5e2426 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,13 +6,17 @@ pkgbase = gog-stardew-valley
arch = i686
arch = x86_64
license = custom
+ depends = openal
+ depends = sdl2
optdepends = firejail: Automatically sandbox this application from your OS
source = gog://gog_stardew_valley_2.3.0.4.sh
source = gog-stardew-valley.desktop
source = gog-stardew-valley
sha256sums = 88e1fae7226c7bfa91cb28c137c24867e12b1a0b6e824e6ffe73e1eefc166aac
sha256sums = 1dc48ca70b7274c065ee65e285102b07962096b650a34a898d10d6749039d3ca
- sha256sums = fe0d3cedb10ed9cd4ea5c9c44ce8fc5c7c3f152a51d7e4aef85b7fcbfceac10e
+ sha256sums = 7e03458fab2b426cce514a42663e56efd33d072bd319f513a5c8bdf7f4e09905
+ depends_i686 = lib32-openal
+ depends_i686 = lib32-sdl2
pkgname = gog-stardew-valley
diff --git a/PKGBUILD b/PKGBUILD
index edbff3c66e6..6383cdbbb66 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,49 @@
# 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:
+# libCSteamworks - ??? Not entirely sure what this provides...
+# libsteam_api - ??? Not entirely sure what this provides...
+
pkgname=gog-stardew-valley
pkgver=2.3.0.4
pkgrel=1
pkgdesc="You’ve inherited your grandfather’s old farm plot in Stardew Valley. Armed with hand-me-down tools and a few coins, you set out to begin your new life."
url="http://stardewvalley.net/"
-license=('custom')
-arch=('i686' 'x86_64')
-depends_x86_64=("sdl2" "openal")
-depends_i686=("lib32-openal" "lib32-sdl2")
-# 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=(
+ 'openal'
+ 'sdl2'
+)
+depends_i686=(
+ 'lib32-openal'
+ 'lib32-sdl2'
+)
+optdepends=(
+ 'firejail: Automatically sandbox this application from your OS'
+)
source=(
"gog://${pkgname//-/_}_${pkgver}.sh"
"${pkgname}.desktop"
- "$pkgname"
+ "${pkgname}"
)
sha256sums=(
- "88e1fae7226c7bfa91cb28c137c24867e12b1a0b6e824e6ffe73e1eefc166aac"
- "1dc48ca70b7274c065ee65e285102b07962096b650a34a898d10d6749039d3ca"
- "c17ec2da9bc6df0c15611877033553275bc775ea318c0be4f745efcdfb9b22d1"
+ '88e1fae7226c7bfa91cb28c137c24867e12b1a0b6e824e6ffe73e1eefc166aac'
+ '1dc48ca70b7274c065ee65e285102b07962096b650a34a898d10d6749039d3ca'
+ '7e03458fab2b426cce514a42663e56efd33d072bd319f513a5c8bdf7f4e09905'
+)
+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(){
+package() {
cd "${srcdir}"
# Install game
@@ -40,9 +54,9 @@ package(){
find "${pkgdir}/opt/${pkgname}" -type d -exec chmod 755 {} \;
- install -Dm755 "data/noarch/start.sh" \
+ install -Dm755 "data/noarch/start.sh" \
"${pkgdir}/opt/${pkgname}/"
- install -Dm755 data/noarch/support/*.{sh,shlib} -t \
+ install -Dm755 data/noarch/support/*.{sh,shlib} -t \
"${pkgdir}/opt/${pkgname}/support"
# Desktop integration
@@ -52,5 +66,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-stardew-valley b/gog-stardew-valley
index 6efc13cb345..92d85479c22 100644..100755
--- a/gog-stardew-valley
+++ b/gog-stardew-valley
@@ -1,13 +1,24 @@
-#! /bin/sh
+#! /bin/bash
-run="/opt/gog-stardew-valley/start.sh"
-# The launcher fails unless in its dir.
-cd "/opt/gog-stardew-valley/" || exit 1
+pkgname="gog-stardew-valley"
+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