slackbuilds_ponce/games/bloodcm/bloodcm.SlackBuild
B. Watson a4a0a0fdce
games/bloodcm: Remove template comment.
Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2021-10-13 00:52:34 +07:00

70 lines
1.9 KiB
Bash

#!/bin/bash
# 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.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=bloodcm
VERSION=${VERSION:-12.2016}
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
# 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"
[ -e $CWD/$ZIPFILE ] || ZIPFILE="${PRGNAM}_${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