[packages] srelay: Update to v0.4.8b3 (#8150)
[packages.git] / net / ptunnel / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ptunnel
11 PKG_VERSION:=0.71
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=PingTunnel-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.cs.uit.no/~daniels/PingTunnel
16 PKG_MD5SUM:=9b04771d4fa50abc15a6af690b81c71a
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/PingTunnel
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/ptunnel
23   SECTION:=net
24   CATEGORY:=Network
25   DEPENDS:=+libpthread +libpcap
26   TITLE:=Tunnel TCP connections over ICMP packets
27   URL:=http://www.cs.uit.no/~daniels/PingTunnel/
28 endef
29
30 define Package/ptunnel/description
31   ptunnel is an application that allows you to reliably tunnel TCP connections to 
32   a remote host using ICMP echo request and reply packets, commonly known as ping 
33   requests and replies. It acts as a proxy and can handle sockets and secured 
34   identification.
35 endef
36
37 define Package/ptunnel/conffiles
38 /etc/config/ptunnel
39 endef
40
41 # uses GNU configure
42
43 define Build/Compile
44         $(MAKE) -C $(PKG_BUILD_DIR) \
45                 CC="$(TARGET_CC)" \
46                 CFLAGS="$(TARGET_CFLAGS) -Wall -g -I$(STAGING_DIR)/usr/include" \
47                 LDOPTS="$(TARGET_LDFLAGS) -lpthread -lpcap" \
48                 DESTDIR="$(PKG_INSTALL_DIR)" \
49                 all install
50 endef
51
52 define Package/ptunnel/install
53         $(INSTALL_DIR) $(1)/usr/sbin
54         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(1)/usr/sbin/
55         $(INSTALL_DIR) $(1)/etc/init.d
56         $(INSTALL_BIN) ./files/ptunnel.init $(1)/etc/init.d/ptunnel
57         $(INSTALL_DIR) $(1)/etc/config
58         $(INSTALL_CONF) ./files/ptunnel.conf $(1)/etc/config/ptunnel
59 endef
60
61 $(eval $(call BuildPackage,ptunnel))