summaryrefslogtreecommitdiff
path: root/games/xtrojka/files/patch-aa
blob: c84978d819c1a9213106bf5004e4e5f9773d6617 (plain)
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
--- Makefile.orig	Sat Oct 21 22:38:22 1995
+++ Makefile	Wed Jul 12 08:50:34 2000
@@ -8,7 +8,7 @@
 
 #	your favorite C-compiler
 #
-CC=gcc
+CC?=gcc
 #CC=cc
 
 
@@ -22,13 +22,13 @@
 #	Touch 'hiscore.c' and 'score_status_mgr.c' when you change
 #	these variables!
 #
-HSFILE=/usr/local/games/lib/xtrojka.scores
+HSFILE=${PREFIX}/share/xtrojka/xtrojka.scores
 #HSFILE=/tmp/xtrojka.scores
 CFLAGS= -DSCOREFILE='"$(HSFILE)"' 
 
 # add library search path
 #
-CFLAGS+=-L/usr/X11/lib
+CFLAGS+=-L${X11BASE}/lib
 
 # on some systems you might add this line, because gcc starts wining
 # about 'sizeof(Display)', since Display might be an empty struct;
@@ -42,24 +42,28 @@
 
 #	location of xtrojka game
 #
-TARGET_DIR=/usr/games
+TARGET_DIR=${PREFIX}/bin
 
 
 #	location of the manualpage
 #
-MANDIR=/usr/local/man/man6
+MANDIR=${PREFIX}/man/man6
 
 
 #	please comment out for the system you use
 #
 #	sunos 4.1.3
-XDIR=/usr/openwin/include
-LIBS=-lm
+#XDIR=/usr/openwin/include
+#LIBS=-lm
 
 # solaris
 #XDIR=/usr/openwin/include
 #LIBS=-lnsl
 
+# FreeBSD
+XDIR=${X11BASE}/include
+LIBS=-lm
+
 #
 #
 #	main
@@ -101,11 +105,17 @@
 #
 #
 install:
-	@echo $(HSFILE)|sed -e 's/\//\\\//g'>/tmp/hsn; \
-	sed -e "s/__SCOREDIR__/`cat /tmp/hsn`/g" manpage > xtrojka.6; \
-	cp xtrojka.6 $(MANDIR); chmod go+r xtrojka.6; \
-	cp xtrojka $(TARGET_DIR);chmod go+rx xtrojka; \
-	touch $(HSFILE); chmod go+rwx $(HSFILE);
+	@rm -f hsn
+	echo $(HSFILE)|sed -e 's/\//\\\//g'>hsn
+	sed -e "s/__SCOREDIR__/`cat hsn`/g" manpage > xtrojka.6
+	gzip -c xtrojka.6 >$(MANDIR)/xtrojka.6.gz
+	cp xtrojka $(TARGET_DIR)
+	chmod 2755 $(TARGET_DIR)/xtrojka
+	chgrp games $(TARGET_DIR)/xtrojka
+	touch $(HSFILE)
+	chmod 664 $(HSFILE)
+	chgrp games $(HSFILE)
+	@rm -f hsn
 	
 clean:
 	rm -rf *.o core xtrojka xtrojka.6