2 # Contributor : Peter Feigl <peter.feigl@gmail.com>
7 pkgdesc='A single player dungeon exploration game. Lisp patch for nethack-el.'
9 url="http://www.nongnu.org/nethack-el/"
11 depends=('ncurses' 'gzip' 'emacs')
13 source=(http://downloads.sourceforge.net/sourceforge/nethack/nethack-343-src.tgz http://mirror.lihnidos.org/GNU/savannah/nethack-el/nethack_el-0.9.5.tar.gz)
18 cd $startdir/src/$xpkgname-$xpkgver/
19 patch -p 1 < ../nethack_el-0.9.5/enh-343.patch
20 cd $startdir/src/$xpkgname-$xpkgver/sys/unix
23 cd $startdir/src/$xpkgname-$xpkgver/include
24 sed -e '/define HACKDIR/ s|/usr/games/lib/nethackdir|/usr/share/nethack/|' \
25 -e '/^#define COMPRESS\s/ s|/usr/bin/compress|/bin/gzip|' \
26 -e '/^#define COMPRESS_EXTENSION/ s|".Z"|".gz"|' \
27 -e 's|^/\* \(#define DLB\) \*/|\1|' -i config.h
28 sed -e 's|^/\* \(#define LINUX\) \*/|\1|' \
29 -e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i unixconf.h
30 cd $startdir/src/$xpkgname-$xpkgver/src
31 # sed -e 's|^# \(WINTTYLIB = -lncurses\)|\1|' \
32 # -e 's|^WINTTYLIB = -ltermlib|#&|' -i Makefile
34 sed -e '/^GAMEDIR\s*=/ s|/games/.*$|/share/$(GAME)|' \
35 -e '/^GAMEUID\s*=/ s|games|root|' \
36 -e '/^GAMEGRP\s*=/ s|bin|root|' \
37 -e '/^SHELLDIR\s*=/ s|/games|/bin|' -i Makefile
40 make PREFIX=$startdir/pkg/usr install
41 mv $startdir/pkg/usr/bin/nethack $startdir/pkg/usr/bin/nethack-lisp
42 sed -e 's|HACKDIR=.*/pkg/usr/|HACKDIR=/usr/|' \
43 -i $startdir/pkg/usr/bin/nethack
44 install -Dm644 dat/license $startdir/pkg/usr/share/licenses/nethack/license
46 source /etc/makepkg.conf
48 md5sums=('21479c95990eefe7650df582426457f9'
49 'e8e08e1eeb5506871fe7d84e5d0a52b0')