aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/015_nxproxy_makefile-uninstall.patch
blob: 554c86aa4f7a462695722b8bf31dbccb76b35188 (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
Description: Add install and uninstall stanzas to nxcomp/Makefile
 Provide install and uninstall functionality in nxcomp/Makefile.
Forwarded: pending...
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Last-Update: 2011-12-31
--- a/nxproxy/Makefile.in
+++ b/nxproxy/Makefile.in
@@ -41,6 +41,8 @@
 INSTALL         = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA    = @INSTALL_DATA@
+DESTDIR         =
+RM_FILE         = rm -f
 
 #
 # This should be autodetected.
@@ -87,11 +89,20 @@
 install:	install.bin install.man
 
 install.bin:	$(PROGRAM)
-		$(srcdir)/mkinstalldirs $(bindir)
-		$(INSTALL) $(PROGRAM) $(bindir)/$(PROGRAM)
+		$(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
+		$(INSTALL_PROGRAM) $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
 
 install.man:
-		$(srcdir)/mkinstalldirs $(man1dir)
+		$(srcdir)/mkinstalldirs $(DESTDIR)$(man1dir)
+		$(INSTALL_DATA) man/$(PROGRAM).1 $(DESTDIR)$(man1dir)/$(PROGRAM).1
+
+uninstall:      uninstall.bin uninstall.man
+
+uninstall.bin:
+		$(RM_FILE) $(DESTDIR)$(bindir)/$(PROGRAM)
+
+uninstall.man:
+		$(RM_FILE) $(DESTDIR)$(man1dir)/nxproxy.1
 
 clean:
 		-rm -f *~ *.o *.bak st?????? core core.* *.out.* \