summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Lansdowne2017-07-08 15:17:14 +0100
committerJoseph Lansdowne2017-07-08 15:17:14 +0100
commita34557a400bd0d4e41fc4c287f5f742802d2769a (patch)
treed8b0e92fb7d468cc577b57efee1a19fdc0eb391b
parent090060d5aed8d31bc11570b28362fe87f5471fba (diff)
downloadaur-a34557a400bd0d4e41fc4c287f5f742802d2769a.tar.gz
7.6.1
no longer supports upstream auto-update
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD98
-rwxr-xr-xdustforce-dustmod27
3 files changed, 104 insertions, 36 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e3a8c9abe701..222746a8ffdf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,8 @@
pkgbase = dustforce-hib-dustmod
pkgdesc = A fast-paced 2D action platformer (Humble Bundle version, with Dustmod)
- pkgver = 1.0+h20141222
+ pkgver = 1.0+h20141222_7.6.1
pkgrel = 1
- url = https://dustkidblog.wordpress.com/2016/03/09/dustmod/
- install = dustforce-hib-dustmod.install
- arch = i686
+ url = https://dustkidblog.wordpress.com/2016/11/19/dustmod-has-updated/
arch = x86_64
license = custom:commercial
depends = mesa
@@ -16,13 +14,18 @@ pkgbase = dustforce-hib-dustmod
depends = libvorbis
depends = libxft
depends = xdg-utils
+ noextract = linux64_drmfree
source = hib://Dustforce-Linux-2014-12-22.sh
source = hib://dustforce_dx_07012015.zip
- source = http://dustkid.com/dmcontent/scripts/main2_drmfree
+ source = http://dustkid.com/getdustmod/linux64_drmfree
+ source = dustmod-patch::http://dustkid.com/backend8/dustmod_package4.php?platform=linux64_drmfree
+ source = dustforce-dustmod
source = dustforce-hib-dustmod.desktop
md5sums = e2fa7efd5b9ec64fc453f32480f63ad4
md5sums = fed1b6d82bdbea66d242eaaaf7d3a2f2
- md5sums = 67f78300d0451755ba897ef3fdec9ac0
+ md5sums = 724ee25c5266f36258d8d93269e4f8a6
+ md5sums = a3f83d73264d14c212d0be249b593235
+ md5sums = 7b30db080ff59c0eba443b14da7c39bc
md5sums = cc98a6127bc6d6cbdcfced14c69327cf
pkgname = dustforce-hib-dustmod
diff --git a/PKGBUILD b/PKGBUILD
index 60a909c0677e..03ea33cec0dc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,18 +3,19 @@
# Commit: https://aur.archlinux.org/cgit/aur.git/commit/?h=dustforce-hib&id=652033563defbd0b002b57a14ab0b4070714e9a4
# Author: Sam S. <smls75@gmail.com>
+# URL used for version checking: http://dustkid.com/backend8/dustmod_version.php
+
pkgname=dustforce-hib-dustmod
-pkgver=1.0+h20141222
+pkgver=1.0+h20141222_7.6.1
_hibver=2014-12-22
_hibver_windows=07012015
pkgrel=1
pkgdesc='A fast-paced 2D action platformer (Humble Bundle version, with Dustmod)'
-url='https://dustkidblog.wordpress.com/2016/03/09/dustmod/'
-arch=('i686' 'x86_64')
+url='https://dustkidblog.wordpress.com/2016/11/19/dustmod-has-updated/'
+arch=('x86_64')
license=('custom:commercial')
depends=('mesa' 'libgl' 'sdl2' 'libxdamage' 'freealut' 'libidn' 'libvorbis'
'libxft' 'xdg-utils')
-install=dustforce-hib-dustmod.install
PKGEXT='.pkg.tar'
DLAGENTS+=('hib::/usr/bin/echo "Could not find %u. Manually download it to \"$(pwd)\", or set up a hib:// DLAGENT in /etc/makepkg.conf."; exit 1')
@@ -22,43 +23,80 @@ _installer="Dustforce-Linux-${_hibver}.sh"
_installer_windows="dustforce_dx_${_hibver_windows}.zip"
source=("hib://${_installer}"
"hib://${_installer_windows}"
- 'http://dustkid.com/dmcontent/scripts/main2_drmfree'
+ 'http://dustkid.com/getdustmod/linux64_drmfree'
+ 'dustmod-patch::http://dustkid.com/backend8/dustmod_package4.php?platform=linux64_drmfree'
+ 'dustforce-dustmod'
'dustforce-hib-dustmod.desktop')
md5sums=('e2fa7efd5b9ec64fc453f32480f63ad4'
'fed1b6d82bdbea66d242eaaaf7d3a2f2'
- '67f78300d0451755ba897ef3fdec9ac0'
+ '724ee25c5266f36258d8d93269e4f8a6'
+ 'a3f83d73264d14c212d0be249b593235'
+ '7b30db080ff59c0eba443b14da7c39bc'
'cc98a6127bc6d6cbdcfced14c69327cf')
+# zip with no top-level directory - will extract manually
+noextract=('linux64_drmfree')
+
-[[ $CARCH == "i686" ]] && _arch='x86' || _arch='x86_64'
+# extracts a Dustmod patch archive into the given directory
+# I haven't worked out any existing archive format that this uses, so this is a
+# simple inline implementation
+unarchive-patch () {
+ in="$1"
+ out="$2"
+
+ cat "$in" | while true; do
+ read -n 8 path_len_hex || break
+ read -n 8 data_len_hex || break
+ printf -v path_len "%d" "0x$path_len_hex"
+ printf -v data_len "%d" "0x$data_len_hex"
+ read -n "$path_len" path
+ mkdir -p "$(dirname "$out/$path")"
+ echo $path
+ if [ "$path" = "dustmod.bin.x86_64_dustmod" ]; then
+ dest="$out/dustmod.bin.x86_64"
+ else
+ dest="$out/$path"
+ fi
+ head -c "$data_len" > "$dest"
+ done
+}
package() {
- cd "$srcdir"
- _installdir=/opt/dustforce-dustmod; _target="$pkgdir"/"$_installdir"
+ cd "$srcdir"
+ _installdir=/opt/dustforce-dustmod; _target="$pkgdir"/"$_installdir"
+
+ # install game files
+ mkdir -p "$pkgdir"/"$_installdir"
+ cp -TRl data/noarch "$pkgdir"/"$_installdir"
+ cp -TRl data/x86_64 "$pkgdir"/"$_installdir"
- # Install game files
- mkdir -p "$pkgdir"/"$_installdir"
- cp -TRl data/noarch "$pkgdir"/"$_installdir"
- cp -TRl data/"$_arch" "$pkgdir"/"$_installdir"
+ # include missing music track from Windows version
+ ln {"Dustforce DX","$pkgdir"/"$_installdir"}/"content/audio/music/Sun Bleach.ogg"
- # Include missing music track from Windows version
- ln {"Dustforce DX","$pkgdir"/"$_installdir"}/"content/audio/music/Sun Bleach.ogg"
+ # install Dustmod
+ unzip -q "$srcdir"/linux64_drmfree -d "$pkgdir"/"$_installdir"/
+ # Apply Dustmod updates, which aren't distributed in the main download
+ unarchive-patch "$srcdir"/dustmod-patch "$pkgdir"/"$_installdir"
- # Install Dustmod
- cp "$srcdir"/main2_drmfree "$pkgdir"/"$_installdir"/content/scripts/main2
+ # Dustmod expects a version of curl we can't really obtain, but works with
+ # the version distributed with Dustforce
+ pushd "$pkgdir"/"$_installdir"/"lib64" > /dev/null
+ ln -s libcurl.so.{3,4}
+ popd > /dev/null
- # Fix permissions
- find "$pkgdir" -type d -exec chmod 755 "{}" +
- find "$pkgdir" -type f -exec chmod 644 "{}" +
- chmod 755 "$_target"/Dustforce.bin."$_arch"
+ # fix permissions
+ find "$pkgdir" -type d -exec chmod 755 "{}" +
+ find "$pkgdir" -type f -exec chmod 644 "{}" +
+ chmod 755 "$_target"/Dustforce.bin.x86_64
+ chmod 755 "$_target"/dustmod.bin.x86_64
- # Install icon & desktop entry
- install -Dm644 data/noarch/Dustforce.png \
- "$pkgdir"/usr/share/pixmaps/dustforce-dustmod.png
- install -Dm644 "$pkgname".desktop \
- "$pkgdir"/usr/share/applications/"$pkgname".desktop
+ # install icon & desktop entry
+ install -Dm644 data/noarch/Dustforce.png \
+ "$pkgdir"/usr/share/pixmaps/dustforce-dustmod.png
+ install -Dm644 "$pkgname".desktop \
+ "$pkgdir"/usr/share/applications/"$pkgname".desktop
- # Install launcher symlink
- install -d "$pkgdir"/usr/bin
- ln -s "$_installdir"/Dustforce.bin."$_arch" \
- "$pkgdir"/usr/bin/dustforce-dustmod
+ # install launcher
+ install -d "$pkgdir"/usr/bin
+ install -Dm755 dustforce-dustmod "$pkgdir"/usr/bin/dustforce-dustmod
}
diff --git a/dustforce-dustmod b/dustforce-dustmod
new file mode 100755
index 000000000000..4ad7fdb24196
--- /dev/null
+++ b/dustforce-dustmod
@@ -0,0 +1,27 @@
+#! /usr/bin/env sh
+
+# Dustmod segfaults when it can't write to its install dir, so it's horrible
+# hack time: create a temp dir, symlink all the game files to it, and run from
+# there
+
+temp_dir=
+
+cleanup () {
+ test -n "$temp_dir" && rm -rf "$temp_dir"
+ exit "$1"
+}
+trap 'cleanup 1' INT TERM
+
+
+temp_dir="$(mktemp -d)" || cleanup 1
+cd "$temp_dir"
+for f in /opt/dustforce-dustmod/*; do
+ if [ "$(basename "$f")" = "dustmod.bin.x86_64" ]; then
+ cp "$f" .
+ else
+ ln -s "$f" || cleanup 1
+ fi
+done
+
+./dustmod.bin.x86_64
+cleanup "$?"