summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/zork/README20
-rw-r--r--games/zork/README.interpreters37
-rw-r--r--games/zork/desktop/zork1.desktop10
-rw-r--r--games/zork/desktop/zork2.desktop10
-rw-r--r--games/zork/desktop/zork3.desktop10
-rw-r--r--games/zork/desktop/ztuu.desktop10
-rw-r--r--games/zork/doinst.sh9
-rw-r--r--games/zork/slack-desc19
-rw-r--r--games/zork/zork.SlackBuild83
-rw-r--r--games/zork/zork.info22
-rw-r--r--games/zork/zork.pngbin0 -> 423 bytes
-rw-r--r--games/zork/zork.sh40
12 files changed, 270 insertions, 0 deletions
diff --git a/games/zork/README b/games/zork/README
new file mode 100644
index 0000000000..fae4e15202
--- /dev/null
+++ b/games/zork/README
@@ -0,0 +1,20 @@
+zork (interactive fiction games in z-code format)
+
+Zork was one of the earliest interactive fiction computer games, with
+roots drawn from the original genre game, Colossal Cave Adventure.
+
+This package includes Zork I, Zork II, Zork III, and Zork: The
+Undiscovered Underground (aka "ztuu"). They are owned by Activision,
+which released them as free downloads some time ago. The first 3 Zork
+games were originally developed by Infocom.
+
+To actually play the games, you'll need a z-code interpreter. Currently
+available are frotz and fizmo (text) and zoom (X11). See
+README.interpreters for details. This build includes a shell script
+wrapper so you can run the games from the XFCE or KDE desktop menu,
+or by typing the game name (zork1, zork2, zork3, ztuu) from the shell,
+provided you have at least one interpreter installed.
+
+This package includes the InvisiClues from the original games (as plain
+text, so beware of spoilers). There are also walkthroughs and downloadable
+PDF manuals for the first three games here: http://www.ironrealms.com/zork
diff --git a/games/zork/README.interpreters b/games/zork/README.interpreters
new file mode 100644
index 0000000000..b68a1005f4
--- /dev/null
+++ b/games/zork/README.interpreters
@@ -0,0 +1,37 @@
+The games are distributed as Z-Code story files, installed in
+/usr/share/zcode. Currently, they can be run with either frotz, zoom,
+or fizmo.
+
+frotz requires the full path to the game:
+
+ frotz /usr/share/zcode/zork1.z3
+
+zoom can be run with the full path, like frotz. However, if zoom is
+run with no arguments, it will display a menu of the games available
+in /usr/share/zcode/.
+
+fizmo must be run with the full path, or it can create a menu:
+
+ fizmo-ncursesw # to create an empty ~/.config/fizmo if it doesn't exist
+ fizmo-ncursesw -s /usr/share/zcode
+
+...after which, running fizmo-ncursesw with no arguments will present
+a menu.
+
+The shell script wrapper searches for interpreters and uses the first
+one it finds. The search order is: fizmo frotz zoom. If you have other
+Z-Code games to play, you can use them with the wrapper like so:
+
+1. Copy the Z-Code file to /usr/share/zcode/. The filename should end
+in .zX where X is the Z-Code version number (usually 3 or 5). Also the
+filename shouldn't include any spaces or shell metacharacters.
+
+2. Create a symlink in /usr/bin, with the same name as the
+Z-Code file, minus the .zX extension. The link should point to
+/usr/share/zork/zorkwrapper.sh. Now you can run the game from the
+shell by typing its name.
+
+3. Optional: create a .desktop file for the new game. This can be
+done by copying /usr/share/applications/zork1.desktop and editing it
+appropriately. This step is only needed if you want to be able to run
+the game from the KDE or XFCE desktop menu.
diff --git a/games/zork/desktop/zork1.desktop b/games/zork/desktop/zork1.desktop
new file mode 100644
index 0000000000..f36d86a79f
--- /dev/null
+++ b/games/zork/desktop/zork1.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=Zork I
+GenericName=Interactive Fiction Game
+Comment=Zork: The Great Underground Empire
+Icon=zork
+Exec=zork1
+Terminal=yes
+Type=Application
+Categories=Game;AdventureGame;
diff --git a/games/zork/desktop/zork2.desktop b/games/zork/desktop/zork2.desktop
new file mode 100644
index 0000000000..b81dcde55a
--- /dev/null
+++ b/games/zork/desktop/zork2.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=Zork II
+GenericName=Interactive Fiction Game
+Comment=Zork: The Wizard of Frobozz
+Icon=zork
+Exec=zork2
+Terminal=yes
+Type=Application
+Categories=Game;AdventureGame;
diff --git a/games/zork/desktop/zork3.desktop b/games/zork/desktop/zork3.desktop
new file mode 100644
index 0000000000..5eacddef11
--- /dev/null
+++ b/games/zork/desktop/zork3.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=Zork III
+GenericName=Interactive Fiction Game
+Comment=Zork: The Dungeon Master
+Icon=zork
+Exec=zork3
+Terminal=yes
+Type=Application
+Categories=Game;AdventureGame;
diff --git a/games/zork/desktop/ztuu.desktop b/games/zork/desktop/ztuu.desktop
new file mode 100644
index 0000000000..7da164f061
--- /dev/null
+++ b/games/zork/desktop/ztuu.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=Zork TUU
+GenericName=Interactive Fiction Game
+Comment=Zork: The Undiscovered Underground
+Icon=zork
+Exec=ztuu
+Terminal=yes
+Type=Application
+Categories=Game;AdventureGame;
diff --git a/games/zork/doinst.sh b/games/zork/doinst.sh
new file mode 100644
index 0000000000..3e5691a052
--- /dev/null
+++ b/games/zork/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/games/zork/slack-desc b/games/zork/slack-desc
new file mode 100644
index 0000000000..3d74cd16d2
--- /dev/null
+++ b/games/zork/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+zork: zork (interactive fiction games in z-code format)
+zork:
+zork: Zork was one of the earliest interactive fiction computer games,
+zork: with roots drawn from the original genre game, Colossal Cave Adventure.
+zork:
+zork: This package includes Zork I, Zork II, Zork III, and Zork: The
+zork: Undiscovered Underground. They are owned by Activision, which released
+zork: them as free downloads some time ago. The first 3 Zork games were
+zork: originally developed by Infocom.
+zork:
+zork: If you get stuck, see /usr/doc/zork-@VERSION@/invisiclues/
diff --git a/games/zork/zork.SlackBuild b/games/zork/zork.SlackBuild
new file mode 100644
index 0000000000..da529d6f74
--- /dev/null
+++ b/games/zork/zork.SlackBuild
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+# 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.
+
+PRGNAM=zork
+VERSION=${VERSION:-20121202}
+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}
diff --git a/games/zork/zork.info b/games/zork/zork.info
new file mode 100644
index 0000000000..531571367f
--- /dev/null
+++ b/games/zork/zork.info
@@ -0,0 +1,22 @@
+PRGNAM="zork"
+VERSION="20121202"
+HOMEPAGE="http://www.infocom-if.org/"
+DOWNLOAD="http://www.infocom-if.org/downloads/zork1.zip \
+ http://www.infocom-if.org/downloads/zork2.zip \
+ http://www.infocom-if.org/downloads/zork3.zip \
+ http://www.ifarchive.org/if-archive/infocom/demos/ztuu.zip \
+ http://www.ifarchive.org/if-archive/infocom/hints/invisiclues/ZorkI.inv \
+ http://www.ifarchive.org/if-archive/infocom/hints/invisiclues/ZorkII.inv \
+ http://www.ifarchive.org/if-archive/infocom/hints/invisiclues/ZorkIII.inv"
+DOWNLOAD_x86_64=""
+MD5SUM="f6dd915ea7315985536efb39154f3433 \
+ ab521209656948516351996263a8ad34 \
+ c1a15e9c56267366fa54476baa6fb7d4 \
+ 52e614b1c77d1e20e0c8c93bf2c6d8b2 \
+ fe057b32ca6193f78b087874a2834a85 \
+ 79f0829d5387858ec33569e84b3ff65b \
+ 86dafe47e5bf8745f9d07a63b4b867a4"
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/games/zork/zork.png b/games/zork/zork.png
new file mode 100644
index 0000000000..911641be09
--- /dev/null
+++ b/games/zork/zork.png
Binary files differ
diff --git a/games/zork/zork.sh b/games/zork/zork.sh
new file mode 100644
index 0000000000..507091bbf7
--- /dev/null
+++ b/games/zork/zork.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# shell script wrapper for zork games. Finds an interpreter based
+# on what's installed, finds the zcode file based on $0.
+
+# This script is only meant to work with the files installed by
+# zork.SlackBuild, so it's dumber than a general-purpose script
+# would be. In particular, it chokes on filenames with spaces
+# in them (but there aren't any installed by the SlackBuild)
+
+ZCODEPATH=/usr/share/zcode
+
+# This ugly construct is needed in case zork1.z3 and zork1.z5 both
+# exist (we only want the .z? glob to return one filename)
+ZFILE=$( echo "$ZCODEPATH/$( echo "$0" | sed 's,.*/,,' )".z? | cut -d' ' -f1 )
+
+# If the wrapper is called directly, default to Zork I
+if [ ! -e $ZFILE ]; then
+ ZFILE=$ZCODEPATH/zork1.z3
+fi
+
+if which fizmo &>/dev/null; then
+ exec fizmo $ZFILE
+elif which frotz &>/dev/null; then
+ exec frotz $ZFILE
+elif which zoom &>/dev/null; then
+ if [ "$DISPLAY" = "" ]; then
+ echo "$0: can't run zoom, X isn't running. Install fizmo or frotz, or else startx first"
+ exit 1
+ fi
+
+ # zoom is an X app, if we were called from a .desktop file,
+ # need to get rid of the terminal it started for us.
+ nohup zoom $ZFILE &>/dev/null &
+ sleep 1
+ disown
+else
+ echo "$0: can't find an interpreter. Install one or more of fizmo, frotz, zoom."
+ exit 1
+fi