aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/nethack34/Makefile36
-rw-r--r--games/nethack34/files/patch-sys-unix-Makefile.doc18
-rw-r--r--games/nethack34/files/patch-sys-unix-Makefile.top92
-rw-r--r--games/nethack34/files/pkg-deinstall.in14
-rw-r--r--games/nethack34/pkg-plist304
5 files changed, 290 insertions, 174 deletions
diff --git a/games/nethack34/Makefile b/games/nethack34/Makefile
index 687c0cee75e7..c514d76afa4d 100644
--- a/games/nethack34/Makefile
+++ b/games/nethack34/Makefile
@@ -4,13 +4,13 @@
PORTNAME= nethack
PORTVERSION= 3.4.3
PORTREVISION= 8
-CATEGORIES?= games
+CATEGORIES= games
MASTER_SITES= SF
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//g}-src
EXTRACT_SUFX= .tgz
MAINTAINER= glewis@FreeBSD.org
-COMMENT= Dungeon explorin', slashin', hackin' game
+COMMENT= Dungeon explorin', slashin', hackin\' game
LICENSE= nethack
LICENSE_NAME= NETHACK GENERAL PUBLIC LICENSE
@@ -20,18 +20,16 @@ LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USES= gmake
-NO_STAGE= yes
MAKE_ENV= GRAPHICS="${GRAPHICS}"
-PLIST_SUB= HACKNAME="${HACKNAME}" \
- HACKDIR="${HACKDIR}" \
- HACKDOCSDIR="${HACKDOCSDIR}"
-
-MAN6= dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
+PLIST_SUB= HACKNAME="${HACKNAME}"
# Configure these variables as you want them to be.
HACKNAME?= nethack
-HACKDIR?= lib/${HACKNAME}
-HACKDOCSDIR?= share/doc/${HACKNAME}
+HACKDIR?= share/${HACKNAME}
+
+DATADIR= ${PREFIX}/${HACKDIR}
+DOCSDIR= ${PREFIX}/share/doc/${HACKNAME}
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
.if !defined(PKGNAMESUFFIX)
USE_XORG= xaw xpm
@@ -86,8 +84,10 @@ OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
post-patch:
-.for f in include/config.h sys/unix/Makefile.src sys/unix/Makefile.top
- @${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g;s|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' ${WRKSRC}/${f}
+.for f in include/config.h sys/unix/Makefile.top
+ @${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
+ -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
+ ${WRKSRC}/${f}
.endfor
@${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
.if defined(WITHOUT_SHELL)
@@ -97,14 +97,18 @@ post-patch:
@${REINPLACE_CMD} -e 's|/\* #define MAIL \*/|#define MAIL|' ${WRKSRC}/include/unixconf.h
.endif
-pre-configure:
+do-configure:
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
+pre-install:
+ @${CAT} ${FILESDIR}/pkg-deinstall.in | ${SED} \
+ -e 's|%%HACKDIR%%|${HACKDIR}|g' > ${PKGDEINSTALL}
+
post-install:
- @cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} manpages
+ @cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} manpages
.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${PREFIX}/${HACKDOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${PREFIX}/${HACKDOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.post.mk>
diff --git a/games/nethack34/files/patch-sys-unix-Makefile.doc b/games/nethack34/files/patch-sys-unix-Makefile.doc
index 2527c7b4128e..bb3bdb358d38 100644
--- a/games/nethack34/files/patch-sys-unix-Makefile.doc
+++ b/games/nethack34/files/patch-sys-unix-Makefile.doc
@@ -1,6 +1,6 @@
---- sys/unix/Makefile.doc.orig Sat Jan 15 05:49:48 2000
-+++ sys/unix/Makefile.doc Sat Aug 11 11:08:33 2001
-@@ -34,15 +34,15 @@
+--- sys/unix/Makefile.doc.orig 2003-12-07 15:39:13.000000000 -0800
++++ sys/unix/Makefile.doc 2014-06-28 23:05:31.000000000 -0700
+@@ -41,15 +41,15 @@
GAME = nethack
@@ -22,7 +22,7 @@
# manual installation for most SYSV-style systems
# GAMEMANCREATE = nroff -man nethack.6 >
# LEVMANCREATE = nroff -man lev_comp.6 >
-@@ -51,11 +51,11 @@
+@@ -58,11 +58,11 @@
# DLBMANCREATE = nroff -man dlb.6 >
manpages:
@@ -31,11 +31,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) ${DESTDIR}$(MANDIR)$(MANEXT)/$(GAME).$(MANEXT)
++ -$(LEVMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/lev_comp.$(MANEXT)
++ -$(DGNMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/dgn_comp.$(MANEXT)
++ -$(RCVRMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/recover.$(MANEXT)
++ -$(DLBMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/dlb.$(MANEXT)
# manual creation for distribution
DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt
diff --git a/games/nethack34/files/patch-sys-unix-Makefile.top b/games/nethack34/files/patch-sys-unix-Makefile.top
index 575b5df94e9f..0b21d3be38df 100644
--- a/games/nethack34/files/patch-sys-unix-Makefile.top
+++ b/games/nethack34/files/patch-sys-unix-Makefile.top
@@ -1,5 +1,5 @@
---- sys/unix/Makefile.top.orig Sat Aug 30 09:08:04 2003
-+++ sys/unix/Makefile.top Mon Sep 1 22:38:47 2003
+--- sys/unix/Makefile.top.orig 2003-12-07 15:39:13.000000000 -0800
++++ sys/unix/Makefile.top 2014-06-28 23:20:31.000000000 -0700
@@ -14,18 +14,17 @@
# MAKE = make
@@ -29,10 +29,10 @@
# (if there is, you'll have to do the installation by hand or modify the
# instructions)
-GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir
-+GAMEDIR = %%HACKDIR%%
++GAMEDIR = ${PREFIX}/share/%%HACKNAME%%
VARDIR = $(GAMEDIR)
-SHELLDIR = $(PREFIX)/games
-+SHELLDIR = $(PREFIX)/bin
++SHELLDIR = ${PREFIX}/bin
# per discussion in Install.X11 and Install.Qt
-VARDATND =
@@ -49,3 +49,87 @@
VARDATD = data oracles options quest.dat rumors
VARDAT = $(VARDATD) $(VARDATND)
+@@ -183,49 +182,32 @@
+ -e '}' \
+ -e '$$s/.*/nodlb/p' < dat/options` ; \
+ $(MAKE) dofiles-$${target-nodlb}
+- cp src/$(GAME) $(GAMEDIR)
+- cp util/recover $(GAMEDIR)
+- -rm -f $(SHELLDIR)/$(GAME)
++ cp src/$(GAME) ${DESTDIR}$(GAMEDIR)/$(GAME)
++ cp util/recover ${DESTDIR}$(GAMEDIR)
++ -rm -f ${DESTDIR}$(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) recover ; \
+- $(CHGRP) $(GAMEGRP) $(GAME) recover )
+- chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
+- chmod $(EXEPERM) $(GAMEDIR)/recover
+- -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
+- $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
+- chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
++ > ${DESTDIR}$(SHELLDIR)/$(GAME)
+
+ dofiles-dlb: check-dlb
+- ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) )
+-# set up their permissions
+- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \
+- $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \
+- chmod $(FILEPERM) nhdat $(DATNODLB) )
++ ( cd dat ; cp nhdat $(DATNODLB) ${DESTDIR}$(GAMEDIR) )
+
+ dofiles-nodlb:
+ # copy over the game files
+- ( cd dat ; cp $(DAT) $(GAMEDIR) )
+-# set up their permissions
+- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \
+- $(CHGRP) $(GAMEGRP) $(DAT) ; \
+- chmod $(FILEPERM) $(DAT) )
++ ( cd dat ; cp $(DAT) ${DESTDIR}$(GAMEDIR) )
+
+ 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
++ -mv ${DESTDIR}$(GAMEDIR)/$(GAME) ${DESTDIR}$(GAMEDIR)/$(GAME).old
+ # quest.dat is also kept open and has the same problems over NFS
+ # (quest.dat may be inside nhdat if dlb is in use)
+- -mv $(GAMEDIR)/quest.dat $(GAMEDIR)/quest.dat.old
+- -mv $(GAMEDIR)/nhdat $(GAMEDIR)/nhdat.old
++ -mv ${DESTDIR}$(GAMEDIR)/quest.dat ${DESTDIR}$(GAMEDIR)/quest.dat.old
++ -mv ${DESTDIR}$(GAMEDIR)/nhdat ${DESTDIR}$(GAMEDIR)/nhdat.old
+ # set up new versions of the game files
+ ( $(MAKE) dofiles )
+ # touch time-sensitive files
+ -touch -c $(VARDIR)/bones* $(VARDIR)/?lock* $(VARDIR)/wizard*
+- -touch -c $(VARDIR)/save/*
+ touch $(VARDIR)/perm $(VARDIR)/record
+ # and a reminder
+ @echo You may also want to install the man pages via the doc Makefile.
+@@ -233,20 +215,14 @@
+ 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)
+- -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save
++ -mkdir -p ${DESTDIR}$(SHELLDIR)
++ -rm -rf ${DESTDIR}$(GAMEDIR) ${DESTDIR}$(VARDIR)
++ -mkdir -p ${DESTDIR}$(GAMEDIR) ${DESTDIR}$(VARDIR)
+ -rmdir ./-p
+- -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+- $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+- chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+ # set up the game files
+ ( $(MAKE) dofiles )
+ # set up some additional files
+- touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile
+- -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
+- $(CHGRP) $(GAMEGRP) perm record logfile ; \
+- chmod $(FILEPERM) perm record logfile )
++ touch ${DESTDIR}$(VARDIR)/perm ${DESTDIR}$(VARDIR)/record ${DESTDIR}$(VARDIR)/logfile
+ # and a reminder
+ @echo You may also want to reinstall the man pages via the doc Makefile.
+
diff --git a/games/nethack34/files/pkg-deinstall.in b/games/nethack34/files/pkg-deinstall.in
new file mode 100644
index 000000000000..04e356acdf02
--- /dev/null
+++ b/games/nethack34/files/pkg-deinstall.in
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+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/nethack34/pkg-plist b/games/nethack34/pkg-plist
index cc8b90aff416..74756c0affed 100644
--- a/games/nethack34/pkg-plist
+++ b/games/nethack34/pkg-plist
@@ -1,148 +1,162 @@
+@mode 555
bin/%%HACKNAME%%
-%%HACKDIR%%/%%HACKNAME%%
-@exec mkdir %D/%%HACKDIR%%/save
-@exec chmod -R 775 %D/%%HACKDIR%%
-@exec chmod 2755 %D/%%HACKDIR%%/%%HACKNAME%%
-@exec chown games:games %D/%%HACKDIR%%/save
-%%HACKDIR%%/Arc-fila.lev
-%%HACKDIR%%/Arc-filb.lev
-%%HACKDIR%%/Arc-goal.lev
-%%HACKDIR%%/Arc-loca.lev
-%%HACKDIR%%/Arc-strt.lev
-%%HACKDIR%%/Bar-fila.lev
-%%HACKDIR%%/Bar-filb.lev
-%%HACKDIR%%/Bar-goal.lev
-%%HACKDIR%%/Bar-loca.lev
-%%HACKDIR%%/Bar-strt.lev
-%%HACKDIR%%/Cav-fila.lev
-%%HACKDIR%%/Cav-filb.lev
-%%HACKDIR%%/Cav-goal.lev
-%%HACKDIR%%/Cav-loca.lev
-%%HACKDIR%%/Cav-strt.lev
-%%HACKDIR%%/Hea-fila.lev
-%%HACKDIR%%/Hea-filb.lev
-%%HACKDIR%%/Hea-goal.lev
-%%HACKDIR%%/Hea-loca.lev
-%%HACKDIR%%/Hea-strt.lev
-%%HACKDIR%%/Kni-fila.lev
-%%HACKDIR%%/Kni-filb.lev
-%%HACKDIR%%/Kni-goal.lev
-%%HACKDIR%%/Kni-loca.lev
-%%HACKDIR%%/Kni-strt.lev
-%%HACKDIR%%/Mon-fila.lev
-%%HACKDIR%%/Mon-filb.lev
-%%HACKDIR%%/Mon-goal.lev
-%%HACKDIR%%/Mon-loca.lev
-%%HACKDIR%%/Mon-strt.lev
-%%HACKDIR%%/Pri-fila.lev
-%%HACKDIR%%/Pri-filb.lev
-%%HACKDIR%%/Pri-goal.lev
-%%HACKDIR%%/Pri-loca.lev
-%%HACKDIR%%/Pri-strt.lev
-%%HACKDIR%%/Ran-fila.lev
-%%HACKDIR%%/Ran-filb.lev
-%%HACKDIR%%/Ran-goal.lev
-%%HACKDIR%%/Ran-loca.lev
-%%HACKDIR%%/Ran-strt.lev
-%%HACKDIR%%/Rog-fila.lev
-%%HACKDIR%%/Rog-filb.lev
-%%HACKDIR%%/Rog-goal.lev
-%%HACKDIR%%/Rog-loca.lev
-%%HACKDIR%%/Rog-strt.lev
-%%HACKDIR%%/Sam-fila.lev
-%%HACKDIR%%/Sam-filb.lev
-%%HACKDIR%%/Sam-goal.lev
-%%HACKDIR%%/Sam-loca.lev
-%%HACKDIR%%/Sam-strt.lev
-%%HACKDIR%%/Tou-fila.lev
-%%HACKDIR%%/Tou-filb.lev
-%%HACKDIR%%/Tou-goal.lev
-%%HACKDIR%%/Tou-loca.lev
-%%HACKDIR%%/Tou-strt.lev
-%%HACKDIR%%/Val-fila.lev
-%%HACKDIR%%/Val-filb.lev
-%%HACKDIR%%/Val-goal.lev
-%%HACKDIR%%/Val-loca.lev
-%%HACKDIR%%/Val-strt.lev
-%%HACKDIR%%/Wiz-fila.lev
-%%HACKDIR%%/Wiz-filb.lev
-%%HACKDIR%%/Wiz-goal.lev
-%%HACKDIR%%/Wiz-loca.lev
-%%HACKDIR%%/Wiz-strt.lev
-%%HACKDIR%%/air.lev
-%%HACKDIR%%/asmodeus.lev
-%%HACKDIR%%/astral.lev
-%%HACKDIR%%/baalz.lev
-%%HACKDIR%%/bigrm-1.lev
-%%HACKDIR%%/bigrm-2.lev
-%%HACKDIR%%/bigrm-3.lev
-%%HACKDIR%%/bigrm-4.lev
-%%HACKDIR%%/bigrm-5.lev
-%%HACKDIR%%/castle.lev
-%%HACKDIR%%/cmdhelp
-%%HACKDIR%%/data
-%%HACKDIR%%/dungeon
-%%HACKDIR%%/earth.lev
-%%HACKDIR%%/fakewiz1.lev
-%%HACKDIR%%/fakewiz2.lev
-%%HACKDIR%%/fire.lev
-%%HACKDIR%%/help
-%%HACKDIR%%/hh
-%%HACKDIR%%/history
-%%HACKDIR%%/juiblex.lev
-%%HACKDIR%%/knox.lev
-%%HACKDIR%%/license
-%%HACKDIR%%/mapbg.xpm
-%%HACKDIR%%/medusa-1.lev
-%%HACKDIR%%/medusa-2.lev
-%%HACKDIR%%/minefill.lev
-%%HACKDIR%%/minend-1.lev
-%%HACKDIR%%/minend-2.lev
-%%HACKDIR%%/minend-3.lev
-%%HACKDIR%%/minetn-1.lev
-%%HACKDIR%%/minetn-2.lev
-%%HACKDIR%%/minetn-3.lev
-%%HACKDIR%%/minetn-4.lev
-%%HACKDIR%%/minetn-5.lev
-%%HACKDIR%%/minetn-6.lev
-%%HACKDIR%%/minetn-7.lev
-%%HACKDIR%%/opthelp
-%%HACKDIR%%/options
-%%HACKDIR%%/oracle.lev
-%%HACKDIR%%/oracles
-%%HACKDIR%%/orcus.lev
-%%HACKDIR%%/pet_mark.xbm
-%%HACKDIR%%/quest.dat
-%%HACKDIR%%/rip.xpm
-%%HACKDIR%%/recover
-%%HACKDIR%%/rumors
-%%HACKDIR%%/sanctum.lev
-%%HACKDIR%%/soko1-1.lev
-%%HACKDIR%%/soko1-2.lev
-%%HACKDIR%%/soko2-1.lev
-%%HACKDIR%%/soko2-2.lev
-%%HACKDIR%%/soko3-1.lev
-%%HACKDIR%%/soko3-2.lev
-%%HACKDIR%%/soko4-1.lev
-%%HACKDIR%%/soko4-2.lev
-%%HACKDIR%%/tower1.lev
-%%HACKDIR%%/tower2.lev
-%%HACKDIR%%/tower3.lev
-%%HACKDIR%%/valley.lev
-%%HACKDIR%%/water.lev
-%%HACKDIR%%/wizard1.lev
-%%HACKDIR%%/wizard2.lev
-%%HACKDIR%%/wizard3.lev
-%%HACKDIR%%/wizhelp
-%%HACKDIR%%/x11tiles
+@owner games
+@group games
+@mode 02755
+%%DATADIR%%/%%HACKNAME%%
+@mode
+%%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
+@mode 664
+%%DATADIR%%/logfile
+@mode
+%%DATADIR%%/mapbg.xpm
+%%DATADIR%%/medusa-1.lev
+%%DATADIR%%/medusa-2.lev
+%%DATADIR%%/minefill.lev
+%%DATADIR%%/minend-1.lev
+%%DATADIR%%/minend-2.lev
+%%DATADIR%%/minend-3.lev
+%%DATADIR%%/minetn-1.lev
+%%DATADIR%%/minetn-2.lev
+%%DATADIR%%/minetn-3.lev
+%%DATADIR%%/minetn-4.lev
+%%DATADIR%%/minetn-5.lev
+%%DATADIR%%/minetn-6.lev
+%%DATADIR%%/minetn-7.lev
+%%DATADIR%%/opthelp
+%%DATADIR%%/options
+%%DATADIR%%/oracle.lev
+%%DATADIR%%/oracles
+%%DATADIR%%/orcus.lev
+%%DATADIR%%/perm
+%%DATADIR%%/pet_mark.xbm
+%%DATADIR%%/quest.dat
@mode 664
-%%HACKDIR%%/perm
+%%DATADIR%%/record
+@mode
+@mode 02755
+%%DATADIR%%/recover
+@mode
+%%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
-@unexec [ -s %D/%%HACKDIR%%/logfile ] || rm -f %D/%%HACKDIR%%/logfile
-@exec touch %D/%%HACKDIR%%/logfile && chmod 664 %D/%%HACKDIR%%/logfile
-@unexec [ -s %D/%%HACKDIR%%/record ] || rm -f %D/%%HACKDIR%%/record
-@exec touch %D/%%HACKDIR%%/record && chmod 664 %D/%%HACKDIR%%/record
-@unexec rmdir %D/%%HACKDIR%%/save >/dev/null 2>&1 || echo 'Nethack directory (%D/%%HACKDIR%%/) not removed due to existing save games. If you are permanently removing this port, you should do a ``rm -rf %D/%%HACKDIR%%``.' | fmt
-@dirrmtry %%HACKDIR%%
-%%PORTDOCS%%%%HACKDOCSDIR%%/Guidebook.txt
-%%PORTDOCS%%@dirrm %%HACKDOCSDIR%%
+@owner
+@group
+man/man6/dgn_comp.6.gz
+man/man6/dlb.6.gz
+man/man6/lev_comp.6.gz
+man/man6/%%HACKNAME%%.6.gz
+man/man6/recover.6.gz
+%%PORTDOCS%%%%DOCSDIR%%/Guidebook.txt
+@exec mkdir %D/%%DATADIR%%/save
+@exec chown games:games %D/%%DATADIR%%/save
+@exec chmod 0775 %D/%%DATADIR%%/save
+@unexec rmdir %D/%%DATADIR%%/save
+@dirrmtry %%DATADIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%