summaryrefslogtreecommitdiffstats
path: root/games/bstone/bstone.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/bstone/bstone.SlackBuild')
-rw-r--r--games/bstone/bstone.SlackBuild50
1 files changed, 38 insertions, 12 deletions
diff --git a/games/bstone/bstone.SlackBuild b/games/bstone/bstone.SlackBuild
index 8659bccb19..1c518cdd88 100644
--- a/games/bstone/bstone.SlackBuild
+++ b/games/bstone/bstone.SlackBuild
@@ -1,11 +1,21 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for bstone
-# 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.
+# 20230111 bkw: update for v1.2.12.
+
+# 20211004 bkw:
+# - update for v1.2.11.
+# - include .txt version of license.
+# - datadir.diff changed again.
+# - update .desktop file.
+# - better README doc on how to play the full version.
+
+# 20201219 bkw: update for v1.2.9.
# 20200804 bkw: update for v1.2.8. datadir.diff changed again.
# 20200222 bkw: update for v1.1.16_2.
# 20191127 bkw: update for v1.1.14. datadir.diff had to change so we can't
@@ -14,10 +24,13 @@
# 20170807 bkw: update for v1.1.8, use upstream's icon instead of mine.
# 20170621 bkw: fix build on -current
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=bstone
-VERSION=${VERSION:-1.2.8}
+VERSION=${VERSION:-1.2.12}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCVER=${VERSION/_/-}
@@ -29,7 +42,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
@@ -54,7 +71,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$SRCVER
-tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz || tar xvf $CWD/v$SRCVER.tar.gz
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
cd $PRGNAM-$SRCVER
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
@@ -67,7 +84,8 @@ patch -p1 < $CWD/datadir.diff
# make install and install/strip are borked, do manual install.
# always include the shareware data in the package, the game will
-# only use it if the user hasn't installed the full version.
+# automatically use it if the user hasn't installed the full version,
+# or offer a choice of full version or shareware if he has both.
mkdir -p build
cd build
cmake \
@@ -76,11 +94,11 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
- -DCMAKE_BUILD_TYPE=Release ../src
+ -DCMAKE_BUILD_TYPE=Release ..
make
mkdir -p $PKG/usr/games $PKG/usr/share/games/$PRGNAM
- install -s -m0755 $PRGNAM $PKG/usr/games
+ install -s -m0755 src/$PRGNAM $PKG/usr/games
unzip $CWD/1bs30.zip
unzip BSSW30.SHR \*.BS1
@@ -94,13 +112,21 @@ cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE README.md *.doc src/bstone_todo.txt $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# the original source code license is supplied only as a MS word .doc
+# file. we ship it as-is, but rename it to something without spaces in
+# the filename. also, ship a pre-converted text version (created with
+# wvText, then hand-edited to fix the formatting).
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+LIC=blake_stone_source_code_license
+mkdir -p $PKGDOC
+cp -a LICENSE README.md TODO.md CHANGE* $PKGDOC
+cp -a *.doc $PKGDOC/$LIC.doc
+cat $CWD/$LIC.txt > $PKGDOC/$LIC.txt
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE