aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/015_nxproxy_makefile-uninstall.patch
blob: 4c349fb7e705684b758249cf6c87636dd3ec9401 (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
--- 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.* \