diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-25 15:26:24 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-25 15:26:24 +0200 |
commit | b6af1e02efe594039707cd882517663d5370f375 (patch) | |
tree | ff9c2d55873e051e82972ba64c017352d3a75d34 /unmaintained/nethack/nethack.bin | |
parent | a71346b7acebc600960a98c84fb32cfd72fe864b (diff) | |
download | aports-b6af1e02efe594039707cd882517663d5370f375.tar.bz2 aports-b6af1e02efe594039707cd882517663d5370f375.tar.xz |
testing/[multiple]: move unmaintained packages
This moves all packages from testing to unmaintained which have not been
updated for atleast 6 months. If you are affected by this commit please follow
this proceddure:
* make sure your packages build on all architectures
* move your pacakge(s) back to testing
* if you want to keep this package and can maintain it (or find somebody to
maintain it for you) for a minimum of 6 months ask it to be moved to community
Diffstat (limited to 'unmaintained/nethack/nethack.bin')
-rwxr-xr-x | unmaintained/nethack/nethack.bin | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/unmaintained/nethack/nethack.bin b/unmaintained/nethack/nethack.bin new file mode 100755 index 0000000000..272e23f085 --- /dev/null +++ b/unmaintained/nethack/nethack.bin @@ -0,0 +1,74 @@ +#!/bin/sh + +set -e +set -u + +die () { echo "nethack:" "$@" >&2 ; exit 1 ; } + +[ "x${HOME:-}" = x ] && die "\$HOME not set" +cd "$HOME" +[ -d .nethack ] || mkdir -p .nethack +cd .nethack +[ -f nhdat ] || ln -s /usr/share/nethack/nhdat nhdat +[ -d save ] || mkdir -p save +[ -f logfile ] || : > logfile +[ -f perm ] || : > perm +[ -f record ] || : > record + +HACKDIR="$HOME/.nethack" +export HACKDIR +HACK=/usr/lib/nethack/nethack +MAXNROFPLAYERS=4 + +# Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH +case "x${XUSERFILESEARCHPATH:-}" in +x) XUSERFILESEARCHPATH="$HACKDIR/%N.ad" + ;; +*) XUSERFILESEARCHPATH="$XUSERFILESEARCHPATH:$HACKDIR/%N.ad" + ;; +esac +export XUSERFILESEARCHPATH + +# see if we can find the full path name of PAGER, so help files work properly +# assume that if someone sets up a special variable (HACKPAGER) for NetHack, +# it will already be in a form acceptable to NetHack +# ideas from brian@radio.astro.utoronto.ca +if test \( "xxx${PAGER:-}" != xxx \) -a \( "xxx${HACKPAGER:-}" = xxx \) +then + HACKPAGER="$PAGER" +# use only the first word of the pager variable +# this prevents problems when looking for file names with trailing +# options, but also makes the options unavailable for later use from +# NetHack + for i in $HACKPAGER + do + HACKPAGER="$i" + break + done + + if test ! -f "$HACKPAGER" + then + IFS=: + for i in $PATH + do + if test -f "$i/$HACKPAGER" + then + HACKPAGER="$i/$HACKPAGER" + export HACKPAGER + break + fi + done + IFS=' ' + fi + if test ! -f "$HACKPAGER" + then + echo "Cannot find $PAGER -- unsetting PAGER." >&2 + unset HACKPAGER + unset PAGER + fi +fi + +case "x${1:-}" in + x-s*) exec "$HACK" "$@" ;; + x*) exec "$HACK" "$@" "$MAXNROFPLAYERS" ;; +esac |