summaryrefslogtreecommitdiff
path: root/games/mrrescue/mrrescue.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/mrrescue/mrrescue.SlackBuild')
-rw-r--r--games/mrrescue/mrrescue.SlackBuild22
1 files changed, 16 insertions, 6 deletions
diff --git a/games/mrrescue/mrrescue.SlackBuild b/games/mrrescue/mrrescue.SlackBuild
index 488bda4f29..bcb9ee7117 100644
--- a/games/mrrescue/mrrescue.SlackBuild
+++ b/games/mrrescue/mrrescue.SlackBuild
@@ -6,11 +6,18 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20200415 bkw: update to latest upstream git, commit a5be73c. Required
+# for love-11.x support (someone upgraded love and didn't bother to tell
+# me so this has been broken for ~2 year).
+
PRGNAM=mrrescue
-VERSION=${VERSION:-1.02e}
+VERSION=${VERSION:-1.02e+20180818_a5be73c}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+SRCVER=${VERSION%%+*}
+DIFFVER=${VERSION##*+}
+
ARCH=noarch
CWD=$(pwd)
@@ -27,15 +34,18 @@ rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
-# the source is also the binary. we only need to extract
-# any documentation (which boilds down to one file):
-unzip $CWD/$PRGNAM$VERSION.love LICENSE
+# For releases, the source is also the binary: ".love" files are just
+# zip archives full of lua source code. Since we have to apply a patch
+# from upstream git, we have to extract it, then recreate it.
+unzip $CWD/$PRGNAM$SRCVER.love
+patch -p1 < $CWD/$DIFFVER.diff
+zip -r tmp.zip *
# no find/chmod boilerplate, explicit permissions
mkdir -p $PKG/usr/games
echo '#!/usr/bin/env love' > $PKG/usr/games/$PRGNAM
-cat $CWD/$PRGNAM$VERSION.love >> $PKG/usr/games/$PRGNAM
+cat tmp.zip >> $PKG/usr/games/$PRGNAM
chmod 755 $PKG/usr/games/$PRGNAM
# icon is a piece of data/splash.png from the payload file, chopped up
@@ -48,7 +58,7 @@ mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-install -oroot -groot -m0644 LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+install -oroot -groot -m0644 *.md LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install