aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/nethack
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-08-25 15:26:24 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2016-08-25 15:26:24 +0200
commitb6af1e02efe594039707cd882517663d5370f375 (patch)
treeff9c2d55873e051e82972ba64c017352d3a75d34 /unmaintained/nethack
parenta71346b7acebc600960a98c84fb32cfd72fe864b (diff)
downloadaports-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')
-rw-r--r--unmaintained/nethack/APKBUILD72
-rwxr-xr-xunmaintained/nethack/nethack.bin74
2 files changed, 146 insertions, 0 deletions
diff --git a/unmaintained/nethack/APKBUILD b/unmaintained/nethack/APKBUILD
new file mode 100644
index 000000000..a7d4f467c
--- /dev/null
+++ b/unmaintained/nethack/APKBUILD
@@ -0,0 +1,72 @@
+# Contributor: Jesse Young <jlyo@jlyo.org>
+# Maintainer:
+pkgname=nethack
+pkgver=3.4.3
+pkgrel=0
+pkgdesc='A single player dungeon exploration game'
+arch='all'
+url='http://www.nethack.org/index.html'
+license='custom'
+depends='ncurses gzip'
+makedepends='ncurses-dev byacc flex linux-headers'
+subpackages="$pkgname-doc"
+install=""
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-${pkgver//.}-src.tgz
+ nethack.bin"
+
+build(){
+ cd $srcdir/$pkgname-$pkgver/
+ sh sys/unix/setup.sh
+
+ sed -e '/define HACKDIR/ s|/usr/games/lib/nethackdir|/usr/lib/nethack/|' \
+ -e "/^#define COMPRESS\s/ s|/usr/bin/compress|$(which gzip)|" \
+ -e '/^#define COMPRESS_EXTENSION/ s|".Z"|".gz"|' \
+ -e 's|^/\* \(#define DLB\) \*/|\1|' -i include/config.h
+
+ sed -e 's|^/\* \(#define LINUX\) \*/|\1|' \
+ -e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i include/unixconf.h
+
+ sed -e 's|^# \(WINTTYLIB = -lncurses\)|\1|' \
+ -e 's|^WINTTYLIB = -ltermlib|#&|' -i src/Makefile
+
+ sed -e '/^GAMEDIR\s*=/ s|/games/.*$|/usr/lib/$(GAME)|' \
+ -e '/^GAMEPERM\s*=/ s|04755|0755|' \
+ -e '/^GAMEUID\s*=/ s|games|root|' \
+ -e '/^GAMEGRP\s*=/ s|bin|root|' \
+ -e '/^CHOWN\s*=/ s|chown|true|' \
+ -e '/^CHGRP\s*=/ s|chgrp|true|' \
+ -e '/^SHELLDIR\s*=/ s|/games|/usr/bin|' -i Makefile
+
+ sed -e "/^MANDIR\s*=/s|/usr/man/man6|$pkgdir/usr/share/man/man6|" -i doc/Makefile
+
+ sed -e "s/^LEX\s*=.*$/LEX=flex/" -i util/Makefile
+
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver/
+
+ install -dm755 $pkgdir/usr/share/man/man6
+ install -dm755 $pkgdir/usr/share/doc/nethack
+ install -dm755 $pkgdir/usr/share/nethack
+ make PREFIX=$pkgdir install manpages
+ rm -f $pkgdir/usr/bin/nethack
+ rm -f $pkgdir/usr/lib/nethack/license
+ rm -f $pkgdir/usr/lib/nethack/logfile
+ rm -f $pkgdir/usr/lib/nethack/perm
+ rm -f $pkgdir/usr/lib/nethack/record
+ rm -rf $pkgdir/usr/lib/nethack/save
+ mv $pkgdir/usr/lib/nethack/nhdat $pkgdir/usr/share/nethack/nhdat
+
+ install -m755 $srcdir/nethack.bin $pkgdir/usr/bin/nethack
+
+ install -Dm644 doc/Guidebook.txt $pkgdir/usr/share/doc/nethack/Guidebook.txt
+ install -Dm644 dat/license $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
+md5sums="21479c95990eefe7650df582426457f9 nethack-343-src.tgz
+2498972119efd501fbe9d3a0cacfa107 nethack.bin"
+sha256sums="bb39c3d2a9ee2df4a0c8fdde708fbc63740853a7608d2f4c560b488124866fe4 nethack-343-src.tgz
+e9efd10d5a57bfcfefda6720308fdff9c14a2e71b0b4c68f2267dc59e7b7e3cf nethack.bin"
+sha512sums="052342c19619219f291571d48cf7799f962eb6ec6f8a276427225c0abbd833eada18abeff9fbd647919f2a9e3bb097d7f154675e283fe48abc4752f24c192d8f nethack-343-src.tgz
+0846b0a22451e420366c790b128e8c6b9ba902595e963f51bbbb61c7b7bebdeee2a13e51fc7f786e2da95834372ec6a5792d7a0308250c98b6bd48026d881eb0 nethack.bin"
diff --git a/unmaintained/nethack/nethack.bin b/unmaintained/nethack/nethack.bin
new file mode 100755
index 000000000..272e23f08
--- /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