From 26f99de386112db7639030f36ea6efac4277fab0 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Thu, 1 Feb 2007 23:41:26 +0000 Subject: [PATCH] add dibbler package (thanx to forum2006) SVN-Revision: 6247 --- ipv6/dibbler/Makefile | 105 ++++++++++++++++++ ipv6/dibbler/patches/01-cross_compile.patch | 55 +++++++++ ipv6/dibbler/patches/02-no_silent_make.patch | 12 ++ .../patches/03-linux_types_missing.patch | 11 ++ 4 files changed, 183 insertions(+) create mode 100644 ipv6/dibbler/Makefile create mode 100644 ipv6/dibbler/patches/01-cross_compile.patch create mode 100644 ipv6/dibbler/patches/02-no_silent_make.patch create mode 100644 ipv6/dibbler/patches/03-linux_types_missing.patch diff --git a/ipv6/dibbler/Makefile b/ipv6/dibbler/Makefile new file mode 100644 index 0000000000..b139e7e80f --- /dev/null +++ b/ipv6/dibbler/Makefile @@ -0,0 +1,105 @@ +# +# 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:=dibbler +PKG_VERSION:=0.5.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz +PKG_SOURCE_URL:=http://klub.com.pl/dhcpv6/dibbler +PKG_MD5SUM:=26a0e37512be7641a2deb0dc5b00e582 +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/dibbler/Default + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+uclibcxx + TITLE:=Dibbler, a portable DHCPv6 implementation + URL:=http://klub.com.pl/dhcpv6/ +endef + +define Package/dibbler-client + $(call Package/dibbler/Default) + TITLE+= (client) +endef + +define Package/dibbler-relay + $(call Package/dibbler/Default) + TITLE+= (relay) +endef + +define Package/dibbler-server + $(call Package/dibbler/Default) + TITLE+= (server) +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR)/poslib; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(EXTRA_CPPFLAGS)" \ + LDFLAGS="$(EXTRA_LDFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); +endef + +CXX_LIBS:= -nodefaultlibs -Wl,-Bdynamic,-luClibc++,-Bstatic,-lstdc++,-Bdynamic,-lm,-lc,-lgcc +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + PORT_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS) -fno-builtin -fno-rtti" \ + PORT_LDFLAGS="$(EXTRA_LDFLAGS)" \ + DEBUGINFO= \ + CLNT_LIBS="$(CXX_LIBS)" \ + SRV_LIBS="$(CXX_LIBS)" \ + server client relay +endef + +define Package/dibbler-client/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/ +endef + +define Package/dibbler-relay/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/ +endef + +define Package/dibbler-server/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,dibbler-client)) +$(eval $(call BuildPackage,dibbler-relay)) +$(eval $(call BuildPackage,dibbler-server)) diff --git a/ipv6/dibbler/patches/01-cross_compile.patch b/ipv6/dibbler/patches/01-cross_compile.patch new file mode 100644 index 0000000000..344f106ae0 --- /dev/null +++ b/ipv6/dibbler/patches/01-cross_compile.patch @@ -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 index 0000000000..4350dec815 --- /dev/null +++ b/ipv6/dibbler/patches/02-no_silent_make.patch @@ -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 index 0000000000..12785990db --- /dev/null +++ b/ipv6/dibbler/patches/03-linux_types_missing.patch @@ -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 ++#include + #include + #include + -- 2.30.2