2010-05-13 05:29:36 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for transfusion
|
|
|
|
|
|
|
|
# Written by B. Watson (yalhcru@gmail.com)
|
|
|
|
|
2013-01-02 09:31:46 +08:00
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
|
2010-05-13 05:29:36 +08:00
|
|
|
# The game is distributed as a binary. This script just repackages
|
2010-05-13 06:27:22 +08:00
|
|
|
# the binary into a nice Slack package and adds KDE/XFCE desktop integration.
|
2010-05-13 05:29:36 +08:00
|
|
|
|
|
|
|
PRGNAM=transfusion
|
|
|
|
VERSION=${VERSION:-1.05_beta2}
|
|
|
|
SRCVER=$(echo $VERSION | sed 's/_/-/g')
|
2016-08-19 17:07:53 +08:00
|
|
|
ARCH=i586 # possibly a fib, we dunno how the binary was compiled
|
2010-05-13 06:27:22 +08:00
|
|
|
BUILD=${BUILD:-2}
|
2010-05-13 05:29:36 +08:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$SRCVER
|
|
|
|
unzip $CWD/$PRGNAM-$SRCVER.zip
|
|
|
|
cd $PRGNAM-$SRCVER
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION/basetf
|
|
|
|
cp basetf/* $PKG/usr/share/games/$PRGNAM-$VERSION/basetf
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/libexec/$PRGNAM-$VERSION
|
|
|
|
cp $PRGNAM-glx $PRGNAM-dedicated $PKG/usr/libexec/$PRGNAM-$VERSION
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp doc/* $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
# Wrapper script: the game expects to find the basetf/ dir in the
|
|
|
|
# current directory.
|
|
|
|
mkdir -p $PKG/usr/bin
|
|
|
|
sed "s/@VERSION@/$VERSION/g" < $CWD/$PRGNAM.in > $PKG/usr/bin/$PRGNAM-glx
|
|
|
|
chmod 755 $PKG/usr/bin/$PRGNAM-glx
|
|
|
|
( cd $PKG/usr/bin/ && ln -s $PRGNAM-glx $PRGNAM-dedicated )
|
|
|
|
|
2010-05-13 06:27:22 +08:00
|
|
|
|
|
|
|
# Icon extracted from windows transfusion.exe (sorry, it's 32x32)
|
|
|
|
mkdir -p $PKG/usr/share/pixmaps
|
|
|
|
cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/share/applications
|
|
|
|
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
|
|
|
|
2010-05-13 05:29:36 +08:00
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
2010-05-13 06:27:22 +08:00
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
2010-05-13 05:29:36 +08:00
|
|
|
|
|
|
|
cd $PKG
|
2010-05-13 06:27:22 +08:00
|
|
|
/sbin/makepkg -l y -c y $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|