Package: gnarwl / 3.6.dfsg-11

fln/0007-Implement-DESTDIR-support-in-make-install-Targets.patch Patch series | download
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
From cdf324190cce16671fb5e9d33ecef76e8030c075 Mon Sep 17 00:00:00 2001
From: Bernhard Schmidt <berni@debian.org>
Date: Thu, 15 Sep 2016 17:28:07 +0200
Subject: [PATCH] Implement DESTDIR support in make install-Targets

This eases the burden for package maintainers where the build system
needs to install the files in a temporary directory for packaging.
---
 data/Makefile | 14 +++++++-------
 doc/Makefile  | 32 ++++++++++++++++----------------
 src/Makefile  |  6 +++---
 3 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/data/Makefile b/data/Makefile
index e00ea67..89c5a3a 100644
--- a/data/Makefile
+++ b/data/Makefile
@@ -13,11 +13,11 @@ spec:
 	@sed "s\\_BIN_\\$(BIN)\\g ; s\\_VER_\\$(VER)\\g; s\\_SBIN_\\$(SBIN)\\g; s\\_SEC_\\$(MAN_SEC)\\g" < spec.tmpl > $(BIN)-$(VER).spec 
 
 install:
-	mkdir -m 755 -p  $(HOMEDIR)/block $(HOMEDIR)/bin $(CONFDIR)
-	echo \|$(BINDIR)/$(BIN) > $(HOMEDIR)/.forward
-	install -m 644 header.txt $(HOMEDIR)
-	install -m 644 footer.txt $(HOMEDIR)
-	install -m 600 gnarwl.cfg $(CONFDIR)
-	cat badheaders.txt | $(SBINDIR)/$(SBIN) -a $(HOMEDIR)/badheaders.db
-	cat blacklist.txt | $(SBINDIR)/$(SBIN) -a $(HOMEDIR)/blacklist.db
+	mkdir -m 755 -p  $(DESTDIR)$(HOMEDIR)/block $(DESTDIR)$(HOMEDIR)/bin $(DESTDIR)$(CONFDIR)
+	echo \|$(BINDIR)/$(BIN) > $(DESTDIR)$(HOMEDIR)/.forward
+	install -m 644 header.txt $(DESTDIR)$(HOMEDIR)
+	install -m 644 footer.txt $(DESTDIR)$(HOMEDIR)
+	install -m 600 gnarwl.cfg $(DESTDIR)$(CONFDIR)
+	cat badheaders.txt | $(DESTDIR)$(SBINDIR)/$(SBIN) -a $(DESTDIR)$(HOMEDIR)/badheaders.db
+	cat blacklist.txt | $(DESTDIR)$(SBINDIR)/$(SBIN) -a $(DESTDIR)$(HOMEDIR)/blacklist.db
 
diff --git a/doc/Makefile b/doc/Makefile
index 571b082..b4486b6 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -13,19 +13,19 @@ manpage:
 
 
 install:
-	mkdir -m 755 -p $(DOCDIR) $(MANDIR)/man$(MAN_SEC)
-	install -m 644 $(BIN).$(MAN_SEC) $(MANDIR)/man$(MAN_SEC)
-	install -m 644 $(SBIN).$(MAN_SEC) $(MANDIR)/man$(MAN_SEC)
-	install -m 644 FAQ $(DOCDIR)
-	install -m 644 LICENSE $(DOCDIR)
-	install -m 644 AUTHORS $(DOCDIR)
-	install -m 644 INSTALL $(DOCDIR)
-	install -m 644 ISPEnv.schema $(DOCDIR)
-	install -m 644 ISPEnv2.schema $(DOCDIR)
-	install -m 644 example.ldif $(DOCDIR)
-	install -m 644 HISTORY $(DOCDIR)
-	install -m 644 README $(DOCDIR)
-	gzip -f -9 $(DOCDIR)/FAQ
-	gzip -f -9 $(DOCDIR)/HISTORY
-	gzip -f -9 $(MANDIR)/man$(MAN_SEC)/$(BIN).$(MAN_SEC)
-	gzip -f -9 $(MANDIR)/man$(MAN_SEC)/$(SBIN).$(MAN_SEC)
+	mkdir -m 755 -p $(DESTDIR)$(DOCDIR) $(DESTDIR)$(MANDIR)/man$(MAN_SEC)
+	install -m 644 $(BIN).$(MAN_SEC) $(DESTDIR)$(MANDIR)/man$(MAN_SEC)
+	install -m 644 $(SBIN).$(MAN_SEC) $(DESTDIR)$(MANDIR)/man$(MAN_SEC)
+	install -m 644 FAQ $(DESTDIR)$(DOCDIR)
+	install -m 644 LICENSE $(DESTDIR)$(DOCDIR)
+	install -m 644 AUTHORS $(DESTDIR)$(DOCDIR)
+	install -m 644 INSTALL $(DESTDIR)$(DOCDIR)
+	install -m 644 ISPEnv.schema $(DESTDIR)$(DOCDIR)
+	install -m 644 ISPEnv2.schema $(DESTDIR)$(DOCDIR)
+	install -m 644 example.ldif $(DESTDIR)$(DOCDIR)
+	install -m 644 HISTORY $(DESTDIR)$(DOCDIR)
+	install -m 644 README $(DESTDIR)$(DOCDIR)
+	gzip -f -9 $(DESTDIR)$(DOCDIR)/FAQ
+	gzip -f -9 $(DESTDIR)$(DOCDIR)/HISTORY
+	gzip -f -9 $(DESTDIR)$(MANDIR)/man$(MAN_SEC)/$(BIN).$(MAN_SEC)
+	gzip -f -9 $(DESTDIR)$(MANDIR)/man$(MAN_SEC)/$(SBIN).$(MAN_SEC)
diff --git a/src/Makefile b/src/Makefile
index 584a9c8..8b0f1f7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -14,7 +14,7 @@ clean:
 	rm -f DEADJOE *.o *~ $(BIN) $(SBIN)
 
 install:
-	mkdir -m 755 -p $(BINDIR) $(SBINDIR)
-	install -m 755 -s $(BIN) $(BINDIR)
-	install -m 755 -s $(SBIN) $(SBINDIR)
+	mkdir -m 755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR)
+	install -m 755 -s $(BIN) $(DESTDIR)$(BINDIR)
+	install -m 755 -s $(SBIN) $(DESTDIR)$(SBINDIR)
 
-- 
2.9.3