diff options
Diffstat (limited to 'games/nethack/patches/Makefile_top.patch')
-rw-r--r-- | games/nethack/patches/Makefile_top.patch | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/games/nethack/patches/Makefile_top.patch b/games/nethack/patches/Makefile_top.patch new file mode 100644 index 0000000000..27ef3b7da0 --- /dev/null +++ b/games/nethack/patches/Makefile_top.patch @@ -0,0 +1,140 @@ +--- sys/unix/Makefile.top 2003-12-07 17:39:13.000000000 -0600 ++++ sys/unix/Makefile.top.slack 2008-05-15 15:29:20.000000000 -0500 +@@ -17,15 +17,15 @@ + PREFIX = /usr + GAME = nethack + # GAME = nethack.prg +-GAMEUID = games +-GAMEGRP = bin ++GAMEUID = root ++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". + # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR +@@ -35,14 +35,14 @@ + # 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 = $(PREFIX)/games/lib/$(GAME)dir +-VARDIR = $(GAMEDIR) +-SHELLDIR = $(PREFIX)/games ++GAMEDIR = $(PREFIX)/share/games/nethack ++VARDIR = /var/lib/nethack ++SHELLDIR = $(PREFIX)/bin + + # per discussion in Install.X11 and Install.Qt +-VARDATND = ++# VARDATND = + # VARDATND = x11tiles NetHack.ad pet_mark.xbm +-# VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm ++VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm nhsplash.xpm + # for Atari/Gem + # VARDATND = nh16.img title.img GEM_RSC.RSC rip.img + # for BeOS +@@ -183,68 +183,68 @@ + -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) ++ 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) ++ > $(DESTDIR)/$(SHELLDIR)/$(GAME) + # set up their permissions +- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ ++ -( cd $(DESTDIR)/$(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) ++ chmod $(GAMEPERM) $(DESTDIR)/$(GAMEDIR)/$(GAME) ++ chmod $(EXEPERM) $(DESTDIR)/$(GAMEDIR)/recover ++ -$(CHOWN) $(GAMEUID) $(DESTDIR)/$(SHELLDIR)/$(GAME) ++ $(CHGRP) $(GAMEGRP) $(DESTDIR)/$(SHELLDIR)/$(GAME) ++ chmod $(EXEPERM) $(DESTDIR)/$(SHELLDIR)/$(GAME) + + dofiles-dlb: check-dlb +- ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) ) ++ ( cd dat ; cp nhdat $(DATNODLB) $(DESTDIR)/$(GAMEDIR) ) + # set up their permissions +- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \ ++ -( cd $(DESTDIR)/$(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \ + $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \ + chmod $(FILEPERM) nhdat $(DATNODLB) ) + + dofiles-nodlb: + # copy over the game files +- ( cd dat ; cp $(DAT) $(GAMEDIR) ) ++ ( cd dat ; cp $(DAT) $(DESTDIR)/$(GAMEDIR) ) + # set up their permissions +- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \ ++ -( cd $(DESTDIR)/$(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \ + $(CHGRP) $(GAMEGRP) $(DAT) ; \ + chmod $(FILEPERM) $(DAT) ) + + 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 ++ -touch -c $(DESTDIR)/$(VARDIR)/bones* $(DESTDIR)/$(VARDIR)/?lock* $(DESTDIR)/$(VARDIR)/wizard* ++ -touch -c $(DESTDIR)/$(VARDIR)/save/* ++ touch $(DESTDIR)/$(VARDIR)/perm $(DESTDIR)/$(VARDIR)/record + # and a reminder + @echo You may also want to install the man pages via the doc Makefile. + + 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) $(DESTDIR)/$(VARDIR)/save + -rmdir ./-p +- -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save +- $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save +- chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save ++ -$(CHOWN) $(GAMEUID) $(DESTDIR)/$(GAMEDIR) $(DESTDIR)/$(VARDIR) $(DESTDIR)/$(VARDIR)/save ++ $(CHGRP) $(GAMEGRP) $(DESTDIR)/$(GAMEDIR) $(DESTDIR)/$(VARDIR) $(DESTDIR)/$(VARDIR)/save ++ chmod $(DIRPERM) $(DESTDIR)/$(GAMEDIR) $(DESTDIR)/$(VARDIR) $(DESTDIR)/$(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 ; \ ++ touch $(DESTDIR)/$(VARDIR)/perm $(DESTDIR)/$(VARDIR)/record $(DESTDIR)/$(VARDIR)/logfile ++ -( cd $(DESTDIR)/$(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ + $(CHGRP) $(GAMEGRP) perm record logfile ; \ + chmod $(FILEPERM) perm record logfile ) + # and a reminder |