summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD45
-rwxr-xr-xgog-darkest-dungeon3
-rw-r--r--gog-darkest-dungeon.desktop12
5 files changed, 32 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 46c884a1a5d..f74489b3abb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gog-darkest-dungeon
pkgdesc = Darkest Dungeon is a challenging gothic roguelike turn-based RPG about the psychological stresses of adventuring.
- pkgver = 21142
+ pkgver = 24839
pkgrel = 1
url = https://www.gog.com/game/darkest-dungeon
arch = i686
@@ -8,13 +8,9 @@ pkgbase = gog-darkest-dungeon
groups = games
license = custom
makedepends = lgogdownloader>=2.25
- noextract = gog_darkest_dungeon_21142.sh
- source = gog_darkest_dungeon_21142.sh::gogdownloader://darkest_dungeon/en3installer0
- source = gog-darkest-dungeon
- source = gog-darkest-dungeon.desktop
- md5sums = 4b43065624dbab74d794c56809170588
- md5sums = 23b66329f52fb4a9073ec7f1589625cc
- md5sums = 1fc48d384bc8e36749174ece86c6706e
+ noextract = gog_darkest_dungeon_24839.sh
+ source = gog_darkest_dungeon_24839.sh::gogdownloader://darkest_dungeon/en3installer0
+ md5sums = 2a04beb04b3129b4bd68b4dd9023e82d
pkgname = gog-darkest-dungeon
diff --git a/.gitignore b/.gitignore
index 3f3a6f1e470..244462e4b83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
pkg/
src/
-*.pkg.tar.xz
-gog_darkest_dungeon_2.1.0.2.sh
+*.pkg.tar.*
+gog_darkest_dungeon_*.sh
+gog_darkest_dungeon_*.sh.part
+frontendstarted
diff --git a/PKGBUILD b/PKGBUILD
index 3766eece37a..3be47374bae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
pkgname=gog-darkest-dungeon
-pkgver=21142
+pkgver=24839
pkgrel=1
_gamename=${pkgname#gog-}
_gamename_=${_gamename//-/_}
@@ -9,12 +9,8 @@ arch=("i686" "x86_64")
url="https://www.gog.com/game/darkest-dungeon"
license=("custom")
groups=("games")
-source=("gog_darkest_dungeon_${pkgver}.sh::gogdownloader://${_gamename_}/en3installer0"
- "${pkgname}"
- "${pkgname}.desktop")
-md5sums=('4b43065624dbab74d794c56809170588'
- '23b66329f52fb4a9073ec7f1589625cc'
- '1fc48d384bc8e36749174ece86c6706e')
+source=("gog_darkest_dungeon_${pkgver}.sh::gogdownloader://${_gamename_}/en3installer0")
+md5sums=('2a04beb04b3129b4bd68b4dd9023e82d')
noextract=("gog_darkest_dungeon_${pkgver}.sh")
# Register lgogdownloader as a download agent
DLAGENTS+=('gogdownloader::/usr/bin/lgogdownloader --download-file=%u -o %o')
@@ -29,18 +25,20 @@ prepare() {
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/}' \
+ sed -i '/MojoSetup.platform.installdesktopmenuitem/,+2d' \
+ $srcdir/gog_darkest_dungeon_${pkgver}/scripts/mojosetup_mainline.lua
+
+ # Remove interaction by setting optional opions to required
+ # Set all option for the last two options (desktp + menu item) to be required
+ sed -i '129,${/^ Setup.Option/,/^ }/s/required = false/required = 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
@@ -50,16 +48,21 @@ 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
+ ./startmojo.sh --destination $pkgdir/opt/gog/$_gamename --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
+ chmod +x $pkgdir/opt/gog/$_gamename/start.sh
+ chmod +x $pkgdir/opt/gog/$_gamename/game/darkest.bin.x86
+ chmod +x $pkgdir/opt/gog/$_gamename/game/darkest.bin.x86_64
- install -Dm 755 $srcdir/$pkgname $pkgdir/usr/bin/$pkgname
- install -Dm 644 $srcdir/gog_darkest_dungeon_${pkgver}/data/noarch/support/icon.png $pkgdir/usr/share/pixmaps/$pkgname.png
- install -Dm 644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
+ # Remove makepkg paths from desktop file and move to share
+ sed -i "s,$pkgdir,,g" $pkgdir/opt/gog/$_gamename/.mojosetup/gog_com-Darkest_Dungeon_1.desktop
+ install -Dm 644 $pkgdir/opt/gog/$_gamename/.mojosetup/gog_com-Darkest_Dungeon_1.desktop $pkgdir/usr/share/applications/$pkgname.desktop
+
+ # Install EULA
install -Dm 644 $srcdir/gog_darkest_dungeon_${pkgver}/data/noarch/docs/End\ User\ License\ Agreement.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
+
+ # Remove metafiles
+ rm -r $pkgdir/opt/gog/$_gamename/.mojosetup
}
# vim:set ts=2 sw=2 et:
diff --git a/gog-darkest-dungeon b/gog-darkest-dungeon
deleted file mode 100755
index 786627cd777..00000000000
--- a/gog-darkest-dungeon
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-cd /opt/gog-darkest-dungeon
-./start.sh
diff --git a/gog-darkest-dungeon.desktop b/gog-darkest-dungeon.desktop
deleted file mode 100644
index ad38204161c..00000000000
--- a/gog-darkest-dungeon.desktop
+++ /dev/null
@@ -1,12 +0,0 @@
-[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