1 # Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
2 # Contributor: Moritz Wilhelmy <echo dGhlLnd1bGYuZ2FuZ0Bnb29nbGVtYWlsLmNvbQ== | base64 -d>
3 # Contributor: kevin <kevin@archlinux.org>
4 # Contributor: Christian Schmidt <mucknert@gmx.net>
5 # Contributor: Markus Meissner <markus@meissna.de>
10 pkgdesc='A single player dungeon exploration game, variant'
12 url="http://sporkhack.com/"
14 depends=(ncurses gzip)
15 makedepends=(subversion)
18 _svntrunk='svn://sporkhack.com/nh'
24 if [ -d $_svnmod/.svn ]; then
25 (cd $_svnmod && svn up -r $pkgver) || warning "SVN update failed!"
27 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
30 msg2 "SVN checkout done or server timeout"
33 svn export $_svnmod $_svnmod-build
39 sed -e '/define HACKDIR/ s|/usr/games/lib/nethackdir|/usr/share/sporkhack/|' \
40 -e '/define COMPRESS/ s|/usr/bin/gzip|/bin/gzip|' \
41 -e 's|#define SECURE|/* & */|' \
42 -e 's|#define DUMP_LOG|/* & */|' \
46 sed -e '/^GAMEDIR\s*=/ s|/games/.*$|/share/sporkhack|' \
47 -e '/^GAMEUID\s*=/ s|games|root|' \
48 -e '/^GAMEGRP\s*=/ s|bin|root|' \
49 -e '/^SHELLDIR\s*=/ s|/games|/bin|' \
52 # Horribly mutilate manpage
53 sed -e '1s/NETHACK/SPORKHACK/' \
54 -e '4s/nethack/sporkhack/' \
55 -e '62,113s/NetHack/SporkHack/' \
56 -e 's/\.B nethack/.B sporkhack/' \
57 -e '111s/nethackrc/sporkrc/' \
58 -e '232s/nethack/sporkhack/' \
59 -e '234s/nethack/sporkhack/' \
60 -e '290s/NetHack/SporkHack/' \
64 [[ $(check_option strip) == n ]] && CFLAGS="-O0 -g3"
67 CFLAGS+=" -I../include"
72 cd "$srcdir/$_svnmod-build"
74 make PREFIX="$pkgdir/usr" install
76 # Move binaries to lib
77 install -d "$pkgdir/usr/lib/sporkhack"
78 mv "$pkgdir"/usr/share/sporkhack/{nethack,recover} "$pkgdir/usr/lib/sporkhack/"
80 # Rename launcher so sporkhack doesn't conflict with nethack
81 mv "$pkgdir/usr/bin/nethack" "$pkgdir/usr/bin/sporkhack"
83 sed -e "s|HACKDIR=$pkgdir/usr/|HACKDIR=/usr/|" \
84 -e 's|HACK=$HACKDIR|HACK=/usr/lib/sporkhack|' \
85 -i "$pkgdir/usr/bin/sporkhack"
88 install -Dm644 doc/nethack.6 "$pkgdir/usr/share/man/man6/sporkhack.6"
89 install -Dm644 doc/Guidebook.txt "$pkgdir/usr/share/doc/sporkhack/Guidebook.txt"
92 install -Dm644 dat/license "$pkgdir/usr/share/licenses/$pkgname/license"