summaryrefslogtreecommitdiff
path: root/games/angband/Fix_DESTDIR_support.patch
blob: 51cc9433f7f6bfee85319783effb4f7f65a42cf2 (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
84
85
86
87
88
89
90
91
92
93
Trivial patch by Robby Workman <rworkman@slackware.com>
This simply fixes the install-posthook files to respect DESTDIR settings
instead of trying to write to the real / filesystem.  This will only be
noticed if you enable setgid functionality...

diff -Nur angband-3.1.0beta.orig/lib/apex/Makefile angband-3.1.0beta/lib/apex/Makefile
--- angband-3.1.0beta.orig/lib/apex/Makefile	2008-05-17 08:08:23.000000000 -0500
+++ angband-3.1.0beta/lib/apex/Makefile	2009-03-23 00:05:28.102772735 -0500
@@ -6,10 +6,10 @@
 
 install-posthook:
 	if [ "x$(SETEGID)" != "x" ]; then \
-		printf "%10s %-20s\n" TOUCH ${DATA_PATH}/apex/scores.raw; \
+		printf "%10s %-20s\n" TOUCH $(DESTDIR)${DATA_PATH}/apex/scores.raw; \
 		if [ "x$(DRY)" = "x" ]; then \
-			touch ${DATA_PATH}/apex/scores.raw; \
-			chown -R root:${SETEGID} ${DATA_PATH}/apex; \
-			chmod -R g+w ${DATA_PATH}/apex; \
+			touch $(DESTDIR)${DATA_PATH}/apex/scores.raw; \
+			chown -R root:${SETEGID} $(DESTDIR)${DATA_PATH}/apex; \
+			chmod -R g+w $(DESTDIR)${DATA_PATH}/apex; \
 		fi; \
 	fi;
diff -Nur angband-3.1.0beta.orig/lib/bone/Makefile angband-3.1.0beta/lib/bone/Makefile
--- angband-3.1.0beta.orig/lib/bone/Makefile	2008-05-17 08:08:23.000000000 -0500
+++ angband-3.1.0beta/lib/bone/Makefile	2009-03-23 00:05:36.083328120 -0500
@@ -7,7 +7,7 @@
 install-posthook:
 	if [ "x$(SETEGID)" != "x" ]; then \
 		if [ "x$(DRY)" = "x" ]; then \
-			chown root:${SETEGID} ${DATA_PATH}/bone; \
-			chmod 070 ${DATA_PATH}/bone; \
+			chown root:${SETEGID} $(DESTDIR)${DATA_PATH}/bone; \
+			chmod 070 $(DESTDIR)${DATA_PATH}/bone; \
 		fi; \
 	fi
diff -Nur angband-3.1.0beta.orig/lib/data/Makefile angband-3.1.0beta/lib/data/Makefile
--- angband-3.1.0beta.orig/lib/data/Makefile	2008-06-02 12:36:12.000000000 -0500
+++ angband-3.1.0beta/lib/data/Makefile	2009-03-23 00:05:43.223826793 -0500
@@ -9,23 +9,23 @@
 
 install-posthook:
 	if [ "x$(SETEGID)" != "x" ]; then \
-		printf "%10s %s*.raw\n" TOUCH ${DATA_PATH}/data/; \
+		printf "%10s %s*.raw\n" TOUCH $(DESTDIR)${DATA_PATH}/data/; \
 		if [ "x$(DRY)" = "x" ]; then \
-			touch ${DATA_PATH}/data/artifact.raw; \
-			touch ${DATA_PATH}/data/ego_item.raw; \
-			touch ${DATA_PATH}/data/flavor.raw; \
-			touch ${DATA_PATH}/data/limits.raw; \
-			touch ${DATA_PATH}/data/monster.raw; \
-			touch ${DATA_PATH}/data/object.raw; \
-			touch ${DATA_PATH}/data/p_class.raw; \
-			touch ${DATA_PATH}/data/p_hist.raw; \
-			touch ${DATA_PATH}/data/p_race.raw; \
-			touch ${DATA_PATH}/data/prices.raw; \
-			touch ${DATA_PATH}/data/shop_own.raw; \
-			touch ${DATA_PATH}/data/spells.raw; \
-			touch ${DATA_PATH}/data/terrain.raw; \
-			touch ${DATA_PATH}/data/vault.raw; \
-			chown -R root:${SETEGID} ${DATA_PATH}/data; \
-			chmod -R g+w ${DATA_PATH}/data; \
+			touch $(DESTDIR)${DATA_PATH}/data/artifact.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/ego_item.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/flavor.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/limits.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/monster.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/object.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/p_class.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/p_hist.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/p_race.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/prices.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/shop_own.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/spells.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/terrain.raw; \
+			touch $(DESTDIR)${DATA_PATH}/data/vault.raw; \
+			chown -R root:${SETEGID} $(DESTDIR)${DATA_PATH}/data; \
+			chmod -R g+w $(DESTDIR)${DATA_PATH}/data; \
 		fi; \
 	fi
diff -Nur angband-3.1.0beta.orig/lib/save/Makefile angband-3.1.0beta/lib/save/Makefile
--- angband-3.1.0beta.orig/lib/save/Makefile	2008-05-17 08:08:23.000000000 -0500
+++ angband-3.1.0beta/lib/save/Makefile	2009-03-23 00:06:04.161286215 -0500
@@ -7,7 +7,7 @@
 install-posthook:
 	if [ "x$(SETEGID)" != "x" ]; then \
 		if [ "x$(DRY)" = "x" ]; then \
-			chown root:${SETEGID} ${DATA_PATH}/save; \
-			chmod 070 ${DATA_PATH}/save; \
+			chown root:${SETEGID} $(DESTDIR)${DATA_PATH}/save; \
+			chmod 070 $(DESTDIR)${DATA_PATH}/save; \
 		fi; \
 	fi