#!/bin/bash # Slackware build script for maelstrom-mods # Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # It's utterly revolting to me that the "Select art & sound" dialog # in Maelstrom is non-scrollable and can only display 5 entries (two # of which are "Original art & sound" and "Maelstrom 1980", so we only # get 3 to play with). Eventually the game will be fixed, I'm sure. # 20260730 bkw: submitted as new build. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=maelstrom-mods VERSION=${VERSION:-20260730} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} ARCH=noarch if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} set -e MODS="${MODS:-Star_Trek Star_Wars Simpsons_Sounds}" if [ "$( echo $MODS | wc -w )" -gt 3 ]; then cat <&2 *********************************************************************** $( basename $0): MODS has too many names. Limit is 3. *********************************************************************** EOF exit 1 fi PKGMODS=$PKG/opt/maelstrom/mods PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION rm -rf $PKG mkdir -p $TMP $PKGMODS $PKGDOC $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION chown -R root:root . find . -type f -exec chmod 644 {} + -o -type d -exec chmod 755 {} + for i in $MODS; do cp -a $i.zip $PKGMODS [ -e docs/$i ] && cp -a docs/$i $PKGDOC done cp -a *.rst $PKGDOC cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install sed "s,@MODS@,$MODS," < $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE