|
@@ -0,0 +1,84 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2010 Christian Pointner,
|
|
3
|
+# <equinox@spreadspace.org>
|
|
4
|
+#
|
|
5
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
6
|
+# See /LICENSE for more information.
|
|
7
|
+#
|
|
8
|
+# This Makefile builds tcpproxy Package for OpenWRT
|
|
9
|
+#
|
|
10
|
+# $Id: $
|
|
11
|
+
|
|
12
|
+include $(TOPDIR)/rules.mk
|
|
13
|
+
|
|
14
|
+PKG_NAME:=tcpproxy
|
|
15
|
+PKG_VERSION:=1.1
|
|
16
|
+PKG_RELEASE:=1
|
|
17
|
+
|
|
18
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
19
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
20
|
+PKG_SOURCE_URL:=http://www.spreadspace.org/tcpproxy/releases/
|
|
21
|
+PKG_MD5SUM:=55126473bcde635f9ee019c6caf19bb7
|
|
22
|
+
|
|
23
|
+include $(INCLUDE_DIR)/package.mk
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+define Package/tcpproxy
|
|
27
|
+ SECTION:=net
|
|
28
|
+ CATEGORY:=Network
|
|
29
|
+ SUBMENU:=Routing and Redirection
|
|
30
|
+ TITLE:=IPv4/IPv6 tcp connection proxy
|
|
31
|
+ URL:=http://www.spreadspace.org/tcpproxy/
|
|
32
|
+ MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
|
|
33
|
+endef
|
|
34
|
+
|
|
35
|
+define Package/tcpproxy/conffiles
|
|
36
|
+/etc/config/tcpproxy
|
|
37
|
+endef
|
|
38
|
+
|
|
39
|
+define Package/tcpproxy/description
|
|
40
|
+tcpproxy is a simple tcp connection proxy which combines the features of rinetd and 6tunnel.
|
|
41
|
+ tcpproxy supports IPv4 and IPv6 and also supports connections from IPv6 to IPv4 endpoints and vice versa.
|
|
42
|
+endef
|
|
43
|
+
|
|
44
|
+define Package/tcpproxy/configure
|
|
45
|
+endef
|
|
46
|
+
|
|
47
|
+define Build/Configure
|
|
48
|
+ (cd $(PKG_BUILD_DIR)/src; \
|
|
49
|
+ touch include.mk; \
|
|
50
|
+ echo '#ifndef TCPPROXY_config_h_INCLUDED' > config.h; \
|
|
51
|
+ echo '#define TCPPROXY_config_h_INCLUDED' >> config.h; \
|
|
52
|
+ echo '' >> config.h; \
|
|
53
|
+ echo '#define VERSION_STRING_0 "tcpproxy version '`cat $(PKG_BUILD_DIR)/version`'"' >> config.h; \
|
|
54
|
+ echo '#define VERSION_STRING_1 "built on '`hostname`', '`date +"%d.%m.%Y %H:%M:%S %Z"`'"' >> config.h; \
|
|
55
|
+ echo '' >> config.h; \
|
|
56
|
+ echo '#define TARGET "linux"' >> config.h; \
|
|
57
|
+ echo '#define PREFIX "/usr"' >> config.h; \
|
|
58
|
+ echo '#define BINDIR "/usr/bin"' >> config.h; \
|
|
59
|
+ echo '#define ETCDIR "/etc"' >> config.h; \
|
|
60
|
+ echo '#define CONFFILE "/etc/tcpproxy.conf"' >> config.h; \
|
|
61
|
+ echo '' >> config.h; \
|
|
62
|
+ echo '#endif' >> config.h \
|
|
63
|
+ )
|
|
64
|
+endef
|
|
65
|
+
|
|
66
|
+define Build/Compile
|
|
67
|
+ $(MAKE) -C $(PKG_BUILD_DIR)/src \
|
|
68
|
+ $(TARGET_CONFIGURE_OPTS) \
|
|
69
|
+ TARGET=Linux \
|
|
70
|
+ CFLAGS="$(TARGET_CFLAGS)" \
|
|
71
|
+ LDFLAGS="$(TARGET_LDFLAGS)"
|
|
72
|
+ $(STRIP) $(PKG_BUILD_DIR)/src/tcpproxy
|
|
73
|
+endef
|
|
74
|
+
|
|
75
|
+define Package/tcpproxy/install
|
|
76
|
+ $(INSTALL_DIR) $(1)/etc/config
|
|
77
|
+ $(INSTALL_DATA) ./files/tcpproxy.config $(1)/etc/config/tcpproxy
|
|
78
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
79
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2)/src/tcpproxy $(1)/usr/bin/tcpproxy
|
|
80
|
+ $(INSTALL_DIR) $(1)/etc/init.d
|
|
81
|
+ $(INSTALL_BIN) ./files/tcpproxy.init $(1)/etc/init.d/tcpproxy
|
|
82
|
+endef
|
|
83
|
+
|
|
84
|
+$(eval $(call BuildPackage,tcpproxy))
|