1 # $Id: Pkgfile 44 2005-06-25 13:25:15Z tilman $
2 # Packager: Tilman Sauerbeck (tilman at code-monkey de)
3 # Description: NetHack!
4 # URL: http://www.nethack.org
10 source=(http://dl.sourceforge.net/sourceforge/$name/$name-343-src.tgz \
11 http://www.netsonic.fi/~walker/nh/nh343jl.diff \
17 patch -Np1 -i ../$name-gzip.diff
18 patch -Np1 -i ../nh343jl.diff
23 cd $SRC/$name-$version/include
25 # not sure this sed call is needed
26 sed -i -e 's|/usr/games/lib/nethackdir|/usr/share/nethack/|g' config.h
29 #define MENU_COLOR_REGEX
33 sed -i -e 's|^/\* #define LINUX|#define LINUX|' unixconf.h
35 cd $SRC/$name-$version/src
36 sed -i -e 's|WINTTYLIB = -ltermlib|# WINTTYLIB = -ltermlib|g' Makefile
37 sed -i -e 's|# WINTTYLIB = -lncurses|WINTTYLIB = -lncurses|g' Makefile
39 sed -i -e 's|PREFIX[\t]* = /usr|PREFIX = $(PKG)/usr|g' Makefile
40 sed -i -e 's|GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir|GAMEDIR = $(PREFIX)/lib/$(GAME)dir|g' Makefile
41 sed -i -e 's|GAMEGRP = bin|GAMEGRP = root|' Makefile
42 sed -i -e 's|SHELLDIR = $(PREFIX)/games|SHELLDIR = $(PREFIX)/bin|g' Makefile
44 mkdir -p $PKG/usr/share
50 mv $PKG/usr/lib/nethackdir $PKG/usr/share/nethack
51 sed -i -e "s|HACKDIR=$PKG/usr/lib/nethackdir|HACKDIR=/usr/share/nethack|g" nethack