diff options
author | Christian Pointner <equinox@spreadspace.org> | 2014-06-09 19:45:40 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2014-06-09 19:45:40 +0200 |
commit | 2267da443a77b5dd8c8736d53d417edf53332653 (patch) | |
tree | afd36f11ebd51d1dbbd6286079cb5a41371431d1 /net/tcpproxy/Makefile | |
parent | f7d0b83aef84cce9c6a964d04f931331808c3484 (diff) |
This adds tcpproxy a simple tcp connection proxy.
Signed-off-by: Christian Pointner <equinox@spreadspace.org>
Diffstat (limited to 'net/tcpproxy/Makefile')
-rw-r--r-- | net/tcpproxy/Makefile | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/net/tcpproxy/Makefile b/net/tcpproxy/Makefile new file mode 100644 index 000000000..c1056d955 --- /dev/null +++ b/net/tcpproxy/Makefile @@ -0,0 +1,84 @@ +# +# Copyright (C) 2010 Christian Pointner, +# <equinox@spreadspace.org> +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# This Makefile builds tcpproxy Package for OpenWRT +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tcpproxy +PKG_VERSION:=1.1 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.spreadspace.org/tcpproxy/releases/ +PKG_MD5SUM:=55126473bcde635f9ee019c6caf19bb7 + +include $(INCLUDE_DIR)/package.mk + + +define Package/tcpproxy + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=IPv4/IPv6 tcp connection proxy + URL:=http://www.spreadspace.org/tcpproxy/ + MAINTAINER:=Christian Pointner <equinox@spreadspace.org> +endef + +define Package/tcpproxy/conffiles +/etc/config/tcpproxy +endef + +define Package/tcpproxy/description +tcpproxy is a simple tcp connection proxy which combines the features of rinetd and 6tunnel. + tcpproxy supports IPv4 and IPv6 and also supports connections from IPv6 to IPv4 endpoints and vice versa. +endef + +define Package/tcpproxy/configure +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR)/src; \ + touch include.mk; \ + echo '#ifndef TCPPROXY_config_h_INCLUDED' > config.h; \ + echo '#define TCPPROXY_config_h_INCLUDED' >> config.h; \ + echo '' >> config.h; \ + echo '#define VERSION_STRING_0 "tcpproxy version '`cat $(PKG_BUILD_DIR)/version`'"' >> config.h; \ + echo '#define VERSION_STRING_1 "built on '`hostname`', '`date +"%d.%m.%Y %H:%M:%S %Z"`'"' >> config.h; \ + echo '' >> config.h; \ + echo '#define TARGET "linux"' >> config.h; \ + echo '#define PREFIX "/usr"' >> config.h; \ + echo '#define BINDIR "/usr/bin"' >> config.h; \ + echo '#define ETCDIR "/etc"' >> config.h; \ + echo '#define CONFFILE "/etc/tcpproxy.conf"' >> config.h; \ + echo '' >> config.h; \ + echo '#endif' >> config.h \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/src \ + $(TARGET_CONFIGURE_OPTS) \ + TARGET=Linux \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" + $(STRIP) $(PKG_BUILD_DIR)/src/tcpproxy +endef + +define Package/tcpproxy/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/tcpproxy.config $(1)/etc/config/tcpproxy + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2)/src/tcpproxy $(1)/usr/bin/tcpproxy + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/tcpproxy.init $(1)/etc/init.d/tcpproxy +endef + +$(eval $(call BuildPackage,tcpproxy)) |