49f6c471fd
The approach is slightly different from that taken by nethack34 and prevents the manual page conflicts produced by that approach. . While here, clean up the Makefile a little w.r.t. order and clean up the packing list to not produce warnings when the log or record are removed. With this change, you can have all nethack versions from ports installed at once. However, this isn't as pleasant as it could be, and I'd like to address this in the future by merging some changes from here into nethack33 (in particular) and nethack34.
106 lines
3.1 KiB
Text
106 lines
3.1 KiB
Text
$FreeBSD$
|
|
|
|
--- sys/unix/Makefile.top.orig Tue Dec 10 13:20:10 1996
|
|
+++ sys/unix/Makefile.top Sun Apr 11 23:25:22 2004
|
|
@@ -14,16 +14,16 @@
|
|
# MAKE = make
|
|
|
|
# make NetHack
|
|
-GAME = nethack
|
|
+GAME = %%HACKNAME%%
|
|
GAMEUID = games
|
|
-GAMEGRP = bin
|
|
+GAMEGRP = games
|
|
|
|
# Permissions - some places use setgid instead of setuid, for instance
|
|
# See also the option "SECURE" in include/config.h
|
|
-GAMEPERM = 04755
|
|
-FILEPERM = 0644
|
|
+GAMEPERM = 02755
|
|
+FILEPERM = 0664
|
|
EXEPERM = 0755
|
|
-DIRPERM = 0755
|
|
+DIRPERM = 0775
|
|
|
|
# GAMEDIR also appears in config.h as "HACKDIR".
|
|
#
|
|
@@ -32,13 +32,13 @@
|
|
# therefore there should not be anything in GAMEDIR that you want to keep
|
|
# (if there is, you'll have to do the installation by hand or modify the
|
|
# instructions)
|
|
-GAMEDIR = /usr/games/lib/$(GAME)dir
|
|
-SHELLDIR = /usr/games
|
|
+GAMEDIR = %%HACKDIR%%
|
|
+SHELLDIR = ${PREFIX}/bin
|
|
|
|
# per discussion in Install.X11
|
|
-VARDATND =
|
|
+# VARDATND =
|
|
# VARDATND = x11tiles pet_mark.xbm
|
|
-# VARDATND = x11tiles pet_mark.xbm rip.xpm
|
|
+VARDATND = x11tiles pet_mark.xbm rip.xpm
|
|
|
|
VARDATD = data oracles options quest.dat rumors
|
|
VARDAT = $(VARDATD) $(VARDATND)
|
|
@@ -74,7 +74,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:
|
|
@@ -126,6 +126,8 @@
|
|
( cd util ; $(MAKE) dlb )
|
|
( cd dat ; ../util/dlb cf nhdat $(DATDLB) )
|
|
|
|
+recover:
|
|
+ ( cd util ; $(MAKE) recover )
|
|
|
|
dofiles:
|
|
target=`sed -n \
|
|
@@ -135,16 +137,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)
|
|
@@ -164,7 +168,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
|
|
@@ -180,10 +184,10 @@
|
|
# 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
|
|
-mkdir $(SHELLDIR)
|
|
- -rm -rf $(GAMEDIR)
|
|
+ -rmdir $(GAMEDIR)
|
|
-mkdir $(GAMEDIR) $(GAMEDIR)/save
|
|
-$(CHOWN) $(GAMEUID) $(GAMEDIR) $(GAMEDIR)/save
|
|
$(CHGRP) $(GAMEGRP) $(GAMEDIR) $(GAMEDIR)/save
|