Port miredo to -ng
git-svn-id: svn://svn.openwrt.org/openwrt/packages@4466 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
f0afb16153
commit
a78842977e
99
net/miredo/Makefile
Normal file
99
net/miredo/Makefile
Normal file
@ -0,0 +1,99 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=miredo
|
||||
PKG_VERSION:=0.5.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_MD5SUM:=bbbbf60db1346af0bbba6602067ed7ab
|
||||
|
||||
PKG_SOURCE_URL:=http://people.via.ecp.fr/~rem/miredo/v0.5/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_CAT:=bzcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/miredo
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libpthread +uclibcxx +kmod-ipv6 +kmod-tun
|
||||
SUBMENU:=Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon
|
||||
DESCRIPTION:=A Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon.
|
||||
URL:=http://www.simphalempin.com/dev/miredo/
|
||||
endef
|
||||
|
||||
define Package/miredo-server
|
||||
$(call Package/miredo)
|
||||
TITLE:=Teredo (IPv6 tunneling over UDP through NAT) server daemon
|
||||
DESCRIPTION:=A Teredo (IPv6 tunneling over UDP through NAT) server daemon.
|
||||
endef
|
||||
|
||||
define Package/miredo-server/conffiles
|
||||
/etc/miredo-server.conf
|
||||
endef
|
||||
|
||||
define Package/miredo-client
|
||||
$(call Package/miredo)
|
||||
TITLE:=Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon
|
||||
DESCRIPTION:=Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon
|
||||
endef
|
||||
|
||||
define Package/miredo-client/conffiles
|
||||
/etc/miredo.conf
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default,--disable-shared \
|
||||
--enable-static \
|
||||
--with-gnu-ld \
|
||||
--disable-rpath \
|
||||
--disable-chroot \
|
||||
--enable-teredo-client \
|
||||
--enable-teredo-relay \
|
||||
--enable-teredo-server \
|
||||
--enable-miredo-user=root,CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
|
||||
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
||||
LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
||||
LIBS="-luClibc++ -lc -lm" \
|
||||
ac_cv_file__proc_self_maps=yes\
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
rm -rf $(PKG_INSTALL_DIR)
|
||||
mkdir -p $(PKG_INSTALL_DIR)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CXXLINK="\$$$$(LINK)" \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
endef
|
||||
|
||||
define Package/miredo-server/install
|
||||
install -d -m0755 $(1)/etc/
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/miredo-server.conf-dist $(1)/etc/miredo-server.conf
|
||||
install -d -m0755 $(1)/etc/init.d
|
||||
install -m0755 ./files/miredo-server.init $(1)/etc/init.d/miredo-server
|
||||
install -d -m0755 $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/miredo-client/install
|
||||
install -d -m0755 $(1)/etc
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/miredo.conf-dist $(1)/etc/miredo.conf
|
||||
install -d -m0755 $(1)/etc/init.d
|
||||
install -m0755 ./files/miredo.init $(1)/etc/init.d/miredo
|
||||
install -d -m0755 $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,miredo-server))
|
||||
$(eval $(call BuildPackage,miredo-client))
|
28
net/miredo/files/miredo-server.init
Normal file
28
net/miredo/files/miredo-server.init
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
BIN=miredo-server
|
||||
DEFAULT=/etc/default/$BIN
|
||||
RUN_D=/var/run
|
||||
PID_F=$RUN_D/$BIN.pid
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||
insmod ipv6
|
||||
insmod tun
|
||||
$BIN $OPTIONS
|
||||
;;
|
||||
stop)
|
||||
[ -f $PID_F ] && kill $(cat $PID_F)
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 (start|stop|restart)"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
28
net/miredo/files/miredo.init
Normal file
28
net/miredo/files/miredo.init
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
BIN=miredo
|
||||
DEFAULT=/etc/default/$BIN
|
||||
RUN_D=/var/run
|
||||
PID_F=$RUN_D/$BIN.pid
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||
insmod ipv6
|
||||
insmod tun
|
||||
$BIN $OPTIONS
|
||||
;;
|
||||
stop)
|
||||
[ -f $PID_F ] && kill $(cat $PID_F)
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 (start|stop|restart)"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
Loading…
x
Reference in New Issue
Block a user