62 lines
1.7 KiB
Bash
62 lines
1.7 KiB
Bash
# Template file for 'nethack'
|
|
pkgname=nethack
|
|
version=3.6.2
|
|
revision=1
|
|
make_dirs="/var/games/nethack/save 0775 nethack nethack"
|
|
hostmakedepends="ncurses-devel flex"
|
|
depends="gzip"
|
|
short_desc="Exploring The Mazes of Menace"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="NGPL"
|
|
homepage="http://www.nethack.org/"
|
|
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version//.}-src.tgz"
|
|
checksum=fbd00ada6a4ee347ecd4a350a5b2995b4b4ab5dcc63881b3bc4485b0479ddb1d
|
|
nocross=yes
|
|
system_accounts="$pkgname"
|
|
|
|
post_extract() {
|
|
sed -i -e '/COMPRESS/s/compress/gzip/g' \
|
|
-e '/COMPRESS_EXTENSION/s/\.Z/.gz/g' include/config.h
|
|
}
|
|
|
|
do_configure() {
|
|
sh sys/unix/setup.sh sys/unix/hints/linux
|
|
}
|
|
|
|
do_build() {
|
|
make all dungeon \
|
|
CC="$CC" LINK="$CC" LFLAGS="$LDFLAGS" \
|
|
LEX=flex WINTTYLIB=-lncurses \
|
|
CFLAGS="$CFLAGS -DLINUX -DTIMED_DELAY -DDLB \
|
|
-DSYSCF -DSYSCF_FILE='\"/usr/lib/nethack\"' \
|
|
-DHACKDIR='\"/var/games/nethack\"' -I../include"
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir usr/share/man/man6
|
|
vmkdir var/games
|
|
make install manpages \
|
|
PREFIX=$DESTDIR \
|
|
SHELLDIR=$DESTDIR/usr/bin \
|
|
MANDIR=$DESTDIR/usr/share/man/man6 \
|
|
GAMEDIR=$DESTDIR/usr/lib/nethack \
|
|
VARDIR=$DESTDIR/var/games/nethack \
|
|
INSTDIR=$DESTDIR/usr/lib/nethack \
|
|
HACKDIR=$DESTDIR/usr/lib/nethack \
|
|
GAMEPERM=0755 \
|
|
DIRPERM=0775 \
|
|
VARDIRPERM=0775 \
|
|
CHOWN=: CHGRP=: FLEX=lex
|
|
|
|
mv $DESTDIR/usr/lib/nethack/nhdat $DESTDIR/var/games/nethack
|
|
mv $DESTDIR/usr/lib/nethack/symbols $DESTDIR/var/games/nethack
|
|
rm $DESTDIR/var/games/nethack/{logfile,perm,record,xlogfile}
|
|
|
|
sed -i -e 's,^HACKDIR=.*,HACKDIR=/var/games/nethack,' \
|
|
-e 's,^HACK=.*,HACK=/usr/lib/nethack/nethack,' \
|
|
$DESTDIR/usr/bin/nethack
|
|
|
|
vdoc doc/Guidebook.txt
|
|
vlicense dat/license LICENSE
|
|
}
|