summaryrefslogtreecommitdiff
path: root/package/transproxy/patches/patch-Makefile
blob: 7b46d9c44056138ede39050e21b9774ffe5268a1 (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
--- transproxy-1.6.orig/Makefile	2004-03-31 14:19:34.000000000 +0200
+++ transproxy-1.6/Makefile	2012-10-23 11:08:25.000000000 +0200
@@ -64,17 +64,17 @@ OPTIONS += -DIPTABLES
 #OPTIONS += -DHAVE_GETOPT_H
 
 # You may need to touch PREFIX, CC and CFLAGS.
-PREFIX = /usr/local
-INSTALL_PROGRAM = install -c -m 555 -o bin -g bin
-INSTALL_MAN = install -c -m 444 -o bin -g bin
+PREFIX ?= $(DESTDIR)/usr
+INSTALL_PROGRAM = install -c -m 555
+INSTALL_MAN = install -c -m 444
 
 # Some make's don't define this.
 RM      = rm -f
 
 # Should be OK for GNU gcc.
-CC      = gcc
-CFLAGS  = -O2 -Wall
-LDFLAGS = -s
+CC      ?= gcc
+CFLAGS  ?= -O2 -Wall
+LDFLAGS ?= -s
 
 # For using BIND resolver instead of system resolver.
 #LIBS    += -lresolv	# Really old Linux has this.
@@ -103,7 +103,7 @@ clobber dist-clean:	clean
 	$(RM) tproxy
 
 install:	tproxy
+	mkdir -p $(PREFIX)/sbin
 	$(INSTALL_PROGRAM) tproxy $(PREFIX)/sbin
 	$(INSTALL_PROGRAM) tproxyrun $(PREFIX)/sbin
 	$(INSTALL_PROGRAM) tproxywatch $(PREFIX)/sbin
-	$(INSTALL_MAN) tproxy.8 $(PREFIX)/man/man8