#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006,2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=mrd6
PKG_VERSION:=0.9.5
-PKG_RELEASE:=1
+PKG_REVISION:=3
+PKG_RELEASE:=$(PKG_REVISION).1
-PKG_SOURCE_URL:=http://hng.av.it.pt/mrd6/download/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=24a08cf1407000d628a272b08a415dda
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REVISION).tar.gz
+PKG_SOURCE_URL:=http://fivebits.net/files/mrd6/ \
+ http://hng.av.it.pt/mrd6/download/
+PKG_MD5SUM:=361322198dafcc5ffab5e8e23197012b
PKG_BUILD_DEPENDS:=libnotimpl
define Package/mrd6
SECTION:=ipv6
CATEGORY:=IPv6
- DEPENDS:=@LINUX_2_6 +uclibcxx
TITLE:=IPv6 multicast routing daemon
URL:=http://artemis.av.it.pt/mrd6/
-endef
-
-define Package/mrd6/conffiles
-/etc/mrd6.conf
+ DEPENDS:= +uclibcxx
endef
define Package/mrd6/description
SPACE_OPTIMIZE=yes \
FULL_STATIC=no \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DNO_INET6_OPTION -fno-builtin -fno-rtti" \
- LDFLAGS="$(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -ldl -lm -lnotimpl" \
+ LDFLAGS="$(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -ldl -lgcc -lm -lnotimpl" \
MODULE_CXX="\$$$$(CC) -shared \$$$$(CXXFLAGS) \$$$$(LDFLAGS)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
- PREFIX="/usr/" \
+ PREFIX="/usr" \
install
endef
+define Package/mrd6/conffiles
+/etc/mrd6.conf
+endef
+
define Package/mrd6/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DATA) files/mrd6.conf $(1)/etc
+++ /dev/null
-diff -urN mrd6-0.9.5/src/Makefile mrd6-0.9.5.new/src/Makefile
---- mrd6-0.9.5/src/Makefile 2005-12-18 19:15:04.000000000 +0100
-+++ mrd6-0.9.5.new/src/Makefile 2006-02-11 18:30:44.000000000 +0100
-@@ -43,7 +43,7 @@
- CFLAGS += -DNO_INET6_OPTION
- endif
-
--DEST_PREFIX = $(DESTDIR)$(PREFIX)
-+DEST_PREFIX = $(DESTDIR)/$(PREFIX)
-
- ifeq ($(OPTIMIZE),yes)
- ifeq ($(SPACE_OPTIMIZE),yes)
--- /dev/null
+Index: mrd6-0.9.5/src/Makefile
+===================================================================
+--- mrd6-0.9.5.orig/src/Makefile 2007-09-21 13:19:05.000000000 +0200
++++ mrd6-0.9.5/src/Makefile 2007-09-21 13:19:05.000000000 +0200
+@@ -143,7 +143,8 @@
+ install: $(TARGET) $(EXTERNAL_MODULES)
+ install -D $(TARGET) $(DEST_PREFIX)/sbin/$(TARGET)
+ install -D ../tools/mrd6sh $(DEST_PREFIX)/bin/mrd6sh
+- install -D $(EXTERNAL_MODULES) $(DEST_PREFIX)/lib/mrd6/
++ install -d $(DEST_PREFIX)/lib/mrd6
++ install $(EXTERNAL_MODULES) $(DEST_PREFIX)/lib/mrd6/
+
+ mrd.version.cpp: $(SOURCES) Makefile
+ @echo '/* This file is automatically generated */' > mrd.version.cpp
-diff -urN mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h mrd6-0.9.5.new/include/mrdpriv/linux/netlink_missing_defs.h
---- mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h 1970-01-01 01:00:00.000000000 +0100
-+++ mrd6-0.9.5.new/include/mrdpriv/linux/netlink_missing_defs.h 2007-01-11 12:26:55.000000000 +0100
+Index: mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h 2007-09-21 13:19:06.000000000 +0200
@@ -0,0 +1,41 @@
+#include <linux/version.h>
+
+#endif
+
+#endif
-diff -urN mrd6-0.9.5/src/linux/linux_unicast_route.cpp mrd6-0.9.5.new/src/linux/linux_unicast_route.cpp
---- mrd6-0.9.5/src/linux/linux_unicast_route.cpp 2006-01-06 00:08:02.000000000 +0100
-+++ mrd6-0.9.5.new/src/linux/linux_unicast_route.cpp 2007-01-11 12:24:08.000000000 +0100
-@@ -22,6 +22,7 @@
+Index: mrd6-0.9.5/src/linux/linux_unicast_route.cpp
+===================================================================
+--- mrd6-0.9.5.orig/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:05.000000000 +0200
++++ mrd6-0.9.5/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:06.000000000 +0200
+@@ -23,6 +23,7 @@
*/
#include <mrdpriv/linux/unicast_route.h>
--- /dev/null
+Index: mrd6-0.9.5/src/icmp_inet6.cpp
+===================================================================
+--- mrd6-0.9.5.orig/src/icmp_inet6.cpp 2007-09-21 13:19:04.000000000 +0200
++++ mrd6-0.9.5/src/icmp_inet6.cpp 2007-09-21 13:19:06.000000000 +0200
+@@ -51,6 +51,14 @@
+ #define IP6_ALERT_MLD 0x00
+ #endif
+
++#ifndef IP6OPT_PAD1
++#define IP6OPT_PAD1 0
++#endif
++
++#ifndef IP6OPT_PADN
++#define IP6OPT_PADN 1
++#endif
++
+ static in6_addr mld_all_routers;
+ static in6_addr all_routers;
+