diff options
author | Jeremy Audet | 2019-02-02 17:24:11 -0500 |
---|---|---|
committer | Jeremy Audet | 2019-02-02 17:24:11 -0500 |
commit | 3f7174baa5d884f00803667a4d8f1cec4c64c2b6 (patch) | |
tree | 203537375e48b0d7cb4722b6ce5e49a65f0afd04 | |
parent | 9dd665a69925001bda65f0810e10e48a93060d39 (diff) | |
download | aur-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.
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 95 | ||||
-rw-r--r-- | gog-transistor | 16 | ||||
-rw-r--r-- | gog-transistor.desktop | 5 |
5 files changed, 74 insertions, 69 deletions
@@ -1,18 +1,20 @@ pkgbase = gog-transistor - 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 - pkgver = 2.0.0.3 + pkgdesc = A sci-fi themed action RPG that invites you to wield an extraordinary weapon. (GOG version) + pkgver = 1.50440.8123.23365 pkgrel = 1 - url = http://www.supergiantgames.com/games/transistor + epoch = 2 + url = https://www.gog.com/game/transistor arch = i686 arch = x86_64 + groups = games + groups = gog license = custom - optdepends = firejail: Automatically sandbox this application from your OS - source = gog://gog_transistor_2.0.0.3.sh + source = local:///transistor_1_50440_8123_23365.sh source = gog-transistor.desktop source = gog-transistor - sha256sums = 46bc519d331bbebc1d155b06bf5407e2846c2bf945c9a06dd34182184c3792fd - sha256sums = 1582e8bad6e6b5908afc6a63bc637f99f11c9b1e04dbec732410a4ffb7667eca - sha256sums = 0e2fac1f46ae0e39a396e5a18be580bd3489709b5d495192b8b32576f71ce5c1 + sha256sums = a02dc578764a59296431dcbb1fc3d1b9f57514bd40936a6bd909e38e8797823e + sha256sums = 091b5834175bd992eb3a9cafc20810223a63eca80dd8ca3491ac47c2bf2aaea1 + sha256sums = aa9ae97bd05a39aaac441323aeaa6b69abf849c2a5ce1e5ff751c2a380880a72 pkgname = gog-transistor diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..cb74f14df51d --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Blacklist: +* + +# Whitelist: +!.SRCINFO +!.gitignore +!PKGBUILD +!gog-transistor.desktop +!gog-transistor @@ -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: diff --git a/gog-transistor b/gog-transistor index bbad3f45c0ea..b7070dce6c0f 100644 --- a/gog-transistor +++ b/gog-transistor @@ -1,13 +1,5 @@ -#! /bin/sh +#!/usr/bin/bash -run="/opt/gog-transistor/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 +# Setting TERM prevents the application from crashing with "System.Exception: +# Magic number is wrong: 542." See: https://github.com/mono/mono/issues/11557 +TERM=xterm /opt/gog-transistor/start.sh diff --git a/gog-transistor.desktop b/gog-transistor.desktop index 8eec1ea94092..47369023aa34 100644 --- a/gog-transistor.desktop +++ b/gog-transistor.desktop @@ -1,10 +1,9 @@ [Desktop Entry] Name=Transistor -Comment=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. +Comment=A sci-fi themed action RPG that invites you to wield an extraordinary weapon (GOG version) Exec=gog-transistor Icon=gog-transistor Type=Application Terminal=false StartupNotify=true -Categories=Game;AudioVideo; -Encoding=UTF-8 +Categories=Game |