summaryrefslogtreecommitdiff
path: root/games/mrrescue/mrrescue.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-04-15 19:55:05 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-19 10:52:25 +0700
commite798e3a0be92edd2634733790d1ef28a2ef1ff7e (patch)
tree15448c6599dde2a070e1db69e9ee0abd8937cdd2 /games/mrrescue/mrrescue.SlackBuild
parent67898849d2bb03132ad004ca94baef46e0819435 (diff)
downloadslackbuilds-e798e3a0be92edd2634733790d1ef28a2ef1ff7e.tar.gz
games/mrrescue: Updated for version 1.02e+20180818_a5be73c.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
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