summaryrefslogtreecommitdiff
path: root/games/moria/files/patch-unix::Makefile
blob: 281059488f5a173482ae7a0268e298eed408f98e (plain) (blame)
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
$FreeBSD$

--- unix/Makefile.orig	Thu Jul 21 16:37:08 1994
+++ unix/Makefile	Tue Aug 12 10:12:16 2003
@@ -3,15 +3,15 @@
 # LIBDIR must be the same directory defined in config.h
 # OWNER is who you want the game to be chown to.
 # GROUP is who you wnat the game to be chgrp to.
-BINDIR = /home/zariski/grabiner/moria
-LIBDIR = /home/zariski/grabiner/moria/files
-OWNER = grabiner
-GROUP = grad
+BINDIR = %%PREFIX%%/bin
+LIBDIR = %%PREFIX%%/share/moria/
+OWNER = games
+GROUP = games
 
 # For testing and debugging the program, it is best to use this line.
 # CFLAGS = -g
 # For playing the game, you may want to use this line
-CFLAGS = -O
+#CFLAGS = -O
 
 # For BSD Systems
 CURSES = -lcurses -ltermcap
@@ -26,7 +26,7 @@
 # Normal systems don't require anything here.
 LFLAGS = 
 
-CC = cc
+#CC = cc
 
 SRCS = main.c misc1.c misc2.c misc3.c misc4.c store1.c files.c io.c \
 	create.c desc.c generate.c sets.c dungeon.c creature.c death.c \
@@ -60,17 +60,19 @@
 # you must define BINDIR and LIBDIR before installing
 # assumes that BINDIR and LIBDIR exist
 install:
-	chmod 755 $(BINDIR)
-	cp moria $(BINDIR)
-	chmod 4711 $(BINDIR)/moria
-	chmod 711 $(LIBDIR)
-	(cd files; cp $(LIBFILES) $(LIBDIR))
-	(cd $(LIBDIR); chmod 444 $(LIBFILES))
-	(cd $(LIBDIR); touch scores; chmod 644 scores)
-	chown $(OWNER) $(BINDIR)/moria
-	chgrp $(GROUP) $(BINDIR)/moria
-	(cd $(LIBDIR); chown $(OWNER) $(LIBFILES) scores)
-	(cd $(LIBDIR); chgrp $(GROUP) $(LIBFILES) scores)
+	-${MKDIR} $(BINDIR)
+	${CHMOD} 755 $(BINDIR)
+	${BSD_INSTALL_PROGRAM} moria $(BINDIR)
+	${CHMOD} 4711 $(BINDIR)/moria
+	-${MKDIR} $(LIBDIR)
+	${CHMOD} 711 $(LIBDIR)
+	(cd files; ${BSD_INSTALL_DATA} $(LIBFILES) $(LIBDIR))
+	(cd $(LIBDIR); ${CHMOD} 444 $(LIBFILES))
+	(cd $(LIBDIR); ${TOUCH} scores; ${CHMOD} 644 scores)
+	${CHOWN} $(OWNER) $(BINDIR)/moria
+	${CHGRP} $(GROUP) $(BINDIR)/moria
+	(cd $(LIBDIR); ${CHOWN} $(OWNER) $(LIBFILES) scores)
+	(cd $(LIBDIR); ${CHGRP} $(GROUP) $(LIBFILES) scores)
 # If you are short on disk space, or aren't interested in debugging moria.
 #	strip $(BINDIR)/moria