summaryrefslogtreecommitdiff
path: root/package/tinc
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/tinc
Initial import
Diffstat (limited to 'package/tinc')
-rw-r--r--package/tinc/Config.in13
-rw-r--r--package/tinc/Makefile31
-rw-r--r--package/tinc/ipkg/tinc.control5
-rw-r--r--package/tinc/patches/patch-src_linux_device_c21
-rw-r--r--package/tinc/patches/patch-src_net_setup_c20
5 files changed, 90 insertions, 0 deletions
diff --git a/package/tinc/Config.in b/package/tinc/Config.in
new file mode 100644
index 000000000..6ef68ec46
--- /dev/null
+++ b/package/tinc/Config.in
@@ -0,0 +1,13 @@
+config ADK_PACKAGE_TINC
+ prompt "tinc.............................. VPN tunneling daemon"
+ tristate
+ default n
+ select ADK_KPACKAGE_KMOD_TUN
+ select ADK_PACKAGE_LIBLZO
+ select ADK_PACKAGE_LIBOPENSSL
+ select ADK_PACKAGE_ZLIB
+ help
+ A VPN tunneling daemon
+
+ http://www.tinc-vpn.org/
+
diff --git a/package/tinc/Makefile b/package/tinc/Makefile
new file mode 100644
index 000000000..aa454bfec
--- /dev/null
+++ b/package/tinc/Makefile
@@ -0,0 +1,31 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= tinc
+PKG_VERSION:= 1.0.9
+PKG_RELEASE:= 1
+PKG_MD5SUM:= f907acebada53512e01235bea6b4cdf1
+MASTER_SITES:= http://www.tinc-vpn.org/packages/ \
+ http://ftp.yi.se/pub/tinc/ \
+ http://www.mirrors.wiretapped.net/security/network-security/tinc/
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,TINC,tinc,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+CONFIGURE_STYLE:= gnu
+CONFIGURE_ARGS+= --with-kernel=${LINUX_DIR} \
+ --with-zlib=${STAGING_DIR}/usr/ \
+ --with-lzo-include=${STAGING_DIR}/usr/include/lzo
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_TINC}/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/usr/sbin/tincd ${IDIR_TINC}/usr/sbin/
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/tinc/ipkg/tinc.control b/package/tinc/ipkg/tinc.control
new file mode 100644
index 000000000..df0d13861
--- /dev/null
+++ b/package/tinc/ipkg/tinc.control
@@ -0,0 +1,5 @@
+Package: tinc
+Priority: optional
+Section: net
+Description: VPN tunnel daemon
+Depends: zlib, liblzo, libopenssl, kmod-tun
diff --git a/package/tinc/patches/patch-src_linux_device_c b/package/tinc/patches/patch-src_linux_device_c
new file mode 100644
index 000000000..6a5b66e3c
--- /dev/null
+++ b/package/tinc/patches/patch-src_linux_device_c
@@ -0,0 +1,21 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- tinc-1.0.9.orig/src/linux/device.c 2006-12-16 17:54:05.000000000 +0100
++++ tinc-1.0.9/src/linux/device.c 2009-05-11 23:55:39.000000000 +0200
+@@ -64,7 +64,7 @@ bool setup_device(void)
+ #ifdef HAVE_LINUX_IF_TUN_H
+ iface = netname;
+ #else
+- iface = rindex(device, '/') ? rindex(device, '/') + 1 : device;
++ iface = strrchr(device, '/') ? strrchr(device, '/') + 1 : device;
+ #endif
+ device_fd = open(device, O_RDWR | O_NONBLOCK);
+
+@@ -104,7 +104,7 @@ bool setup_device(void)
+ overwrite_mac = true;
+ device_info = _("Linux ethertap device");
+ device_type = DEVICE_TYPE_ETHERTAP;
+- iface = rindex(device, '/') ? rindex(device, '/') + 1 : device;
++ iface = strrchr(device, '/') ? strrchr(device, '/') + 1 : device;
+ }
+
+ logger(LOG_INFO, _("%s is a %s"), device, device_info);
diff --git a/package/tinc/patches/patch-src_net_setup_c b/package/tinc/patches/patch-src_net_setup_c
new file mode 100644
index 000000000..dd4d7b495
--- /dev/null
+++ b/package/tinc/patches/patch-src_net_setup_c
@@ -0,0 +1,20 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- tinc-1.0.9.orig/src/net_setup.c 2008-12-22 21:35:45.000000000 +0100
++++ tinc-1.0.9/src/net_setup.c 2009-05-11 23:52:07.000000000 +0200
+@@ -358,14 +358,14 @@ bool setup_myself(void)
+ }
+ }
+ } else
+- myself->cipher = EVP_bf_cbc();
++ myself->cipher = EVP_des_cbc();
+
+ if(myself->cipher)
+ myself->keylength = myself->cipher->key_len + myself->cipher->iv_len;
+ else
+ myself->keylength = 1;
+
+- myself->connection->outcipher = EVP_bf_ofb();
++ myself->connection->outcipher = EVP_des_ofb();
+
+ myself->key = xmalloc(myself->keylength);
+ RAND_pseudo_bytes((unsigned char *)myself->key, myself->keylength);