aboutsummaryrefslogtreecommitdiff
path: root/games/bloodcm/bloodcm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/bloodcm/bloodcm.SlackBuild')
-rw-r--r--games/bloodcm/bloodcm.SlackBuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/games/bloodcm/bloodcm.SlackBuild b/games/bloodcm/bloodcm.SlackBuild
new file mode 100644
index 000000000000..fafe7279410b
--- /dev/null
+++ b/games/bloodcm/bloodcm.SlackBuild
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# Slackware build script for bloodcm
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Just repacks the data, no compiling or executables.
+# No icon or .desktop, because no executables.
+
+PRGNAM=bloodcm
+VERSION=${VERSION:-02.2016}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+ARCH=noarch
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+# depending on what the file was downloaded with, it'll be named
+# either of these:
+ZIPFILE="38-blood-crossmatching"
+[ -e $CWD/$ZIPFILE ] || ZIPFILE="${PRGNAM}_v${VERSION}.zip"
+
+# directory inside the zipfile containing the stuff we want. the
+# rest is binaries for windows.
+DIRNAME="BloodCM"
+
+# this needs to match eduke32.SlackBuild. the wrapper script for
+# eduke32 looks here for mods, and symlinks them into the user's
+# ~/.eduke32/ so the game can find them.
+EDUKEDIR=/usr/share/games/eduke32
+
+# we don't even need a $TMP/$PRGNAM-$VERSION, just extract
+# straight into $PKG
+rm -rf $PKG/$EDUKEDIR
+mkdir -p $TMP $PKG/$EDUKEDIR $OUTPUT
+cd $PKG/$EDUKEDIR
+unzip $CWD/$ZIPFILE "$DIRNAME/*"
+find $DIRNAME -type f -print0 | xargs -0 chmod 644
+find $DIRNAME -type d -print0 | xargs -0 chmod 755
+
+# don't ship an empty texture cache
+rm -f $DIRNAME/textures $DIRNAME/textures.cache
+
+# upstream has no docs, we'll include our own README, which tells
+# the user how to run the game.
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}