diff options
author | Waldemar Brodkorb <mail@waldemar-brodkorb.de> | 2012-10-24 09:31:34 +0200 |
---|---|---|
committer | Waldemar Brodkorb <mail@waldemar-brodkorb.de> | 2012-10-24 09:31:34 +0200 |
commit | f2a1d214b781e30e20b5f0750f3921cb19aaa379 (patch) | |
tree | 27d68bf9107edb915dee368f392da51c0dec130d /package/transproxy/patches | |
parent | 2ea9b0d3dfda3a881c87afc00727ef7dc7de93da (diff) |
new package: transproxy
Diffstat (limited to 'package/transproxy/patches')
-rw-r--r-- | package/transproxy/patches/patch-Makefile | 35 | ||||
-rw-r--r-- | package/transproxy/patches/patch-Makefile.orig | 26 | ||||
-rw-r--r-- | package/transproxy/patches/patch-tproxyrun | 29 |
3 files changed, 90 insertions, 0 deletions
diff --git a/package/transproxy/patches/patch-Makefile b/package/transproxy/patches/patch-Makefile new file mode 100644 index 000000000..7b46d9c44 --- /dev/null +++ b/package/transproxy/patches/patch-Makefile @@ -0,0 +1,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 diff --git a/package/transproxy/patches/patch-Makefile.orig b/package/transproxy/patches/patch-Makefile.orig new file mode 100644 index 000000000..e0353c691 --- /dev/null +++ b/package/transproxy/patches/patch-Makefile.orig @@ -0,0 +1,26 @@ +--- transproxy-1.6.orig/Makefile 2004-03-31 14:19:34.000000000 +0200 ++++ transproxy-1.6/Makefile 2012-10-23 11:07:54.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. diff --git a/package/transproxy/patches/patch-tproxyrun b/package/transproxy/patches/patch-tproxyrun new file mode 100644 index 000000000..b04e524d7 --- /dev/null +++ b/package/transproxy/patches/patch-tproxyrun @@ -0,0 +1,29 @@ +--- transproxy-1.6.orig/tproxyrun 2004-03-31 14:19:34.000000000 +0200 ++++ transproxy-1.6/tproxyrun 2012-10-24 09:06:52.000000000 +0200 +@@ -50,7 +50,7 @@ Linux) + # I really have no idea about Linux, are these kernel versions correct + # for the type if network filtering supported? Is there a surefire way? + case `uname -r` in +- 2.[3456789].*) ++ 3.*|2.[3456789].*) + iptables -t nat -A PREROUTING -p tcp -d localhost --dport 80 -j ACCEPT + iptables -t nat -A PREROUTING -p tcp -d "$HOSTNAME1" --dport 80 -j ACCEPT + if [ -n "$HOSTNAME2" ]; then +@@ -106,7 +106,7 @@ if [ -n "$FORCE_URL" ]; then + fi + + # Start transproxy running. +-/usr/local/sbin/tproxy -s "$TRANSPROXYPORT" -d $CMD "$PROXYNAME" "$PROXYPORT" ++/usr/sbin/tproxy -s "$TRANSPROXYPORT" -d $CMD "$PROXYNAME" "$PROXYPORT" + + # Remove the filter rules. + case `uname` in +@@ -121,7 +121,7 @@ FreeBSD) + ;; + Linux) + case `uname -r` in +- 2.[3456789].*) ++ 3.*|2.[3456789].*) + iptables -t nat -D PREROUTING -p tcp -d localhost --dport 80 -j ACCEPT + iptables -t nat -D PREROUTING -p tcp -d "$HOSTNAME1" --dport 80 -j ACCEPT + if [ -n "$HOSTNAME2" ]; then |