1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
*** sys/unix/Makefile.top.orig Tue Jul 4 02:42:05 2000
--- sys/unix/Makefile.top Wed Dec 26 13:46:52 2001
***************
*** 14,31 ****
# MAKE = make
# make NetHack
- PREFIX = /usr
GAME = nethack
# GAME = nethack.prg
GAMEUID = games
! GAMEGRP = bin
# Permissions - some places use setgid instead of setuid, for instance
# See also the option "SECURE" in include/config.h
! GAMEPERM = 04755
! FILEPERM = 0644
! EXEPERM = 0755
! DIRPERM = 0755
# GAMEDIR also appears in config.h as "HACKDIR".
# VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR
--- 14,30 ----
# MAKE = make
# make NetHack
GAME = nethack
# GAME = nethack.prg
GAMEUID = games
! GAMEGRP = games
# Permissions - some places use setgid instead of setuid, for instance
# See also the option "SECURE" in include/config.h
! GAMEPERM = 0755
! FILEPERM = 0664
! EXEPERM = 02755
! DIRPERM = 0775
# GAMEDIR also appears in config.h as "HACKDIR".
# VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR
***************
*** 35,43 ****
# 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
# per discussion in Install.X11 and Install.Qt
VARDATND =
--- 34,42 ----
# 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)/share/$(GAME)
VARDIR = $(GAMEDIR)
! SHELLDIR = $(PREFIX)/bin
# per discussion in Install.X11 and Install.Qt
VARDATND =
***************
*** 48,54 ****
# for BeOS
# VARDATND = beostiles
# for Gnome
! # VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm
VARDATD = data oracles options quest.dat rumors
VARDAT = $(VARDATD) $(VARDATND)
--- 47,53 ----
# for BeOS
# VARDATND = beostiles
# for Gnome
! VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm
VARDATD = data oracles options quest.dat rumors
VARDAT = $(VARDATD) $(VARDATND)
***************
*** 170,182 ****
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) )
chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
-$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
$(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
dofiles-dlb: check-dlb
--- 169,189 ----
sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
-e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
< sys/unix/nethack.sh \
! > $(GAMEDIR)/$(GAME)-start.sh
! @echo "#include <unistd.h>" > nethack-wrapper.c
! @echo "int main(int argc, char *argv[]) {" >> nethack-wrapper.c
! @echo " execv(\"$(GAMEDIR)/$(GAME)-start.sh\", argv);}" >> nethack-wrapper.c
! $(CC) $(CFLAGS) -o nethack-wrapper nethack-wrapper.c
! cp nethack-wrapper $(SHELLDIR)/$(GAME)
# set up their permissions
-( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) ; \
$(CHGRP) $(GAMEGRP) $(GAME) )
chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
-$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
$(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
+ chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)-start.sh
+ -$(CHOWN) $(GAMEUID) $(GAMEDIR)/$(GAME)-start.sh
+ $(CHGRP) $(GAMEGRP) $(GAMEDIR)/$(GAME)-start.sh
chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
dofiles-dlb: check-dlb
***************
*** 236,241 ****
--- 243,249 ----
clean:
( cd src ; $(MAKE) clean )
( cd util ; $(MAKE) clean )
+ rm -f nethack-wrapper.c nethack-wrapper
# 'make spotless' returns the source tree to near-distribution condition.
# it removes .o files, executables, and compiled data files
|