add dibbler package (thanx to forum2006)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@6247 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2007-02-01 23:41:26 +00:00
parent dfa5e7d69c
commit e8aeb156ae
4 changed files with 183 additions and 0 deletions

105
ipv6/dibbler/Makefile Normal file
View File

@ -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))

View File

@ -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

View File

@ -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'

View File

@ -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>