From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- package/miredo/Config.in | 35 +++++++++++++++ package/miredo/Makefile | 55 +++++++++++++++++++++++ package/miredo/files/miredo-server.init | 25 +++++++++++ package/miredo/files/miredo.init | 25 +++++++++++ package/miredo/ipkg/miredo-server.control | 5 +++ package/miredo/ipkg/miredo-server.postinst | 3 ++ package/miredo/ipkg/miredo.conffiles | 1 + package/miredo/ipkg/miredo.control | 5 +++ package/miredo/ipkg/miredo.postinst | 3 ++ package/miredo/patches/patch-libteredo_maintain_c | 19 ++++++++ 10 files changed, 176 insertions(+) create mode 100644 package/miredo/Config.in create mode 100644 package/miredo/Makefile create mode 100644 package/miredo/files/miredo-server.init create mode 100644 package/miredo/files/miredo.init create mode 100644 package/miredo/ipkg/miredo-server.control create mode 100644 package/miredo/ipkg/miredo-server.postinst create mode 100644 package/miredo/ipkg/miredo.conffiles create mode 100644 package/miredo/ipkg/miredo.control create mode 100644 package/miredo/ipkg/miredo.postinst create mode 100644 package/miredo/patches/patch-libteredo_maintain_c (limited to 'package/miredo') diff --git a/package/miredo/Config.in b/package/miredo/Config.in new file mode 100644 index 000000000..928e06c5d --- /dev/null +++ b/package/miredo/Config.in @@ -0,0 +1,35 @@ +config ADK_COMPILE_MIREDO + tristate + default n + depends on ADK_CXX + depends on ADK_IPV6 + depends ADK_PACKAGE_MIREDO || ADK_PACKAGE_MIREDO_SERVER + +config ADK_PACKAGE_MIREDO + prompt "miredo............................ Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon" + tristate + default n + depends ADK_IPV6 + depends on ADK_CXX + select ADK_COMPILE_MIREDO + select ADK_KPACKAGE_KMOD_IPV6 + select ADK_KPACKAGE_KMOD_TUN + select ADK_PACKAGE_LIBPTHREAD + help + A Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon. + http://www.simphalempin.com/dev/miredo/ + +config ADK_PACKAGE_MIREDO_SERVER + prompt "miredo-server..................... Teredo (IPv6 tunneling over UDP through NAT) server daemon" + tristate + default n + depends ADK_IPV6 + depends on ADK_CXX + select ADK_COMPILE_MIREDO + select ADK_KPACKAGE_KMOD_IPV6 + select ADK_KPACKAGE_KMOD_TUN + select ADK_PACKAGE_LIBPTHREAD + help + A Teredo (IPv6 tunneling over UDP through NAT) server daemon. + + http://www.simphalempin.com/dev/miredo/ diff --git a/package/miredo/Makefile b/package/miredo/Makefile new file mode 100644 index 000000000..3bdcb3113 --- /dev/null +++ b/package/miredo/Makefile @@ -0,0 +1,55 @@ +# $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:= miredo +PKG_VERSION:= 1.1.6 +PKG_RELEASE:= 1 +PKG_MD5SUM:= bf49c1ddc068746760787d0cf76e40de +MASTER_SITES:= http://www.remlab.net/files/miredo/ +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,MIREDO,miredo,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,MIREDO_SERVER,miredo-server,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --disable-chroot \ + --without-Judy \ + --enable-teredo-client \ + --enable-teredo-relay \ + --enable-teredo-server \ + --enable-miredo-user=root +BUILD_STYLE:= auto +INSTALL_STYLE:= auto +XAKE_FLAGS+ CXXLINK="\$${LINK}" \ + +ifeq ($(ADK_TARGET_LIB_UCLIBCXX),y) +TCXXFLAGS+= -fno-builtin -fno-rtti -nostdinc++ +TLDFLAGS+= -nodefaultlibs +CONFIGURE_ENV+= LIBS="-luClibc++ -lc -lm" \ + ac_cv_file__proc_self_maps=yes +else +CONFIGURE_ENV+= LIBS="-lc -lm" \ + ac_cv_file__proc_self_maps=yes +endif + +post-install: + ${INSTALL_DIR} ${IDIR_MIREDO}/etc/init.d + ${INSTALL_DIR} ${IDIR_MIREDO}/etc/miredo + ${INSTALL_DIR} ${IDIR_MIREDO}/usr/sbin + ${INSTALL_DATA} ${WRKINST}/etc/miredo/miredo.conf ${IDIR_MIREDO}/etc/miredo/miredo.conf + ${INSTALL_BIN} ./files/miredo.init \ + ${IDIR_MIREDO}/etc/init.d/miredo + ${INSTALL_BIN} ${WRKINST}/usr/sbin/miredo ${IDIR_MIREDO}/usr/sbin/ + ${INSTALL_DIR} ${IDIR_MIREDO_SERVER}/usr/sbin + ${INSTALL_DIR} ${IDIR_MIREDO_SERVER}/etc/init.d + ${INSTALL_BIN} ./files/miredo-server.init \ + ${IDIR_MIREDO_SERVER}/etc/init.d/miredo-server + ${INSTALL_BIN} ${WRKINST}/usr/sbin/miredo-server ${IDIR_MIREDO_SERVER}/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/miredo/files/miredo-server.init b/package/miredo/files/miredo-server.init new file mode 100644 index 000000000..d8282e316 --- /dev/null +++ b/package/miredo/files/miredo-server.init @@ -0,0 +1,25 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${miredo-server:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + miredo-server + ;; +stop) + killall miredo-server + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "usage: $0 {start | stop | restart}" + exit 1 +esac +exit $? diff --git a/package/miredo/files/miredo.init b/package/miredo/files/miredo.init new file mode 100644 index 000000000..bb4b3fdcd --- /dev/null +++ b/package/miredo/files/miredo.init @@ -0,0 +1,25 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${miredo:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + miredo + ;; +stop) + killall miredo + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "usage: $0 {start | stop | restart}" + exit 1 +esac +exit $? diff --git a/package/miredo/ipkg/miredo-server.control b/package/miredo/ipkg/miredo-server.control new file mode 100644 index 000000000..ebbc3cc58 --- /dev/null +++ b/package/miredo/ipkg/miredo-server.control @@ -0,0 +1,5 @@ +Package: miredo-server +Priority: optional +Section: net +Depends: kmod-ipv6, kmod-tun, libpthread, uclibc++ +Description: A Teredo (IPv6 tunneling over UDP through NAT) server daemon diff --git a/package/miredo/ipkg/miredo-server.postinst b/package/miredo/ipkg/miredo-server.postinst new file mode 100644 index 000000000..00c88c459 --- /dev/null +++ b/package/miredo/ipkg/miredo-server.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf miredo-server miredo-server NO diff --git a/package/miredo/ipkg/miredo.conffiles b/package/miredo/ipkg/miredo.conffiles new file mode 100644 index 000000000..f4d3b04af --- /dev/null +++ b/package/miredo/ipkg/miredo.conffiles @@ -0,0 +1 @@ +/etc/miredo/miredo.conf diff --git a/package/miredo/ipkg/miredo.control b/package/miredo/ipkg/miredo.control new file mode 100644 index 000000000..2794f3bde --- /dev/null +++ b/package/miredo/ipkg/miredo.control @@ -0,0 +1,5 @@ +Package: miredo +Priority: optional +Section: net +Depends: kmod-ipv6, kmod-tun, libpthread, uclibc++ +Description: A Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon diff --git a/package/miredo/ipkg/miredo.postinst b/package/miredo/ipkg/miredo.postinst new file mode 100644 index 000000000..37667f8da --- /dev/null +++ b/package/miredo/ipkg/miredo.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf miredo miredo NO diff --git a/package/miredo/patches/patch-libteredo_maintain_c b/package/miredo/patches/patch-libteredo_maintain_c new file mode 100644 index 000000000..a98fba00b --- /dev/null +++ b/package/miredo/patches/patch-libteredo_maintain_c @@ -0,0 +1,19 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- miredo-1.1.6.orig/libteredo/maintain.c 2009-04-13 11:15:15.000000000 +0200 ++++ miredo-1.1.6/libteredo/maintain.c 2009-05-10 18:21:51.000000000 +0200 +@@ -56,6 +56,7 @@ + #include "maintain.h" + #include "v4global.h" // is_ipv4_global_unicast() + #include "debug.h" ++#define pthread_condattr_setclock( a, c ) (((c) != CLOCK_REALTIME) ? EINVAL : 0) + + static inline void gettime (struct timespec *now) + { +@@ -63,7 +64,6 @@ static inline void gettime (struct times + if (clock_gettime (CLOCK_MONOTONIC, now) == 0) + return; + #else +-# define pthread_condattr_setclock( a, c ) (((c) != CLOCK_REALTIME) ? EINVAL : 0) + # ifndef CLOCK_MONOTONIC + # define CLOCK_MONOTONIC CLOCK_REALTIME + # endif -- cgit v1.2.3