2010-05-12 04:53:49 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# SlackBuild script for Typhoon 2001
|
|
|
|
# Written by B. Watson (yalhcru@gmail.com)
|
|
|
|
|
|
|
|
# This game is binary only and works like a DOS game (it expects to
|
|
|
|
# be run from its own directory), so for system-wide installation it
|
|
|
|
# needs a symlink forest in the user's home directory... except the
|
|
|
|
# typhoon.cfg needs to be a real file and be writable by the user.
|
|
|
|
# (it will be created the first time the game is run).
|
2010-05-13 06:27:24 +08:00
|
|
|
|
|
|
|
# Note to SBo admins: please don't change the ARCH line to read
|
|
|
|
# ARCH=${ARCH:-i486}, since this is a binary-only package (users might get
|
|
|
|
# confused seeing a so-called x86_64 package that really contains an
|
|
|
|
# x86 binary...)
|
|
|
|
|
2010-05-12 04:53:49 +08:00
|
|
|
PRGNAM=typhoon_2001
|
|
|
|
VERSION=r3992
|
2010-05-13 06:27:24 +08:00
|
|
|
ARCH=i486
|
2010-05-12 04:53:49 +08:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2010-05-13 06:27:24 +08:00
|
|
|
set -e
|
|
|
|
|
2010-05-12 04:53:49 +08:00
|
|
|
rm -fr $TMP/$PRGNAM $PKG $TMP/$PRGNAM-$VERSION
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
|
|
|
|
# Grr. tarball doesn't contain a top-level dir, it pollutes the
|
|
|
|
# current dir...
|
2010-05-13 06:27:24 +08:00
|
|
|
mkdir $TMP/$PRGNAM
|
|
|
|
cd $TMP/$PRGNAM
|
|
|
|
tar xvf $CWD/${PRGNAM}_$VERSION.tar.gz
|
2010-05-12 04:53:49 +08:00
|
|
|
|
|
|
|
# Don't trust the ownership/permissions...
|
|
|
|
chown -R root:root .
|
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
chmod 755 typhoon
|
|
|
|
|
|
|
|
# OK, put everything where it goes in a proper Slack package...
|
|
|
|
mkdir -p $PKG/usr/share/games/$PRGNAM \
|
|
|
|
$PKG/usr/libexec \
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION \
|
|
|
|
$PKG/install \
|
|
|
|
$PKG/usr/bin
|
|
|
|
|
|
|
|
mv readme_linux.txt $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
mv typhoon $PKG/usr/libexec
|
|
|
|
mv * $PKG/usr/share/games/$PRGNAM
|
|
|
|
|
|
|
|
install -m 0755 $CWD/$PRGNAM $PKG/usr/bin/$PRGNAM
|
|
|
|
|
2010-05-13 06:27:24 +08:00
|
|
|
mkdir -p $PKG/usr/share/applications
|
|
|
|
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
2010-05-12 04:53:49 +08:00
|
|
|
|
2010-05-13 06:27:24 +08:00
|
|
|
# Icon extracted from the windows .exe with wrestool, converted with icotool
|
|
|
|
mkdir -p $PKG/usr/share/pixmaps
|
|
|
|
cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
|
|
|
|
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
2010-05-12 04:53:49 +08:00
|
|
|
|
2010-05-13 06:27:24 +08:00
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD.${PKGTYPE:-tgz}
|