summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJeremy Audet2019-02-02 17:24:11 -0500
committerJeremy Audet2019-02-02 17:24:11 -0500
commit3f7174baa5d884f00803667a4d8f1cec4c64c2b6 (patch)
tree203537375e48b0d7cb4722b6ce5e49a65f0afd04 /PKGBUILD
parent9dd665a69925001bda65f0810e10e48a93060d39 (diff)
downloadaur-gog-transistor.tar.gz
Overhaul package
Among other things: * A newer package is available on GOG. Update the version and related logic. * Make the .desktop file comply with desktop-file-validate's suggestions. * Drop references to firejail. The stuff is nice, but I don't know how to maintain it. * Drop references to lgogdownloader. I've never been able to make it work end-to-end. Use the "local" pseudo-schema instead. * Drop PKGEXT override. It's better to respect the user's makepkg.conf and let them insert such customizations.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD95
1 files changed, 49 insertions, 46 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3e8e7d963fa..c59b919843f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,54 +1,57 @@
-# Maintainer: Patrice Peterson <runiq@archlinux.us>
-# Thanks to: Ainola for the base PKGBUILD (gog-undertale)
+# Maintainer: Jeremy Audet <jerebear@protonmail.com>
+# Contributor: Patrice Peterson <runiq@archlinux.us>
+# shellcheck shell=bash
+# shellcheck disable=SC2034,SC2154
pkgname=gog-transistor
-pkgver=2.0.0.3
+# pkgver was once 2.0.0.3
+epoch=2
+pkgver='1.50440.8123.23365'
pkgrel=1
-pkgdesc="A sci-fi themed action RPG that invites you to wield an extraordinary weapon of unknown origin as you fight through a stunning futuristic city"
-url="http://www.supergiantgames.com/games/transistor"
+pkgdesc='A sci-fi themed action RPG that invites you to wield an extraordinary weapon. (GOG version)'
+url='https://www.gog.com/game/transistor'
license=('custom')
+groups=('games' 'gog')
arch=('i686' 'x86_64')
-# Dependencies are included with the gog_transistor_$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')
-source=(
- "gog://${pkgname//-/_}_${pkgver}.sh"
- "${pkgname}.desktop"
- "$pkgname")
-sha256sums=('46bc519d331bbebc1d155b06bf5407e2846c2bf945c9a06dd34182184c3792fd'
- '1582e8bad6e6b5908afc6a63bc637f99f11c9b1e04dbec732410a4ffb7667eca'
- '0e2fac1f46ae0e39a396e5a18be580bd3489709b5d495192b8b32576f71ce5c1')
-
-# 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"
+source=("local:///transistor_${pkgver//./_}.sh"
+ "${pkgname}.desktop"
+ "$pkgname")
+sha256sums=('a02dc578764a59296431dcbb1fc3d1b9f57514bd40936a6bd909e38e8797823e'
+ '091b5834175bd992eb3a9cafc20810223a63eca80dd8ca3491ac47c2bf2aaea1'
+ 'aa9ae97bd05a39aaac441323aeaa6b69abf849c2a5ce1e5ff751c2a380880a72')
+
+# ABS automagically figures out how to extract this game file. If said magic
+# starts failing in the future, see prepare() in gog-pyre.
+
+prepare() {
+ # Many files have permissions set to 0700.
+ find "${srcdir}/data/noarch/game" -type f -print0 \
+ | xargs -0 chmod 644
+ find . -type f -name 'Transistor.bin.*' -print0 \
+ | xargs -0 chmod 755
+}
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"
+ # game files
+ install -d "${pkgdir}/opt/${pkgname}"
+ cp -rt "${pkgdir}/opt/${pkgname}" "${srcdir}/data/noarch/"*
+
+ # launcher
+ chmod 755 "${pkgdir}/opt/${pkgname}/start.sh"
+ install -Dm755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+
+ # desktop environment integration
+ install -Dm644 \
+ "${srcdir}/data/noarch/support/icon.png" \
+ "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ install -Dm644 \
+ "${srcdir}/${pkgname}.desktop" \
+ "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+
+ # license
+ install -Dm644 \
+ "${srcdir}/data/noarch/docs/End User License Agreement.txt" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
+
+# vim: ts=2 sw=2 et: