summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandy Carter2016-05-22 03:19:56 -0400
committerSandy Carter2016-05-22 03:19:56 -0400
commit573644db4123592a22a735b631737d3b9c1d6ab6 (patch)
treedde7e3333ccd2fbbee8f05b9115bdbcf80153a34
downloadaur-573644db4123592a22a735b631737d3b9c1d6ab6.tar.gz
Initial add of darkest dungeon package
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD65
-rwxr-xr-xgog-darkest-dungeon3
-rw-r--r--gog-darkest-dungeon.desktop12
5 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..063f3c1e453
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = gog-darkest-dungeon
+ pkgdesc = Darkest Dungeon is a challenging gothic roguelike turn-based RPG about the psychological stresses of adventuring.
+ pkgver = 2.1.0.2
+ pkgrel = 1
+ url = https://www.gog.com/game/darkest-dungeon
+ arch = i686
+ arch = x86_64
+ groups = games
+ license = custom
+ makedepends = lgogdownloader>=2.25
+ noextract = gog_darkest_dungeon_2.1.0.2.sh
+ source = gog_darkest_dungeon_2.1.0.2.sh::gogdownloader://darkest_dungeon/en3installer1
+ source = gog-darkest-dungeon
+ source = gog-darkest-dungeon.desktop
+ md5sums = fe0de7fe3da351b275e5b06e40f79948
+ md5sums = 23b66329f52fb4a9073ec7f1589625cc
+ md5sums = 1fc48d384bc8e36749174ece86c6706e
+
+pkgname = gog-darkest-dungeon
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..3f3a6f1e470
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.pkg.tar.xz
+gog_darkest_dungeon_2.1.0.2.sh
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e7e8f6e03e7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,65 @@
+pkgname=gog-darkest-dungeon
+pkgver=2.1.0.2
+pkgrel=1
+_gamename=${pkgname#gog-}
+_gamename_=${_gamename//-/_}
+
+pkgdesc="Darkest Dungeon is a challenging gothic roguelike turn-based RPG about the psychological stresses of adventuring."
+arch=("i686" "x86_64")
+url="https://www.gog.com/game/darkest-dungeon"
+license=("custom")
+groups=("games")
+source=("gog_darkest_dungeon_${pkgver}.sh::gogdownloader://${_gamename_}/en3installer1"
+ "${pkgname}"
+ "${pkgname}.desktop")
+md5sums=('fe0de7fe3da351b275e5b06e40f79948'
+ '23b66329f52fb4a9073ec7f1589625cc'
+ '1fc48d384bc8e36749174ece86c6706e')
+noextract=("gog_darkest_dungeon_${pkgver}.sh")
+# Register lgogdownloader as a download agent
+DLAGENTS+=('gogdownloader::/usr/bin/lgogdownloader --download-file=%u -o %o')
+
+makedepends=("lgogdownloader>=2.25")
+
+prepare() {
+ # Extract two tars from the shell script.
+ offset=`head -n 519 $srcdir/gog_darkest_dungeon_${pkgver}.sh | wc -c | tr -d " "`
+ mkdir -p $srcdir/gog_darkest_dungeon_${pkgver}
+ bsdtar -C $srcdir/gog_darkest_dungeon_${pkgver} -xf $srcdir/gog_darkest_dungeon_${pkgver}.sh
+ dd if=$srcdir/gog_darkest_dungeon_${pkgver}.sh \
+ skip=1 obs=1024 conv=sync ibs=$offset | \
+ bsdtar -C $srcdir/gog_darkest_dungeon_${pkgver} -xf -
+ # Hardcode the install destination.
+ sed -i "/recommended_destinations/i destination = \"$pkgdir/opt/${pkgname}\"," \
+ $srcdir/gog_darkest_dungeon_${pkgver}/scripts/config.lua
+ # Skip the uninstallers.
+ sed -i "s/support_uninstall = true,/support_uninstall = false,/g" \
+ $srcdir/gog_darkest_dungeon_${pkgver}/scripts/config.lua
+ # Prevent the installer from trying to install the desktop icon
+ sed -i '/postinstall =/d' \
+ $srcdir/gog_darkest_dungeon_${pkgver}/scripts/config.lua
+ # Deactivate all but the two first options (Menu items and desktop icons)
+ sed -i '85,${/^ Setup.Option/,/^ }/s/disabled = false/disabled = true/}' \
+ $srcdir/gog_darkest_dungeon_${pkgver}/scripts/config.lua
+ # Remove interaction by disabling EULAs (covered by custom license)
+ sed -i '/Setup.Eula/ d' \
+ $srcdir/gog_darkest_dungeon_${pkgver}/scripts/config.lua
+}
+
+package() {
+ cd $srcdir/gog_darkest_dungeon_${pkgver}
+ # Install using mojo and force stdio gui to prevent gtk windows from popping
+ # up.
+ ./startmojo.sh --ui stdio
+
+ chmod +x $pkgdir/opt/$pkgname/start.sh
+ chmod +x $pkgdir/opt/$pkgname/game/darkest.bin.x86
+ chmod +x $pkgdir/opt/$pkgname/game/darkest.bin.x86_64
+
+ install -Dm 755 $srcdir/$pkgname $pkgdir/usr/bin/$pkgname
+ install -Dm 644 $srcdir/gog_darkest_dungeon_${pkgver}/data/noarch/game/Icon.bmp $pkgdir/usr/share/pixmaps/$pkgname.bmp
+ install -Dm 644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
+ install -Dm 644 $srcdir/gog_darkest_dungeon_${pkgver}/data/noarch/docs/End\ User\ License\ Agreement.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/gog-darkest-dungeon b/gog-darkest-dungeon
new file mode 100755
index 00000000000..786627cd777
--- /dev/null
+++ b/gog-darkest-dungeon
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /opt/gog-darkest-dungeon
+./start.sh
diff --git a/gog-darkest-dungeon.desktop b/gog-darkest-dungeon.desktop
new file mode 100644
index 00000000000..ad38204161c
--- /dev/null
+++ b/gog-darkest-dungeon.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Value=1.0
+Type=Application
+Name=Darkest Dungeon
+GenericName=Darkest Dungeon
+Comment=Darkest Dungeon
+Icon=gog-darkest-dungeon
+Exec=gog-darkest-dungeon
+Categories=Application;Game;
+Terminal=false
+StartupNotify=true