aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--games/nethack33-gnome/Makefile3
-rw-r--r--games/nethack33-nox11/Makefile5
-rw-r--r--games/nethack33-qt/Makefile3
-rw-r--r--games/nethack33/Makefile64
-rw-r--r--games/nethack33/files/patch-aa4
-rw-r--r--games/nethack33/files/patch-ae75
-rw-r--r--games/nethack33/files/patch-af18
-rw-r--r--games/nethack33/files/patch-dgn_comp.613
-rw-r--r--games/nethack33/files/patch-dlb.613
-rw-r--r--games/nethack33/files/patch-lev_comp.613
-rw-r--r--games/nethack33/files/patch-nethack.640
-rw-r--r--games/nethack33/files/patch-recover.622
-rw-r--r--games/nethack33/files/patch-system.h26
-rw-r--r--games/nethack33/files/pkg-deinstall.in16
-rw-r--r--games/nethack33/pkg-plist278
15 files changed, 420 insertions, 173 deletions
diff --git a/games/nethack33-gnome/Makefile b/games/nethack33-gnome/Makefile
index 2380ee24bde4..67444873e010 100644
--- a/games/nethack33-gnome/Makefile
+++ b/games/nethack33-gnome/Makefile
@@ -8,8 +8,7 @@
MASTERDIR= ${.CURDIR}/../nethack33
MAINTAINER= Jan.Stocker@t-online.de
-COMMENT= A dungeon explorin', slashin', hackin' game (w/ GNOME graphics)
-WITH_GNOME_GRAPHICS= yes
+PKGNAMESUFFIX= -gnome
.include "${MASTERDIR}/Makefile"
diff --git a/games/nethack33-nox11/Makefile b/games/nethack33-nox11/Makefile
index b75f73cee407..05d9fd3ecc25 100644
--- a/games/nethack33-nox11/Makefile
+++ b/games/nethack33-nox11/Makefile
@@ -7,9 +7,8 @@
MASTERDIR= ${.CURDIR}/../nethack33
-MAINTAINER= ports@FreeBSD.org
-COMMENT= A dungeon explorin', slashin', hackin' game (w/o X11 graphics)
+MAINTAINER= glewis@FreeBSD.org
-WITH_TTY_GRAPHICS= yes
+PKGNAMESUFFIX= -nox11
.include "${MASTERDIR}/Makefile"
diff --git a/games/nethack33-qt/Makefile b/games/nethack33-qt/Makefile
index 6df48121bbfc..bb6acce3d535 100644
--- a/games/nethack33-qt/Makefile
+++ b/games/nethack33-qt/Makefile
@@ -8,8 +8,7 @@
MASTERDIR= ${.CURDIR}/../nethack33
MAINTAINER= ports@FreeBSD.org
-COMMENT= A dungeon explorin', slashin', hackin' game (w/ Qt graphics)
-WITH_QT_GRAPHICS= yes
+PKGNAMESUFFIX= -qt
.include "${MASTERDIR}/Makefile"
diff --git a/games/nethack33/Makefile b/games/nethack33/Makefile
index 70b456c559fa..bc737362ba55 100644
--- a/games/nethack33/Makefile
+++ b/games/nethack33/Makefile
@@ -7,49 +7,62 @@
PORTNAME= nethack
PORTVERSION= 3.3.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES?= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= nethack
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//g}
EXTRACT_SUFX= .tgz
-MAINTAINER?= ports@FreeBSD.org
+MAINTAINER?= glewis@FreeBSD.org
COMMENT?= A dungeon explorin', slashin', hackin' game
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-
-NO_LATEST_LINK= yes
+LATEST_LINK= nethack33
USE_GMAKE= yes
USE_REINPLACE= yes
MAKE_ENV= CXX="${CXX}" GRAPHICS="${GRAPHICS}" LDFLAGS="${LDFLAGS}"
+PLIST_SUB= HACKNAME="${HACKNAME}" \
+ HACKEXT="${HACKEXT}"
+
+MAN6= dgn_comp${HACKEXT}.6 dlb${HACKEXT}.6 lev_comp${HACKEXT}.6 \
+ ${HACKNAME}.6 recover${HACKEXT}.6
-MAN6= dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
+HACKEXT?= 33
+HACKNAME?= ${PORTNAME}${HACKEXT}
+HACKDIR?= share/${HACKNAME}
+HACKLINK= nethack
-.if defined(WITH_GNOME_GRAPHICS)
+DATADIR= ${PREFIX}/${HACKDIR}
+DOCSDIR= ${PREFIX}/share/doc/${HACKNAME}
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+
+.if !defined(PKGNAMESUFFIX)
+USE_XPM= yes
+GRAPHICS= X11_GRAPHICS
+.else
+.if ${PKGNAMESUFFIX} == "-gnome"
CATEGORIES= games gnome
-PKGNAMESUFFIX= -gnome
USE_GETOPT_LONG=yes
USE_GNOME= yes
GRAPHICS= GNOME_GRAPHICS
-.elif defined(WITH_QT_GRAPHICS)
-PKGNAMESUFFIX= -qt
+.elif ${PKGNAMESUFFIX} == "-nox11"
+GRAPHICS= # none
+.elif ${PKGNAMESUFFIX} == "-qt"
USE_QT_VER= 2
MAKE_ENV+= QTCPPFLAGS="${QTCPPFLAGS}" QTCFGLIBS="${QTCFGLIBS}" \
MOC="${MOC}" LIBQT="-l${QTNAME}"
GRAPHICS= QT_GRAPHICS
-.elif defined(WITH_TTY_GRAPHICS) || defined(WITHOUT_X11)
-PKGNAMESUFFIX= -nox11
-.else
-USE_XPM= yes
-GRAPHICS= X11_GRAPHICS
+.endif
.endif
.include <bsd.port.pre.mk>
-.if defined(WITH_QT_GRAPHICS) && ${OSVERSION} >= 500113
-BROKEN= "Does not build"
+.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
+PLIST_SUB+= HACKLINK=""
+.else
+PLIST_SUB+= HACKLINK="@comment "
.endif
pre-everything::
@@ -80,9 +93,28 @@ post-patch:
's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
pre-configure:
+.for f in include/config.h sys/unix/Makefile.top sys/unix/Makefile.doc
+ @${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
+ -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
+ -e 's|%%HACKEXT%%|${HACKEXT}|g' \
+ ${WRKSRC}/${f}
+.endfor
+.for f in dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
+ @${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
+ -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
+ -e 's|%%HACKEXT%%|${HACKEXT}|g' \
+ ${WRKSRC}/doc/${f}
+.endfor
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
+pre-install:
+ @${CAT} ${FILESDIR}/pkg-deinstall.in | ${SED} \
+ -e 's|%%HACKDIR%%|${HACKDIR}|g' > ${PKGDEINSTALL}
+
post-install:
+.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
+ @${LN} -s -f ${PREFIX}/bin/${HACKNAME} ${PREFIX}/bin/${HACKLINK}
+.endif
@cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} manpages
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
diff --git a/games/nethack33/files/patch-aa b/games/nethack33/files/patch-aa
index 8d5758e3ab86..5dbae6baeada 100644
--- a/games/nethack33/files/patch-aa
+++ b/games/nethack33/files/patch-aa
@@ -1,3 +1,5 @@
+$FreeBSD$
+
--- include/config.h.orig Sat Jul 22 10:13:51 2000
+++ include/config.h Sat May 18 06:27:54 2002
@@ -110,7 +110,7 @@
@@ -30,7 +32,7 @@
*/
# ifndef HACKDIR
-# define HACKDIR "/usr/games/lib/nethackdir" /* nethack directory */
-+# define HACKDIR "%%PREFIX%%/lib/nethack" /* nethack directory */
++# define HACKDIR "%%HACKDIR%%" /* nethack directory */
# endif
/*
diff --git a/games/nethack33/files/patch-ae b/games/nethack33/files/patch-ae
index 42d88c741d3f..08997a245f91 100644
--- a/games/nethack33/files/patch-ae
+++ b/games/nethack33/files/patch-ae
@@ -1,11 +1,14 @@
---- sys/unix/Makefile.top.orig Tue Jul 4 09:42:05 2000
-+++ sys/unix/Makefile.top Tue Oct 9 22:21:45 2001
+$FreeBSD$
+
+--- sys/unix/Makefile.top.orig Mon Jul 3 18:42:05 2000
++++ sys/unix/Makefile.top Mon Apr 19 14:42:45 2004
@@ -14,18 +14,17 @@
# MAKE = make
# make NetHack
-PREFIX = /usr
- GAME = nethack
+-GAME = nethack
++GAME = %%HACKNAME%%
# GAME = nethack.prg
GAMEUID = games
-GAMEGRP = bin
@@ -28,7 +31,7 @@
# (if there is, you'll have to do the installation by hand or modify the
# instructions)
-GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir
-+GAMEDIR = $(PREFIX)/lib/$(GAME)
++GAMEDIR = %%HACKDIR%%
VARDIR = $(GAMEDIR)
-SHELLDIR = $(PREFIX)/games
+SHELLDIR = $(PREFIX)/bin
@@ -48,3 +51,67 @@
VARDATD = data oracles options quest.dat rumors
VARDAT = $(VARDATD) $(VARDATND)
+@@ -87,7 +86,7 @@
+ $(GAME):
+ ( cd src ; $(MAKE) )
+
+-all: $(GAME) Guidebook $(VARDAT) dungeon spec_levs check-dlb
++all: $(GAME) recover Guidebook $(VARDAT) dungeon spec_levs check-dlb
+ @echo "Done."
+
+ Guidebook:
+@@ -156,6 +155,8 @@
+ ( cd util ; $(MAKE) dlb )
+ ( cd dat ; ../util/dlb cf nhdat $(DATDLB) )
+
++recover:
++ ( cd util ; $(MAKE) recover )
+
+ dofiles:
+ target=`sed -n \
+@@ -165,16 +166,18 @@
+ -e '}' \
+ -e '$$s/.*/nodlb/p' < dat/options` ; \
+ $(MAKE) dofiles-$${target-nodlb}
+- cp src/$(GAME) $(GAMEDIR)
++ cp src/nethack $(GAMEDIR)/$(GAME)
++ cp util/recover $(GAMEDIR)
+ -rm -f $(SHELLDIR)/$(GAME)
+ sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
+ -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
+ < sys/unix/nethack.sh \
+ > $(SHELLDIR)/$(GAME)
+ # set up their permissions
+- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) ; \
+- $(CHGRP) $(GAMEGRP) $(GAME) )
++ -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \
++ $(CHGRP) $(GAMEGRP) $(GAME) recover )
+ chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
++ chmod $(GAMEPERM) $(GAMEDIR)/recover
+ -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
+ $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
+ chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
+@@ -194,7 +197,7 @@
+ $(CHGRP) $(GAMEGRP) $(DAT) ; \
+ chmod $(FILEPERM) $(DAT) )
+
+-update: $(GAME) $(VARDAT) dungeon spec_levs
++update: $(GAME) recover $(VARDAT) dungeon spec_levs
+ # (don't yank the old version out from under people who're playing it)
+ -mv $(GAMEDIR)/$(GAME) $(GAMEDIR)/$(GAME).old
+ # quest.dat is also kept open and has the same problems over NFS
+@@ -210,11 +213,12 @@
+ # and a reminder
+ @echo You may also want to install the man pages via the doc Makefile.
+
+-install: $(GAME) $(VARDAT) dungeon spec_levs
++install: $(GAME) recover $(VARDAT) dungeon spec_levs
+ # set up the directories
+ # not all mkdirs have -p; those that don't will create a -p directory
+ -mkdir -p $(SHELLDIR)
+- -rm -rf $(GAMEDIR) $(VARDIR)
++ -rmdir $(GAMEDIR)
++ -rmdir $(VARDIR)
+ -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+ -rmdir ./-p
+ -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
diff --git a/games/nethack33/files/patch-af b/games/nethack33/files/patch-af
index 2527c7b4128e..5f73341ce0b2 100644
--- a/games/nethack33/files/patch-af
+++ b/games/nethack33/files/patch-af
@@ -1,11 +1,13 @@
---- sys/unix/Makefile.doc.orig Sat Jan 15 05:49:48 2000
-+++ sys/unix/Makefile.doc Sat Aug 11 11:08:33 2001
+$FreeBSD$
+
+--- sys/unix/Makefile.doc.orig Fri Jan 14 13:49:48 2000
++++ sys/unix/Makefile.doc Mon Apr 19 14:29:46 2004
@@ -34,15 +34,15 @@
GAME = nethack
-MANDIR = /usr/man/man6
-+MANDIR = ${PREFIX}/man/man
++MANDIR = ${MANPREFIX}/man/man
MANEXT = 6
# manual installation for most BSD-style systems
@@ -31,11 +33,11 @@
- -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
- -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
- -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
-+ -$(GAMEMANCREATE) $(MANDIR)$(MANEXT)/$(GAME).$(MANEXT)
-+ -$(LEVMANCREATE) $(MANDIR)$(MANEXT)/lev_comp.$(MANEXT)
-+ -$(DGNMANCREATE) $(MANDIR)$(MANEXT)/dgn_comp.$(MANEXT)
-+ -$(RCVRMANCREATE) $(MANDIR)$(MANEXT)/recover.$(MANEXT)
-+ -$(DLBMANCREATE) $(MANDIR)$(MANEXT)/dlb.$(MANEXT)
++ -$(GAMEMANCREATE) $(MANDIR)$(MANEXT)/%%HACKNAME%%.$(MANEXT)
++ -$(LEVMANCREATE) $(MANDIR)$(MANEXT)/lev_comp%%HACKEXT%%.$(MANEXT)
++ -$(DGNMANCREATE) $(MANDIR)$(MANEXT)/dgn_comp%%HACKEXT%%.$(MANEXT)
++ -$(RCVRMANCREATE) $(MANDIR)$(MANEXT)/recover%%HACKEXT%%.$(MANEXT)
++ -$(DLBMANCREATE) $(MANDIR)$(MANEXT)/dlb%%HACKEXT%%.$(MANEXT)
# manual creation for distribution
DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt
diff --git a/games/nethack33/files/patch-dgn_comp.6 b/games/nethack33/files/patch-dgn_comp.6
new file mode 100644
index 000000000000..af171b21e70b
--- /dev/null
+++ b/games/nethack33/files/patch-dgn_comp.6
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- doc/dgn_comp.6.orig Mon Apr 12 09:28:09 2004
++++ doc/dgn_comp.6 Mon Apr 12 09:28:33 2004
+@@ -396,7 +396,7 @@
+ M. Stephenson (from the level compiler by Jean-Christophe Collet).
+ .SH "SEE ALSO"
+ .PP
+-lev_comp(6), nethack(6)
++lev_comp%%HACKEXT%%(6), %%HACKNAME%%(6)
+ .SH BUGS
+ .PP
+ Probably infinite.
diff --git a/games/nethack33/files/patch-dlb.6 b/games/nethack33/files/patch-dlb.6
new file mode 100644
index 000000000000..d7d7ed16feca
--- /dev/null
+++ b/games/nethack33/files/patch-dlb.6
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- doc/dlb.6.orig Mon Apr 12 09:28:09 2004
++++ doc/dlb.6 Mon Apr 12 09:28:54 2004
+@@ -74,7 +74,7 @@
+ Kenneth Lorber
+ .SH "SEE ALSO"
+ .PP
+-nethack(6), tar(1)
++%%HACKNAME%%(6), tar(1)
+ .SH BUGS
+ .PP
+ Not a good tar emulation; - does not mean stdin or stdout.
diff --git a/games/nethack33/files/patch-lev_comp.6 b/games/nethack33/files/patch-lev_comp.6
new file mode 100644
index 000000000000..32f1f9171e8d
--- /dev/null
+++ b/games/nethack33/files/patch-lev_comp.6
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- doc/lev_comp.6.orig Mon Apr 12 09:28:09 2004
++++ doc/lev_comp.6 Mon Apr 12 09:29:20 2004
+@@ -563,7 +563,7 @@
+ Jean-Christophe Collet, David Cohrs.
+ .SH "SEE ALSO"
+ .PP
+-dgn_comp(6), nethack(6)
++dgn_comp%%HACKEXT%%(6), %%HACKNAME%%(6)
+ .SH BUGS
+ .PP
+ Probably infinite.
diff --git a/games/nethack33/files/patch-nethack.6 b/games/nethack33/files/patch-nethack.6
new file mode 100644
index 000000000000..e023491d7317
--- /dev/null
+++ b/games/nethack33/files/patch-nethack.6
@@ -0,0 +1,40 @@
+$FreeBSD$
+
+--- doc/nethack.6.orig Mon Apr 12 09:28:09 2004
++++ doc/nethack.6 Mon Apr 12 09:30:52 2004
+@@ -3,7 +3,7 @@
+ .SH NAME
+ nethack \- Exploring The Mazes of Menace
+ .SH SYNOPSIS
+-.B nethack
++.B %%HACKNAME%%
+ [
+ .B \-d
+ .I directory
+@@ -149,7 +149,7 @@
+ supplies a directory which is to serve as the playground.
+ It overrides the value from NETHACKDIR, HACKDIR,
+ or the directory specified by the game administrator during compilation
+-(usually /usr/games/lib/nethackdir).
++(usually %%HACKDIR%%).
+ This option is usually only useful to the game administrator.
+ The playground must contain several auxiliary files such as help files,
+ the list of top scorers, and a subdirectory
+@@ -174,7 +174,7 @@
+ distinction, as he may eventually release a new version of his own.
+ .SH FILES
+ .PP
+-All files are in the playground, normally /usr/games/lib/nethackdir.
++All files are in the playground, normally %%HACKDIR%%.
+ If DLB was defined during the compile, the data files and special levels
+ will be inside a larger file, normally nhdat, instead of being separate
+ files.
+@@ -247,7 +247,7 @@
+ In addition, SHOPTYPE is used in debugging (wizard) mode.
+ .SH "SEE ALSO"
+ .PP
+-dgn_comp(6), lev_comp(6), recover(6)
++dgn_comp%%HACKEXT%%(6), lev_comp%%HACKEXT%%(6), recover%%HACKEXT%%(6)
+ .SH BUGS
+ .PP
+ Probably infinite.
diff --git a/games/nethack33/files/patch-recover.6 b/games/nethack33/files/patch-recover.6
new file mode 100644
index 000000000000..a252961f0cbc
--- /dev/null
+++ b/games/nethack33/files/patch-recover.6
@@ -0,0 +1,22 @@
+$FreeBSD$
+
+--- doc/recover.6.orig Mon Apr 12 09:28:09 2004
++++ doc/recover.6 Mon Apr 12 09:31:27 2004
+@@ -31,7 +31,7 @@
+ supplies a directory which is the NetHack playground.
+ It overrides the value from NETHACKDIR, HACKDIR, or the directory
+ specified by the game administrator during compilation
+-(usually /usr/games/lib/nethackdir).
++(usually %%HACKDIR%%).
+ .PP
+ For recovery to be possible,
+ .I nethack
+@@ -103,7 +103,7 @@
+ .I nethack
+ will find them in the uncompressed form.
+ .SH "SEE ALSO"
+-nethack(6)
++%%HACKNAME%%(6)
+ .SH BUGS
+ .PP
+ .I recover
diff --git a/games/nethack33/files/patch-system.h b/games/nethack33/files/patch-system.h
new file mode 100644
index 000000000000..dd0e4d238ffd
--- /dev/null
+++ b/games/nethack33/files/patch-system.h
@@ -0,0 +1,26 @@
+$FreeBSD$
+
+--- include/system.h.orig Mon Apr 19 23:27:53 2004
++++ include/system.h Mon Apr 19 23:31:54 2004
+@@ -86,7 +86,7 @@
+ # endif
+ #else
+ E long lrand48();
+-E void srand48();
++E void FDECL(srand48, (long));
+ #endif /* BSD || ULTRIX || RANDOM */
+
+ #if !defined(BSD) || defined(ultrix)
+@@ -340,10 +340,10 @@
+ #if defined(BSD) && defined(ultrix) /* i.e., old versions of Ultrix */
+ E void sleep();
+ #endif
+-#if defined(ULTRIX) || defined(SYSV)
++#if !defined(__FreeBSD__) && (defined(ULTRIX) || defined(SYSV))
+ E unsigned sleep();
+ #endif
+-#if defined(HPUX)
++#if defined(HPUX) || defined(__FreeBSD__)
+ E unsigned int FDECL(sleep, (unsigned int));
+ #endif
+ #ifdef VMS
diff --git a/games/nethack33/files/pkg-deinstall.in b/games/nethack33/files/pkg-deinstall.in
new file mode 100644
index 000000000000..eef0b35d65e1
--- /dev/null
+++ b/games/nethack33/files/pkg-deinstall.in
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+if [ "${2}" = "POST-DEINSTALL" ]; then
+ if [ -d "${PKG_PREFIX}/%%HACKDIR%%" ]; then
+ echo
+ echo "The ${1} save files have not been removed."
+ echo
+ echo "If you are deleting ${1} permanently then you can "
+ echo "remove the save files with the command:"
+ echo
+ echo " rm -rf ${PKG_PREFIX}/%%HACKDIR%%"
+ echo
+ fi
+fi
diff --git a/games/nethack33/pkg-plist b/games/nethack33/pkg-plist
index c6c951c2129c..d036a3a836e4 100644
--- a/games/nethack33/pkg-plist
+++ b/games/nethack33/pkg-plist
@@ -1,139 +1,143 @@
-bin/nethack
-lib/nethack/nethack
-@exec mkdir %D/lib/nethack/save
-@exec chmod -R 775 %D/lib/nethack
-@exec chmod 2755 %D/lib/nethack/nethack
-@exec chown games:games %D/lib/nethack/save
-@unexec rm -rf %D/lib/nethack/save
-lib/nethack/Arc-fila.lev
-lib/nethack/Arc-filb.lev
-lib/nethack/Arc-goal.lev
-lib/nethack/Arc-loca.lev
-lib/nethack/Arc-strt.lev
-lib/nethack/Bar-fila.lev
-lib/nethack/Bar-filb.lev
-lib/nethack/Bar-goal.lev
-lib/nethack/Bar-loca.lev
-lib/nethack/Bar-strt.lev
-lib/nethack/Cav-fila.lev
-lib/nethack/Cav-filb.lev
-lib/nethack/Cav-goal.lev
-lib/nethack/Cav-loca.lev
-lib/nethack/Cav-strt.lev
-lib/nethack/Hea-fila.lev
-lib/nethack/Hea-filb.lev
-lib/nethack/Hea-goal.lev
-lib/nethack/Hea-loca.lev
-lib/nethack/Hea-strt.lev
-lib/nethack/Kni-fila.lev
-lib/nethack/Kni-filb.lev
-lib/nethack/Kni-goal.lev
-lib/nethack/Kni-loca.lev
-lib/nethack/Kni-strt.lev
-lib/nethack/Mon-fila.lev
-lib/nethack/Mon-filb.lev
-lib/nethack/Mon-goal.lev
-lib/nethack/Mon-loca.lev
-lib/nethack/Mon-strt.lev
-lib/nethack/Pri-fila.lev
-lib/nethack/Pri-filb.lev
-lib/nethack/Pri-goal.lev
-lib/nethack/Pri-loca.lev
-lib/nethack/Pri-strt.lev
-lib/nethack/Ran-fila.lev
-lib/nethack/Ran-filb.lev
-lib/nethack/Ran-goal.lev
-lib/nethack/Ran-loca.lev
-lib/nethack/Ran-strt.lev
-lib/nethack/Rog-fila.lev
-lib/nethack/Rog-filb.lev
-lib/nethack/Rog-goal.lev
-lib/nethack/Rog-loca.lev
-lib/nethack/Rog-strt.lev
-lib/nethack/Sam-fila.lev
-lib/nethack/Sam-filb.lev
-lib/nethack/Sam-goal.lev
-lib/nethack/Sam-loca.lev
-lib/nethack/Sam-strt.lev
-lib/nethack/Tou-fila.lev
-lib/nethack/Tou-filb.lev
-lib/nethack/Tou-goal.lev
-lib/nethack/Tou-loca.lev
-lib/nethack/Tou-strt.lev
-lib/nethack/Val-fila.lev
-lib/nethack/Val-filb.lev
-lib/nethack/Val-goal.lev
-lib/nethack/Val-loca.lev
-lib/nethack/Val-strt.lev
-lib/nethack/Wiz-fila.lev
-lib/nethack/Wiz-filb.lev
-lib/nethack/Wiz-goal.lev
-lib/nethack/Wiz-loca.lev
-lib/nethack/Wiz-strt.lev
-lib/nethack/air.lev
-lib/nethack/asmodeus.lev
-lib/nethack/astral.lev
-lib/nethack/baalz.lev
-lib/nethack/bigrm-1.lev
-lib/nethack/bigrm-2.lev
-lib/nethack/bigrm-3.lev
-lib/nethack/bigrm-4.lev
-lib/nethack/bigrm-5.lev
-lib/nethack/castle.lev
-lib/nethack/cmdhelp
-lib/nethack/data
-lib/nethack/dungeon
-lib/nethack/earth.lev
-lib/nethack/fakewiz1.lev
-lib/nethack/fakewiz2.lev
-lib/nethack/fire.lev
-lib/nethack/help
-lib/nethack/hh
-lib/nethack/history
-lib/nethack/juiblex.lev
-lib/nethack/knox.lev
-lib/nethack/license
-lib/nethack/mapbg.xpm
-lib/nethack/medusa-1.lev
-lib/nethack/medusa-2.lev
-lib/nethack/minefill.lev
-lib/nethack/minend-1.lev
-lib/nethack/minend-2.lev
-lib/nethack/minetn-1.lev
-lib/nethack/minetn-2.lev
-lib/nethack/opthelp
-lib/nethack/options
-lib/nethack/oracle.lev
-lib/nethack/oracles
-lib/nethack/orcus.lev
-lib/nethack/pet_mark.xbm
-lib/nethack/quest.dat
-lib/nethack/rip.xpm
-lib/nethack/rumors
-lib/nethack/sanctum.lev
-lib/nethack/soko1-1.lev
-lib/nethack/soko1-2.lev
-lib/nethack/soko2-1.lev
-lib/nethack/soko2-2.lev
-lib/nethack/soko3-1.lev
-lib/nethack/soko3-2.lev
-lib/nethack/soko4-1.lev
-lib/nethack/soko4-2.lev
-lib/nethack/tower1.lev
-lib/nethack/tower2.lev
-lib/nethack/tower3.lev
-lib/nethack/valley.lev
-lib/nethack/water.lev
-lib/nethack/wizard1.lev
-lib/nethack/wizard2.lev
-lib/nethack/wizard3.lev
-lib/nethack/wizhelp
-lib/nethack/x11tiles
+%%HACKLINK%%bin/nethack
+bin/%%HACKNAME%%
+%%DATADIR%%/%%HACKNAME%%
+@exec mkdir %D/%%DATADIR%%/save
+@exec chmod -R 775 %D/%%DATADIR%%
+@exec chmod 2755 %D/%%DATADIR%%/%%HACKNAME%%
+@exec chown games:games %D/%%DATADIR%%/save
+@unexec rmdir %D/%%DATADIR%%/save 2>/dev/null || true
+%%PORTDOCS%%%%DOCSDIR%%/Guidebook.txt
+%%DATADIR%%/Arc-fila.lev
+%%DATADIR%%/Arc-filb.lev
+%%DATADIR%%/Arc-goal.lev
+%%DATADIR%%/Arc-loca.lev
+%%DATADIR%%/Arc-strt.lev
+%%DATADIR%%/Bar-fila.lev
+%%DATADIR%%/Bar-filb.lev
+%%DATADIR%%/Bar-goal.lev
+%%DATADIR%%/Bar-loca.lev
+%%DATADIR%%/Bar-strt.lev
+%%DATADIR%%/Cav-fila.lev
+%%DATADIR%%/Cav-filb.lev
+%%DATADIR%%/Cav-goal.lev
+%%DATADIR%%/Cav-loca.lev
+%%DATADIR%%/Cav-strt.lev
+%%DATADIR%%/Hea-fila.lev
+%%DATADIR%%/Hea-filb.lev
+%%DATADIR%%/Hea-goal.lev
+%%DATADIR%%/Hea-loca.lev
+%%DATADIR%%/Hea-strt.lev
+%%DATADIR%%/Kni-fila.lev
+%%DATADIR%%/Kni-filb.lev
+%%DATADIR%%/Kni-goal.lev
+%%DATADIR%%/Kni-loca.lev
+%%DATADIR%%/Kni-strt.lev
+%%DATADIR%%/Mon-fila.lev
+%%DATADIR%%/Mon-filb.lev
+%%DATADIR%%/Mon-goal.lev
+%%DATADIR%%/Mon-loca.lev
+%%DATADIR%%/Mon-strt.lev
+%%DATADIR%%/Pri-fila.lev
+%%DATADIR%%/Pri-filb.lev
+%%DATADIR%%/Pri-goal.lev
+%%DATADIR%%/Pri-loca.lev
+%%DATADIR%%/Pri-strt.lev
+%%DATADIR%%/Ran-fila.lev
+%%DATADIR%%/Ran-filb.lev
+%%DATADIR%%/Ran-goal.lev
+%%DATADIR%%/Ran-loca.lev
+%%DATADIR%%/Ran-strt.lev
+%%DATADIR%%/Rog-fila.lev
+%%DATADIR%%/Rog-filb.lev
+%%DATADIR%%/Rog-goal.lev
+%%DATADIR%%/Rog-loca.lev
+%%DATADIR%%/Rog-strt.lev
+%%DATADIR%%/Sam-fila.lev
+%%DATADIR%%/Sam-filb.lev
+%%DATADIR%%/Sam-goal.lev
+%%DATADIR%%/Sam-loca.lev
+%%DATADIR%%/Sam-strt.lev
+%%DATADIR%%/Tou-fila.lev
+%%DATADIR%%/Tou-filb.lev
+%%DATADIR%%/Tou-goal.lev
+%%DATADIR%%/Tou-loca.lev
+%%DATADIR%%/Tou-strt.lev
+%%DATADIR%%/Val-fila.lev
+%%DATADIR%%/Val-filb.lev
+%%DATADIR%%/Val-goal.lev
+%%DATADIR%%/Val-loca.lev
+%%DATADIR%%/Val-strt.lev
+%%DATADIR%%/Wiz-fila.lev
+%%DATADIR%%/Wiz-filb.lev
+%%DATADIR%%/Wiz-goal.lev
+%%DATADIR%%/Wiz-loca.lev
+%%DATADIR%%/Wiz-strt.lev
+%%DATADIR%%/air.lev
+%%DATADIR%%/asmodeus.lev
+%%DATADIR%%/astral.lev
+%%DATADIR%%/baalz.lev
+%%DATADIR%%/bigrm-1.lev
+%%DATADIR%%/bigrm-2.lev
+%%DATADIR%%/bigrm-3.lev
+%%DATADIR%%/bigrm-4.lev
+%%DATADIR%%/bigrm-5.lev
+%%DATADIR%%/castle.lev
+%%DATADIR%%/cmdhelp
+%%DATADIR%%/data
+%%DATADIR%%/dungeon
+%%DATADIR%%/earth.lev
+%%DATADIR%%/fakewiz1.lev
+%%DATADIR%%/fakewiz2.lev
+%%DATADIR%%/fire.lev
+%%DATADIR%%/help
+%%DATADIR%%/hh
+%%DATADIR%%/history
+%%DATADIR%%/juiblex.lev
+%%DATADIR%%/knox.lev
+%%DATADIR%%/license
+%%DATADIR%%/mapbg.xpm
+%%DATADIR%%/medusa-1.lev
+%%DATADIR%%/medusa-2.lev
+%%DATADIR%%/minefill.lev
+%%DATADIR%%/minend-1.lev
+%%DATADIR%%/minend-2.lev
+%%DATADIR%%/minetn-1.lev
+%%DATADIR%%/minetn-2.lev
+%%DATADIR%%/opthelp
+%%DATADIR%%/options
+%%DATADIR%%/oracle.lev
+%%DATADIR%%/oracles
+%%DATADIR%%/orcus.lev
+%%DATADIR%%/pet_mark.xbm
+%%DATADIR%%/quest.dat
+%%DATADIR%%/recover
+%%DATADIR%%/rip.xpm
+%%DATADIR%%/rumors
+%%DATADIR%%/sanctum.lev
+%%DATADIR%%/soko1-1.lev
+%%DATADIR%%/soko1-2.lev
+%%DATADIR%%/soko2-1.lev
+%%DATADIR%%/soko2-2.lev
+%%DATADIR%%/soko3-1.lev
+%%DATADIR%%/soko3-2.lev
+%%DATADIR%%/soko4-1.lev
+%%DATADIR%%/soko4-2.lev
+%%DATADIR%%/tower1.lev
+%%DATADIR%%/tower2.lev
+%%DATADIR%%/tower3.lev
+%%DATADIR%%/valley.lev
+%%DATADIR%%/water.lev
+%%DATADIR%%/wizard1.lev
+%%DATADIR%%/wizard2.lev
+%%DATADIR%%/wizard3.lev
+%%DATADIR%%/wizhelp
+%%DATADIR%%/x11tiles
@mode 664
-lib/nethack/logfile
-lib/nethack/record
-lib/nethack/perm
+%%DATADIR%%/perm
@mode
-%%PORTDOCS%%share/doc/nethack/Guidebook.txt
-%%PORTDOCS%%@dirrm share/doc/nethack
-@dirrm lib/nethack
+@unexec [ -s %D/%%DATADIR%%/logfile ] || rm -f %D/%%DATADIR%%/logfile
+@exec touch %D/%%DATADIR%%/logfile && chmod 664 %D/%%DATADIR%%/logfile
+@unexec [ -s %D/%%DATADIR%%/record ] || rm -f %D/%%DATADIR%%/record
+@exec touch %D/%%DATADIR%%/record && chmod 664 %D/%%DATADIR%%/record
+@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
+%%PORTDOCS%%@dirrm %%DOCSDIR%%