[packages] ptunnel: Update to v0.71 (#5824)
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>
Sat, 19 Sep 2009 12:11:46 +0000 (12:11 +0000)
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>
Sat, 19 Sep 2009 12:11:46 +0000 (12:11 +0000)
SVN-Revision: 17605

net/ptunnel/Makefile
net/ptunnel/files/ptunnel.conf
net/ptunnel/files/ptunnel.init
net/ptunnel/patches/001-prefix.patch [new file with mode: 0644]
net/ptunnel/patches/002-no_selinux.patch [new file with mode: 0644]

index a7bce3761cd4476d8d82682479acadb4457c43f4..68452af86bdd4a289cfc232a21a7e29b311d2527 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ptunnel
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ptunnel
-PKG_VERSION:=0.61
+PKG_VERSION:=0.71
 PKG_RELEASE:=1
 
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/ptunnel/
-PKG_MD5SUM:=b45f73875f2af48f101816672f83a5fe
+PKG_SOURCE:=PingTunnel-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.cs.uit.no/~daniels/PingTunnel
+PKG_MD5SUM:=9b04771d4fa50abc15a6af690b81c71a
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/PingTunnel
 
 include $(INCLUDE_DIR)/package.mk
 
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -26,27 +28,34 @@ define Package/ptunnel
 endef
 
 define Package/ptunnel/description
 endef
 
 define Package/ptunnel/description
-       ptunnel is an application that allows you to reliably tunnel TCP connections to 
-       a remote host using ICMP echo request and reply packets, commonly known as ping 
-       requests and replies. It acts as a proxy and can handle sockets and secured 
-       identification.
+  ptunnel is an application that allows you to reliably tunnel TCP connections to 
+  a remote host using ICMP echo request and reply packets, commonly known as ping 
+  requests and replies. It acts as a proxy and can handle sockets and secured 
+  identification.
+endef
+
+define Package/ptunnel/conffiles
+/etc/config/ptunnel
 endef
 
 # uses GNU configure
 
 endef
 
 # uses GNU configure
 
-define Build/Compile   
+define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
        $(MAKE) -C $(PKG_BUILD_DIR) \
+               CC="$(TARGET_CC)" \
+               CFLAGS="$(TARGET_CFLAGS) -Wall -g -I$(STAGING_DIR)/usr/include" \
+               LDOPTS="$(TARGET_LDFLAGS) -lpthread -lpcap" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                all install
 endef
 
                DESTDIR="$(PKG_INSTALL_DIR)" \
                all install
 endef
 
-define Package/ptunnel/install 
+define Package/ptunnel/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/ptunnel.init $(1)/etc/init.d/ptunnel
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/ptunnel.init $(1)/etc/init.d/ptunnel
        $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_DATA) ./files/ptunnel.conf $(1)/etc/config/ptunnel
+       $(INSTALL_CONF) ./files/ptunnel.conf $(1)/etc/config/ptunnel
 endef
 
 $(eval $(call BuildPackage,ptunnel))
 endef
 
 $(eval $(call BuildPackage,ptunnel))
index 35781f935e5691b3efe45ecf4edac22912495ab4..ca645ff68d127fba37f11671527234741dfab5ca 100644 (file)
@@ -1,3 +1,2 @@
 config ptunnel
         option interface 'br-lan'
 config ptunnel
         option interface 'br-lan'
-       
\ No newline at end of file
index f834bd49bb850cc01693f0993de30843e7c11eb2..b3aabb9e155572757ce9420dabcec88204822254 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2009 OpenWrt.org
 START=70
 BIN=ptunnel
 
 START=70
 BIN=ptunnel
 
@@ -24,4 +24,3 @@ stop() {
         ps aux | grep ptunnel |  awk '{print }' | \
             xargs kill 2> /dev/null
 }
         ps aux | grep ptunnel |  awk '{print }' | \
             xargs kill 2> /dev/null
 }
-                                                                       
\ No newline at end of file
diff --git a/net/ptunnel/patches/001-prefix.patch b/net/ptunnel/patches/001-prefix.patch
new file mode 100644 (file)
index 0000000..c640670
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/Makefile
++++ b/Makefile
+@@ -12,8 +12,8 @@ WIN32_CFLAGS = -g -Wall -DWIN32 -I"c:\Pr
+ WIN32_LDOPTS = -lwpcap -lwsock32 -L"c:\Program Files\WpdPack\Lib"
+ WIN32_PT_OBJS = ptunnel.obj md5.obj
+-prefix                = /usr
+-bindir                = $(prefix)/bin
++prefix                = $(DESTDIR)/usr
++bindir                = $(prefix)/sbin
+ mandir                = $(prefix)/share/man/man8
+ all: ptunnel
diff --git a/net/ptunnel/patches/002-no_selinux.patch b/net/ptunnel/patches/002-no_selinux.patch
new file mode 100644 (file)
index 0000000..2dcf8c4
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/Makefile
++++ b/Makefile
+@@ -32,7 +32,7 @@ install: ptunnel
+       install ./ptunnel.8 $(mandir)/ptunnel.8
+ ptunnel: $(PT_OBJS)
+-      $(CC) -o $@ $^ $(LDOPTS) `[ -e /usr/include/selinux/selinux.h ] && echo -lselinux`
++      $(CC) -o $@ $^ $(LDOPTS)
+ ptunnel.exe: $(WIN32_PT_OBJS)
+       $(CC) -o $@ $^ $(WIN32_LDOPTS)
+@@ -47,7 +47,7 @@ depend: .depend
+       $(CC) $(CFLAGS) -MM *.c > $@
+ %.o:%.c
+-      $(CC) $(CFLAGS) `[ -e /usr/include/selinux/selinux.h ] && echo -DHAVE_SELINUX` -c -o $@ $<
++      $(CC) $(CFLAGS) -c -o $@ $<
+ %.obj:%.c
+       $(WIN32_CC) $(WIN32_CFLAGS) -c -o $@ $<