2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
16 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17 PKG_MD5SUM:=220e68795ab0375cb3bc1f40c47e0bb2
19 include $(INCLUDE_DIR)/package.mk
21 # add dependency on 2.6 since recent dibbler needs <linux/ip_mp_alg.h>
22 define Package/dibbler/Default
25 DEPENDS:=+uclibcxx @LINUX_2_6
26 TITLE:=Dibbler, a portable DHCPv6 implementation
27 URL:=http://klub.com.pl/dhcpv6/
30 define Package/dibbler-client
31 $(call Package/dibbler/Default)
35 define Package/dibbler-relay
36 $(call Package/dibbler/Default)
40 define Package/dibbler-server
41 $(call Package/dibbler/Default)
45 define Build/Configure
46 (cd $(PKG_BUILD_DIR)/poslib; \
47 $(TARGET_CONFIGURE_OPTS) \
48 CFLAGS="$(TARGET_CFLAGS)" \
49 CPPFLAGS="$(TARGET_CPPFLAGS)" \
50 LDFLAGS="$(TARGET_LDFLAGS)" \
52 --target=$(GNU_TARGET_NAME) \
53 --host=$(GNU_TARGET_NAME) \
54 --build=$(GNU_HOST_NAME) \
60 --datadir=/usr/share \
61 --includedir=/usr/include \
62 --infodir=/usr/share/info \
64 --libexecdir=/usr/lib \
65 --localstatedir=/var \
66 --mandir=/usr/share/man \
70 $(DISABLE_LARGEFILE) \
74 # link stuff missing from uClibc++ but present in stdc++ statically
75 CXX_LIBS:= -nodefaultlibs -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -lm
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 $(TARGET_CONFIGURE_OPTS) \
80 PORT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -fno-builtin -fno-rtti" \
81 PORT_LDFLAGS="$(TARGET_LDFLAGS)" \
83 CXXLD="$(TARGET_CC)" \
84 CLNT_LIBS="$(CXX_LIBS)" \
85 SRV_LIBS="$(CXX_LIBS)" \
89 define Package/dibbler-client/install
90 $(INSTALL_DIR) $(1)/usr/sbin
91 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/
94 define Package/dibbler-relay/install
95 $(INSTALL_DIR) $(1)/usr/sbin
96 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/
99 define Package/dibbler-server/install
100 $(INSTALL_DIR) $(1)/usr/sbin
101 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/
104 $(eval $(call BuildPackage,dibbler-client))
105 $(eval $(call BuildPackage,dibbler-relay))
106 $(eval $(call BuildPackage,dibbler-server))