summaryrefslogtreecommitdiffstats
path: root/games/zork/zork.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/zork/zork.SlackBuild')
-rw-r--r--games/zork/zork.SlackBuild65
1 files changed, 41 insertions, 24 deletions
diff --git a/games/zork/zork.SlackBuild b/games/zork/zork.SlackBuild
index 39b1cd3c47..9a9458000a 100644
--- a/games/zork/zork.SlackBuild
+++ b/games/zork/zork.SlackBuild
@@ -10,21 +10,24 @@
# files of course have their own version information, but at this late date
# they aren't going to ever change.
+# 20211011 bkw:
+# - move executables to /usr/games.
+# - new-style icons.
+# - man page.
+# - reflow readme-*.txt (with fmt -s).
+
# 20140219 bkw: fix .desktop files so they validate.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=zork
-VERSION=${VERSION:-20140219}
+VERSION=${VERSION:-20211011}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
-# 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
@@ -43,49 +46,63 @@ rm -rf $PRGNAM-$VERSION
mkdir $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+
# zork 1/2/3 are z-code version 3 (z3), uu is z5.
-mkdir -p $PKG/usr/share/zcode $PKG/usr/doc/$PRGNAM-$VERSION/invisiclues
+mkdir -p $PKG/usr/share/zcode $PKGDOC/invisiclues
for game in 1 2 3; do
rm -rf *
unzip -a -LL $CWD/zork$game.zip
cat data/zork$game.dat > $PKG/usr/share/zcode/zork$game.z3
- cat readme.txt > $PKG/usr/doc/$PRGNAM-$VERSION/readme-zork$game.txt
+ fmt -s readme.txt > $PKGDOC/readme-zork$game.txt
done
rm -rf *
unzip -a -LL $CWD/ztuu.zip
cat ztuu.z5 > $PKG/usr/share/zcode/ztuu.z5
-cat readme.txt > $PKG/usr/doc/$PRGNAM-$VERSION/readme-ztuu.txt
-cat invisiclues.txt > $PKG/usr/doc/$PRGNAM-$VERSION/invisiclues/ztuu.txt
-cat invisiclues.html > $PKG/usr/doc/$PRGNAM-$VERSION/invisiclues/ztuu.html
+fmt -s readme.txt > $PKGDOC/readme-ztuu.txt
+cat invisiclues.txt > $PKGDOC/invisiclues/ztuu.txt
+cat invisiclues.html > $PKGDOC/invisiclues/ztuu.html
# ztuu has invisiclues in the zip file, add the clues for 1/2/3 also
-cat $CWD/ZorkI.inv > $PKG/usr/doc/$PRGNAM-$VERSION/invisiclues/zork1.txt
-cat $CWD/ZorkII.inv > $PKG/usr/doc/$PRGNAM-$VERSION/invisiclues/zork2.txt
-cat $CWD/ZorkIII.inv > $PKG/usr/doc/$PRGNAM-$VERSION/invisiclues/zork3.txt
+cat $CWD/ZorkI.inv > $PKGDOC/invisiclues/zork1.txt
+cat $CWD/ZorkII.inv > $PKGDOC/invisiclues/zork2.txt
+cat $CWD/ZorkIII.inv > $PKGDOC/invisiclues/zork3.txt
-cat $CWD/README.interpreters > $PKG/usr/doc/$PRGNAM-$VERSION/README.interpreters
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README.interpreters > $PKGDOC/README.interpreters
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
# Script wrapper and .desktop files written for this SlackBuild
mkdir -p \
- $PKG/usr/share/zork \
- $PKG/usr/bin \
- $PKG/usr/share/applications
+ $PKG/usr/share/games/zork \
+ $PKG/usr/games \
+ $PKG/usr/man/man6 \
+ $PKG/usr/share/applications \
+ $PKG/usr/share/pixmaps
-install -m0755 $CWD/zork.sh $PKG/usr/share/zork/zorkwrapper.sh
+install -m0755 $CWD/zorkwrapper.sh $PKG/usr/share/games/zork/zorkwrapper.sh
+gzip -9c < $CWD/zorkwrapper.sh.6 > $PKG/usr/man/man6/zorkwrapper.sh.6.gz
for game in zork1 zork2 zork3 ztuu; do
- ln -s ../share/zork/zorkwrapper.sh $PKG/usr/bin/$game
+ ln -s ../share/games/zork/zorkwrapper.sh $PKG/usr/games/$game
+ ln -s zorkwrapper.sh.6.gz $PKG/usr/man/man6/$game.6.gz
cat $CWD/desktop/$game.desktop > $PKG/usr/share/applications/$game.desktop
done
-ln -s ../share/zork/zorkwrapper.sh $PKG/usr/bin/$PRGNAM
+# zork1 => zork, so we have an exe and a man page matching the package name.
+ln -s zorkwrapper.sh.6.gz $PKG/usr/man/man6/$PRGNAM.6.gz
+ln -s ../share/games/zork/zorkwrapper.sh $PKG/usr/games/$PRGNAM
+
+# Icons created with mkicons.sh, q.v.
+for i in $CWD/icons/*.png; do
+ px=$( basename $i | cut -d. -f1 )
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cat $i > $dir/$PRGNAM.png
+done
-# Icon converted from Z.ICO here:
-# http://www.ifarchive.org/if-archive/infocom/icons/ZorkLetters.zip
-mkdir -p $PKG/usr/share/pixmaps
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/install
sed "s,@VERSION@,$VERSION," $CWD/slack-desc > $PKG/install/slack-desc