summaryrefslogtreecommitdiffstats
path: root/games/typhoon_2001/typhoon_2001.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/typhoon_2001/typhoon_2001.SlackBuild')
-rw-r--r--games/typhoon_2001/typhoon_2001.SlackBuild49
1 files changed, 29 insertions, 20 deletions
diff --git a/games/typhoon_2001/typhoon_2001.SlackBuild b/games/typhoon_2001/typhoon_2001.SlackBuild
index 00961e63eb..fe73e942b0 100644
--- a/games/typhoon_2001/typhoon_2001.SlackBuild
+++ b/games/typhoon_2001/typhoon_2001.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# SlackBuild script for Typhoon 2001
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
@@ -11,11 +11,21 @@
# 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).
+# 20230107 bkw: BUILD=4, forgot the SlackBuild in the doc dir.
+
+# 20211216 bkw: BUILD=3
+# - make sound work OOTB: run binary with aoss wrapper.
+
+# 20211012 bkw: BUILD=2
+# - binary in /usr/games.
+# - new-style icons.
+# - fix typo in README and slack-desc.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=typhoon_2001
VERSION=${VERSION:-r3992}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -24,9 +34,6 @@ PKGTYPE=${PKGTYPE:-tgz}
# so the check is gone and the ARCH is hardcoded.
ARCH=i586
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -36,6 +43,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+
set -e
rm -fr $TMP/$PRGNAM $PKG $TMP/$PRGNAM-$VERSION
@@ -49,32 +58,32 @@ tar xvf $CWD/${PRGNAM}_$VERSION.tar.gz
# Don't trust the ownership/permissions...
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
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
+ $PKG/usr/libexec \
+ $PKGDOC \
+ $PKG/install \
+ $PKG/usr/games
-mv readme_linux.txt $PKG/usr/doc/$PRGNAM-$VERSION
-mv typhoon $PKG/usr/libexec
-mv * $PKG/usr/share/games/$PRGNAM
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+cp -a readme_linux.txt $PKGDOC
+cp -a typhoon $PKG/usr/libexec
+cp -a game *.mod *.dat $PKG/usr/share/games/$PRGNAM
-install -m 0755 $CWD/$PRGNAM $PKG/usr/bin/$PRGNAM
+install -m 0755 $CWD/$PRGNAM $PKG/usr/games/$PRGNAM
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
# 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
+mkdir -p $PKG/usr/share/pixmaps \
+ $PKG/usr/share/icons/hicolor/32x32/apps
+cat $CWD/$PRGNAM.png > $PKG/usr/share/icons/hicolor/32x32/apps/$PRGNAM.png
+ln -s ../icons/hicolor/32x32/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh