summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Beste2017-02-02 22:03:34 -0600
committerDan Beste2017-02-02 22:03:34 -0600
commitfed2e4c4232b7977f9d685dd010941b8bb27baed (patch)
tree6ee0cb0c76a5779827677ada3cd09c0d918bda6f
parent75fa595eb2b7e246dd36167c4f6fe4a931b3a1f5 (diff)
downloadaur-fed2e4c4232b7977f9d685dd010941b8bb27baed.tar.gz
Update scripts
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD81
-rw-r--r--gog-dragonsphere33
-rw-r--r--gog-dragonsphere.desktop10
4 files changed, 102 insertions, 40 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 217f7354b953..cf7856224f4a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,20 @@
pkgbase = gog-dragonsphere
- pkgdesc = A challenging adventure game that will captivate with clever puzzles and thrilling environments.
- pkgver = 1.0.0.1
+ pkgdesc = Owned King Of Callahach! It's been twenty years since your father saved the world by entrapping the evil Sorcerer Sanwe. Now the spell is waning. Sanwe's malevolent force will soon consume the land, and only you can stop him.
+ pkgver = 2.0.0.2
pkgrel = 1
- url = http://www.gog.com/game/dragonsphere
+ url = https://www.gog.com/game/dragonsphere
arch = i686
arch = x86_64
groups = games
+ groups = gog
license = custom
- depends = libpng12
- depends = unionfs-fuse
- source = local://dragonsphere_1.0.0.1.tar.gz
+ optdepends = firejail: Automatically sandbox this application from your OS
+ source = gog://gog_dragonsphere_2.0.0.2.sh
+ source = gog-dragonsphere.desktop
source = gog-dragonsphere
- sha256sums = 27906a6c46b0c4d2b8830f5e363a4c4cf40121ab8f8c0caba81fa83323b6dc03
- sha256sums = 1cb7c00e7bebc3a44ce1e7cce224acc8bda6b6668792bb95b84a2d1a71df8400
+ sha256sums = be0f2536655bf444c31c78767de171103d9b87ad9078b2fbb370416b1f7979ab
+ sha256sums = 765684a1ab55c678f3dce487330a84954b290e6f5b8894d712d24bdb810409b0
+ sha256sums = d18a17f83d1efcf85bcbf479081bccb0433f9891e8822d9ef90e606a0dfb0d20
pkgname = gog-dragonsphere
diff --git a/PKGBUILD b/PKGBUILD
index 743759c59926..be4dd22e5d1c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,64 @@
-# Maintainer : André Fettouhi <a.fettouhi@gmail.com>
+# Maintainer: Dan Beste <dan.ray.beste@gmail.com>
+# Thanks to: Ainola for the base PKGBUILD (gog-undertale)
+
+# All dependencies are included with the gog_dragonsphere_$version.sh archive.
pkgname=gog-dragonsphere
-pkgver=1.0.0.1
+pkgver=2.0.0.2
pkgrel=1
-pkgdesc="A challenging adventure game that will captivate with clever puzzles and thrilling environments."
-arch=("i686" "x86_64")
-url="http://www.gog.com/game/dragonsphere"
-license=("custom")
-groups=("games")
-source=("local://dragonsphere_${pkgver}.tar.gz" "gog-dragonsphere")
-sha256sums=('27906a6c46b0c4d2b8830f5e363a4c4cf40121ab8f8c0caba81fa83323b6dc03'
- '1cb7c00e7bebc3a44ce1e7cce224acc8bda6b6668792bb95b84a2d1a71df8400')
-depends=(libpng12 unionfs-fuse)
-#options=('!strip')
-PKGEXT=.pkg.tar
+pkgdesc="Owned King Of Callahach! It's been twenty years since your father saved the world by entrapping the evil Sorcerer Sanwe. Now the spell is waning. Sanwe's malevolent force will soon consume the land, and only you can stop him."
+url="https://www.gog.com/game/dragonsphere"
+license=(
+ 'custom'
+)
+arch=(
+ 'i686'
+ 'x86_64'
+)
+optdepends=(
+ 'firejail: Automatically sandbox this application from your OS'
+)
+source=(
+ "gog://${pkgname//-/_}_${pkgver}.sh"
+ "${pkgname}.desktop"
+ "${pkgname}"
+)
+sha256sums=(
+ 'be0f2536655bf444c31c78767de171103d9b87ad9078b2fbb370416b1f7979ab'
+ '765684a1ab55c678f3dce487330a84954b290e6f5b8894d712d24bdb810409b0'
+ 'd18a17f83d1efcf85bcbf479081bccb0433f9891e8822d9ef90e606a0dfb0d20'
+)
+DLAGENTS=(
+ "gog::/usr/bin/echo %u Download the GOG file to $PWD or set up a gog:// DLAGENT."
+)
+groups=(
+ 'games'
+ 'gog'
+)
+
+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" "${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"
-package() {
- mkdir -p "${pkgdir}"/opt/gog/dragonsphere
- cp -r "${srcdir}"/Dragonsphere/* "${pkgdir}"/opt/gog/dragonsphere
- install -Dm644 "${srcdir}"/Dragonsphere/support/gog-dragonsphere-primary.desktop "${pkgdir}"/usr/share/applications/gog-dragonsphere.desktop
- install -Dm644 "${srcdir}"/Dragonsphere/support/gog-dragonsphere.png "${pkgdir}"/usr/share/pixmaps/gog-dragonsphere.png
- install -Dm644 "${srcdir}"/Dragonsphere/docs/End\ User\ License\ Agreement.txt "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
- install -Dm755 "${srcdir}/gog-dragonsphere" "${pkgdir}/usr/bin/gog-dragonsphere"
-}
+ # 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}"
+}
diff --git a/gog-dragonsphere b/gog-dragonsphere
index be8900870a16..0446d066db8a 100644
--- a/gog-dragonsphere
+++ b/gog-dragonsphere
@@ -1,13 +1,24 @@
-#!/usr/bin/bash
-gogdir="/opt/gog/dragonsphere"
-homedir="$HOME/.gog/dragonsphere"
-mkdir -p "$homedir"/{game,config/data/DRAGON}
+#! /bin/bash
-if [[ ! -e "$homedir/config/dosboxDragonsphere.conf" ]]; then
- cp "$gogdir/dosboxDragonsphere.conf" "$homedir/config/dosboxDragonsphere.conf"
-fi
-
-unionfs "$homedir/config=RW:$gogdir=RO" "$homedir/game"
-"$homedir"/game/start.sh
-fusermount -u "$homedir/game"
+pkgname="gog-dragonsphere"
+pkgdir="/opt/${pkgname}/"
+run="${pkgdir}/start.sh"
+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}"
+fi
diff --git a/gog-dragonsphere.desktop b/gog-dragonsphere.desktop
new file mode 100644
index 000000000000..185a8921dd35
--- /dev/null
+++ b/gog-dragonsphere.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Dragonsphere
+Comment=Newly-crowned King Of Callahach! It's been twenty years since your father saved the world by entrapping the evil Sorcerer Sanwe. Now the spell is waning. Sanwe's malevolent force will soon consume the land, and only you can stop him.
+Exec=gog-dragonsphere
+Icon=gog-dragonsphere
+Type=Application
+Terminal=false
+StartupNotify=true
+Categories=Game;AudioVideo;
+Encoding=UTF-8