2 # Copyright (C) 2006-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=PingTunnel-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.cs.uit.no/~daniels/PingTunnel
16 PKG_MD5SUM:=9b04771d4fa50abc15a6af690b81c71a
18 PKG_BUILD_DIR:=$(BUILD_DIR)/PingTunnel
20 include $(INCLUDE_DIR)/package.mk
22 define Package/ptunnel
25 SUBMENU:=Firewall Tunnel
26 DEPENDS:=+libpthread +libpcap
27 TITLE:=Tunnel TCP connections over ICMP packets
28 URL:=http://www.cs.uit.no/~daniels/PingTunnel/
31 define Package/ptunnel/description
32 ptunnel is an application that allows you to reliably tunnel TCP connections to
33 a remote host using ICMP echo request and reply packets, commonly known as ping
34 requests and replies. It acts as a proxy and can handle sockets and secured
38 define Package/ptunnel/conffiles
45 $(MAKE) -C $(PKG_BUILD_DIR) \
47 CFLAGS="$(TARGET_CFLAGS) -Wall -g -I$(STAGING_DIR)/usr/include" \
48 LDOPTS="$(TARGET_LDFLAGS) -lpthread -lpcap" \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
53 define Package/ptunnel/install
54 $(INSTALL_DIR) $(1)/usr/sbin
55 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(1)/usr/sbin/
56 $(INSTALL_DIR) $(1)/etc/init.d
57 $(INSTALL_BIN) ./files/ptunnel.init $(1)/etc/init.d/ptunnel
58 $(INSTALL_DIR) $(1)/etc/config
59 $(INSTALL_CONF) ./files/ptunnel.conf $(1)/etc/config/ptunnel
62 $(eval $(call BuildPackage,ptunnel))