summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordplusplus2022-02-12 02:14:18 -0800
committerdplusplus2022-02-12 02:23:13 -0800
commit6acb04dd394b2abc4318b4e88c307c31a447e99e (patch)
treee9c0dfe978cd2a10e415251e5242d3faef431ae8
downloadaur-6acb04dd394b2abc4318b4e88c307c31a447e99e.tar.gz
Working PKGBUILD and other files for Death Road to Canada (GOG version)
-rw-r--r--.SRCINFO26
-rw-r--r--0000-start.sh.patch54
-rw-r--r--PKGBUILD70
-rw-r--r--death-road-to-canada-gog26
-rw-r--r--death-road-to-canada-gog.desktop7
-rw-r--r--death-road-to-canada-gog.profile42
6 files changed, 225 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f827de388e4c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = death-road-to-canada-gog
+ pkgdesc = Randomly-Generated Road Trip Action-RPG
+ pkgver = 20210402
+ pkgrel = 1
+ url = http://www.deathroadtocanada.com
+ arch = x86_64
+ groups = games
+ groups = gog
+ license = custom
+ makedepends = p7zip
+ depends = glu
+ depends = sdl2_mixer
+ optdepends = firejail: sandboxing
+ options = !strip
+ source = gog://death_road_to_canada_liver_update_46139.sh
+ source = death-road-to-canada-gog
+ source = death-road-to-canada-gog.desktop
+ source = death-road-to-canada-gog.profile
+ source = 0000-start.sh.patch
+ sha512sums = 2492170d69788a9e9fbea1ade2039f0f92d88b8152ec1fb0711bd88dbcd9c0ddcd7e869e566c41057cb1035e40fab8e767960c51e42d62bda7b11fce4eccb4af
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
+
+pkgname = death-road-to-canada-gog
diff --git a/0000-start.sh.patch b/0000-start.sh.patch
new file mode 100644
index 000000000000..49d0681bf4a6
--- /dev/null
+++ b/0000-start.sh.patch
@@ -0,0 +1,54 @@
+--- start.sh
++++ start.sh
+@@ -1,31 +1,30 @@
+-#!/bin/bash
++#!/bin/bash
+ # GOG.com (www.gog.com)
+ # Game
+
+-# Initialization
+-CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+-cd "${CURRENT_DIR}"
+-source support/gog_com.shlib
+-
+-# Game info
+-GAME_NAME="$(get_gameinfo 1)"
+-VERSION="$(get_gameinfo 2)"
+-VERSION_DEV="$(get_gameinfo 3)"
++# Initialization
++CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
++cd "${CURRENT_DIR}"
++source support/gog_com.shlib
++
++# Game info
++GAME_NAME="$(get_gameinfo 1)"
++VERSION="$(get_gameinfo 2)"
++VERSION_DEV="$(get_gameinfo 3)"
+
+ # Actions
+-run_game() {
+-echo "Running ${GAME_NAME}"
+-cd "${CURRENT_DIR}/game"
+-chmod +x *
+- ./"prog-linux-GOG"
++run_game() {
++ echo "Running ${GAME_NAME}"
++ cd "${CURRENT_DIR}/game"
++ ./"prog-linux-GOG"
+
+ }
+-default() {
+-run_game
+-}
++default() {
++ run_game
++}
+
+ # Options
+-define_option "-s" "--start" "start ${GAME_NAME}" "run_game" "$@"
++define_option "-s" "--start" "start ${GAME_NAME}" "run_game" "$@"
+
+ # Defaults
+-standard_options "$@"
+\ No newline at end of file
++standard_options "$@"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3a8c06ca7bb2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: dplusdplus <echo cmFuZG9tdGVzdG5hbWUtYXQtZ21haWwoZG90KWNvbQo= | base64 -d>
+
+_pkgname=death-road-to-canada
+pkgname=${_pkgname}-gog
+pkgver=20210402
+pkgrel=1
+arch=('x86_64')
+license=(custom)
+groups=('games' 'gog')
+
+pkgdesc="Randomly-Generated Road Trip Action-RPG"
+url="http://www.deathroadtocanada.com"
+
+depends=(
+ 'glu'
+ 'sdl2_mixer'
+)
+makedepends=(
+ 'p7zip'
+)
+optdepends=(
+ 'firejail: sandboxing'
+)
+
+source=(
+ "gog://death_road_to_canada_liver_update_46139.sh"
+ "${pkgname}"
+ "${pkgname}.desktop"
+ "${pkgname}.profile"
+ "0000-start.sh.patch"
+)
+sha512sums=(
+ '2492170d69788a9e9fbea1ade2039f0f92d88b8152ec1fb0711bd88dbcd9c0ddcd7e869e566c41057cb1035e40fab8e767960c51e42d62bda7b11fce4eccb4af'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+)
+options=('!strip')
+
+# You need to download the gog.com installer file manually or with lgogdownloader.
+DLAGENTS+=("gog::/usr/bin/echo %u - This is is not a real URL, you need to download the GOG file manually to \"$PWD\" or setup a gog:// DLAGENT. Read this PKGBUILD for more information.")
+
+package() {
+ install -d "${pkgdir}/opt/${pkgname}"
+
+ cp -r "data/noarch/game/" "${pkgdir}/opt/${pkgname}/"
+ install -D -m 755 "data/noarch/start.sh" "${pkgdir}/opt/${pkgname}/"
+ install -D -m 444 "data/noarch/gameinfo" "${pkgdir}/opt/${pkgname}/"
+ install -D -m 755 data/noarch/support/*.{sh,shlib} --target-directory="${pkgdir}/opt/${pkgname}/support/"
+ install -D -m 644 "data/noarch/support/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+
+
+ install -d "${pkgdir}/usr/bin"
+ install -D -m644 "${pkgname}" "${pkgdir}/usr/bin"
+ chmod 555 "${pkgdir}/usr/bin/${pkgname}"
+
+
+ patch "${pkgdir}/opt/${pkgname}/start.sh" "0000-start.sh.patch"
+ chmod 755 "${pkgdir}/opt/${pkgname}/start.sh"
+
+
+ install -D -m644 ${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+
+ install -D -m644 "data/noarch/docs/End User License Agreement.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # Install firejail profile
+ install -D -m644 "${pkgname}.profile" "${pkgdir}/etc/firejail/${pkgname}.profile"
+
+}
diff --git a/death-road-to-canada-gog b/death-road-to-canada-gog
new file mode 100644
index 000000000000..fc492000a700
--- /dev/null
+++ b/death-road-to-canada-gog
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+pkgname="death-road-to-canada-gog"
+pkgdir="/opt/${pkgname}"
+run="${pkgdir}/start.sh"
+run_firejail="firejail --profile=/etc/firejail/death-road-to-canada-gog.profile ${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!"
+ eval "${run_firejail}"
+ elif [[ -f "/etc/firejail/${pkgname}.profile" ]]; then
+ echo "Firejail profile for ${pkgname} found in /etc/firejail/"
+ echo "Enforcing a sandbox!"
+ eval "${run_firejail}"
+ else
+ echo "No Firejail profile detected!"
+ echo "Skipping Firejail sandbox..."
+ eval "${run}"
+ fi
+else
+ ${run}
+fi
diff --git a/death-road-to-canada-gog.desktop b/death-road-to-canada-gog.desktop
new file mode 100644
index 000000000000..9a9c5622be81
--- /dev/null
+++ b/death-road-to-canada-gog.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Death Road to Canada
+Comment=Randomly Generated Road Trip Action-RPG
+Exec=death-road-to-canada-gog
+Icon=death-road-to-canada-gog
+Type=Application
+Categories=Games
diff --git a/death-road-to-canada-gog.profile b/death-road-to-canada-gog.profile
new file mode 100644
index 000000000000..9dd1f8978cf2
--- /dev/null
+++ b/death-road-to-canada-gog.profile
@@ -0,0 +1,42 @@
+include death-road-to-canada-gog.local
+include globals.local
+
+# Death Road to Canada configuration folders
+noblacklist ${HOME}/.madgarden/DR2C
+mkdir ${HOME}/.madgarden/DR2C
+whitelist ${HOME}/.madgarden/DR2C
+
+include disable-common.inc
+include disable-devel.inc
+include disable-exec.inc
+include disable-interpreters.inc
+include disable-programs.inc
+include disable-write-mnt.inc
+include disable-xdg.inc
+
+# Disable network access
+net none
+
+apparmor
+caps.drop all
+nodvd
+nogroups
+noinput
+nonewprivs
+noroot
+notv
+nou2f
+novideo
+seccomp
+shell none
+tracelog
+
+disable-mnt
+private-cache
+private-dev
+private-etc machine-id
+private-opt death-road-to-canada-gog
+private-tmp
+
+dbus-user none
+dbus-system none