blob: 5003ee24d06a0d54a47350241a7939bd38dd1d77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
#!/bin/sh
# Slackware build script for zork
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://sam.zoy.org/wtfpl/ for details.
# VERSION is the last modification date of this script. The various zcode
# files of course have their own version information, but at this late date
# they aren't going to ever change.
# 20140219 bkw: fix .desktop files so they validate.
PRGNAM=zork
VERSION=${VERSION:-20140219}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
ARCH=noarch
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-$VERSION
mkdir $PRGNAM-$VERSION
cd $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
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
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
# 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/README.interpreters > $PKG/usr/doc/$PRGNAM-$VERSION/README.interpreters
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Script wrapper and .desktop files written for this SlackBuild
mkdir -p \
$PKG/usr/share/zork \
$PKG/usr/bin \
$PKG/usr/share/applications
install -m0755 $CWD/zork.sh $PKG/usr/share/zork/zorkwrapper.sh
for game in zork1 zork2 zork3 ztuu; do
ln -s ../share/zork/zorkwrapper.sh $PKG/usr/bin/$game
cat $CWD/desktop/$game.desktop > $PKG/usr/share/applications/$game.desktop
done
ln -s ../share/zork/zorkwrapper.sh $PKG/usr/bin/$PRGNAM
# 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
mkdir -p $PKG/install
sed "s,@VERSION@,$VERSION," $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}
|