add dibbler package (thanx to forum2006)
authorNicolas Thill <nico@openwrt.org>
Thu, 1 Feb 2007 23:41:26 +0000 (23:41 +0000)
committerNicolas Thill <nico@openwrt.org>
Thu, 1 Feb 2007 23:41:26 +0000 (23:41 +0000)
SVN-Revision: 6247

ipv6/dibbler/Makefile [new file with mode: 0644]
ipv6/dibbler/patches/01-cross_compile.patch [new file with mode: 0644]
ipv6/dibbler/patches/02-no_silent_make.patch [new file with mode: 0644]
ipv6/dibbler/patches/03-linux_types_missing.patch [new file with mode: 0644]

diff --git a/ipv6/dibbler/Makefile b/ipv6/dibbler/Makefile
new file mode 100644 (file)
index 0000000..b139e7e
--- /dev/null
@@ -0,0 +1,105 @@
+#\r
+# Copyright (C) 2006 OpenWrt.org\r
+#\r
+# This is free software, licensed under the GNU General Public License v2.\r
+# See /LICENSE for more information.\r
+#\r
+# $Id$\r
+\r
+include $(TOPDIR)/rules.mk\r
+\r
+PKG_NAME:=dibbler\r
+PKG_VERSION:=0.5.0\r
+PKG_RELEASE:=1\r
+\r
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz\r
+PKG_SOURCE_URL:=http://klub.com.pl/dhcpv6/dibbler\r
+PKG_MD5SUM:=26a0e37512be7641a2deb0dc5b00e582\r
+PKG_CAT:=zcat\r
+\r
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)\r
+\r
+include $(INCLUDE_DIR)/package.mk\r
+\r
+define Package/dibbler/Default\r
+  SECTION:=ipv6\r
+  CATEGORY:=IPv6\r
+  DEPENDS:=+uclibcxx\r
+  TITLE:=Dibbler, a portable DHCPv6 implementation\r
+  URL:=http://klub.com.pl/dhcpv6/\r
+endef\r
+\r
+define Package/dibbler-client\r
+  $(call Package/dibbler/Default)\r
+  TITLE+= (client)\r
+endef\r
+\r
+define Package/dibbler-relay\r
+  $(call Package/dibbler/Default)\r
+  TITLE+= (relay)\r
+endef\r
+\r
+define Package/dibbler-server\r
+  $(call Package/dibbler/Default)\r
+  TITLE+= (server)\r
+endef\r
+\r
+define Build/Configure\r
+       (cd $(PKG_BUILD_DIR)/poslib; \\r
+               $(TARGET_CONFIGURE_OPTS) \\r
+               CFLAGS="$(TARGET_CFLAGS)" \\r
+               CPPFLAGS="$(EXTRA_CPPFLAGS)" \\r
+               LDFLAGS="$(EXTRA_LDFLAGS)" \\r
+               ./configure \\r
+                       --target=$(GNU_TARGET_NAME) \\r
+                       --host=$(GNU_TARGET_NAME) \\r
+                       --build=$(GNU_HOST_NAME) \\r
+                       --program-prefix="" \\r
+                       --program-suffix="" \\r
+                       --prefix=/usr \\r
+                       --exec-prefix=/usr \\r
+                       --bindir=/usr/bin \\r
+                       --datadir=/usr/share \\r
+                       --includedir=/usr/include \\r
+                       --infodir=/usr/share/info \\r
+                       --libdir=/usr/lib \\r
+                       --libexecdir=/usr/lib \\r
+                       --localstatedir=/var \\r
+                       --mandir=/usr/share/man \\r
+                       --sbindir=/usr/sbin \\r
+                       --sysconfdir=/etc \\r
+                       $(DISABLE_NLS) \\r
+                       $(DISABLE_LARGEFILE) \\r
+       );\r
+endef\r
+\r
+CXX_LIBS:= -nodefaultlibs -Wl,-Bdynamic,-luClibc++,-Bstatic,-lstdc++,-Bdynamic,-lm,-lc,-lgcc\r
+define Build/Compile\r
+       $(MAKE) -C $(PKG_BUILD_DIR) \\r
+               $(TARGET_CONFIGURE_OPTS) \\r
+               PORT_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS) -fno-builtin -fno-rtti" \\r
+               PORT_LDFLAGS="$(EXTRA_LDFLAGS)" \\r
+               DEBUGINFO= \\r
+               CLNT_LIBS="$(CXX_LIBS)" \\r
+               SRV_LIBS="$(CXX_LIBS)" \\r
+               server client relay\r
+endef\r
+\r
+define Package/dibbler-client/install  \r
+       $(INSTALL_DIR) $(1)/usr/sbin\r
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/\r
+endef\r
+\r
+define Package/dibbler-relay/install   \r
+       $(INSTALL_DIR) $(1)/usr/sbin\r
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/\r
+endef\r
+\r
+define Package/dibbler-server/install  \r
+       $(INSTALL_DIR) $(1)/usr/sbin\r
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/\r
+endef\r
+\r
+$(eval $(call BuildPackage,dibbler-client))\r
+$(eval $(call BuildPackage,dibbler-relay))\r
+$(eval $(call BuildPackage,dibbler-server))\r
diff --git a/ipv6/dibbler/patches/01-cross_compile.patch b/ipv6/dibbler/patches/01-cross_compile.patch
new file mode 100644 (file)
index 0000000..344f106
--- /dev/null
@@ -0,0 +1,55 @@
+diff -ruN dibbler-0.5.0-old/Makefile dibbler-0.5.0-new/Makefile
+--- dibbler-0.5.0-old/Makefile 2006-10-06 00:58:22.000000000 +0200
++++ dibbler-0.5.0-new/Makefile 2007-01-31 18:03:24.000000000 +0100
+@@ -50,7 +50,8 @@
+       -L$(MISC)         -lMisc           \
+       -L$(MESSAGES)     -lMsg            \
+       -lClntOptions -lOptions -lLowLevel \
+-      -L$(POSLIB)       $(CLNTPOSLIB)
++      -L$(POSLIB)       $(CLNTPOSLIB) \
++      $(CLNT_LIBS)
+ ifndef MOD_CLNT_DISABLE_DNSUPDATE
+ CLNTPOSLIB=-lposlib   
+@@ -81,7 +82,9 @@
+       -L$(OPTIONS)     -lOptions         \
+       -L$(LOWLEVEL)    -lLowLevel        \
+       -L$(IFACEMGR)    -lIfaceMgr        \
+-      -L$(POSLIB)      $(SRVPOSLIB)
++      -L$(POSLIB)      $(SRVPOSLIB)      \
++      $(SRV_LIBS)
++
+ ifndef MOD_SRV_DISABLE_DNSUPDATE
+ SRVPOSLIB=-lposlib    
+@@ -104,7 +107,8 @@
+       -L$(MESSAGES)    -lMsg          \
+       -L$(MISC)        -lMisc         \
+       -L$(OPTIONS)     -lOptions      \
+-      -lMisc -lIfaceMgr -lLowLevel -lRelTransMgr -lRelCfgMgr -lRelMsg -lRelOptions -lOptions
++      -lMisc -lIfaceMgr -lLowLevel -lRelTransMgr -lRelCfgMgr -lRelMsg -lRelOptions -lOptions \
++      $(SRV_LIBS)
+ objs: includes
+       @for dir in $(COMMONSUBDIRS); do \
+diff -ruN dibbler-0.5.0-old/Makefile.inc dibbler-0.5.0-new/Makefile.inc
+--- dibbler-0.5.0-old/Makefile.inc     2006-08-22 02:11:49.000000000 +0200
++++ dibbler-0.5.0-new/Makefile.inc     2007-01-31 17:43:07.000000000 +0100
+@@ -5,7 +5,7 @@
+ BISONPP      = $(PREFIX)/bison++/bison++ -S $(PREFIX)/bison++/bison.cc -H $(PREFIX)/bison++/bison.h
+ # === compiler options ===
+-COPTS        = -D$(ARCH) $(PORT_CFLAGS) $(XMLCFLAGS) -I $(INCDIR) $(DEBUGINFO) -Wall -funsigned-char -O0 $(PEDANTIC)
++COPTS        = -D$(ARCH) $(PORT_CFLAGS) $(XMLCFLAGS) -I $(INCDIR) $(DEBUGINFO) -Wall -funsigned-char $(PEDANTIC)
+ OPTS         = -ftemplate-depth-40 $(COPTS) $(CFLAGS) $(CXXFLAGS)
+ # === linker options ===
+@@ -124,7 +124,7 @@
+ %.a: objs
+       @echo "[LIB    ] $(SUBDIR)/$@"  
+-      ar cr $@ $(OBJECTS)
++      $(AR) cr $@ $(OBJECTS)
+ all: libs
diff --git a/ipv6/dibbler/patches/02-no_silent_make.patch b/ipv6/dibbler/patches/02-no_silent_make.patch
new file mode 100644 (file)
index 0000000..4350dec
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ruN dibbler-0.5.0-old/Makefile.inc dibbler-0.5.0-new/Makefile.inc
+--- dibbler-0.5.0-old/Makefile.inc     2006-08-22 02:11:49.000000000 +0200
++++ dibbler-0.5.0-new/Makefile.inc     2007-01-31 17:43:07.000000000 +0100
+@@ -64,7 +64,7 @@
+ #XMLLIBS      = `pkg-config libxml-2.0 --libs`
+ # === do not modify anything below ===
+-MAKEFLAGS   += -s
++#MAKEFLAGS   += -s
+ VERSION      = `$(TOPDIR)/test/xtract_version`
+ INST_WORKDIR = $(DESTDIR)'/var/lib/dibbler'
+ INST_MANDIR  = $(DESTDIR)'/usr/local/man'
diff --git a/ipv6/dibbler/patches/03-linux_types_missing.patch b/ipv6/dibbler/patches/03-linux_types_missing.patch
new file mode 100644 (file)
index 0000000..1278599
--- /dev/null
@@ -0,0 +1,11 @@
+diff -ruN dibbler-0.5.0-old/Port-linux/utils.h dibbler-0.5.0-new/Port-linux/utils.h
+--- dibbler-0.5.0-old/Port-linux/utils.h       2006-01-12 01:23:35.000000000 +0100
++++ dibbler-0.5.0-new/Port-linux/utils.h       2007-01-31 17:44:42.000000000 +0100
+@@ -2,6 +2,7 @@
+ #define __UTILS_H__ 1
+ #include <asm/types.h>
++#include <linux/types.h>
+ #include <linux/inetdevice.h>
+ #include <resolv.h>