2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
15 PKG_SOURCE_URL:=http://klub.com.pl/dhcpv6/dibbler/
16 PKG_MD5SUM:=39be72da38c2e6d33fd43a2811a276b1
19 PKG_LIBTOOL_PATHS:=poslib
21 include $(INCLUDE_DIR)/package.mk
23 # add dependency on 2.6 since recent dibbler needs <linux/ip_mp_alg.h>
24 define Package/dibbler/Default
27 DEPENDS:=+libstdcpp @!LINUX_2_4 +libpthread
28 TITLE:=Dibbler, a portable DHCPv6 implementation
29 URL:=http://klub.com.pl/dhcpv6/
32 define Package/dibbler/Default/description
33 Dibbler is a portable DHCPv6 implementation. It supports stateful (i.e.
34 IPv6 address granting) as well as stateless (i.e. option granting)
35 autoconfiguration for IPv6.
38 define Package/dibbler-poslib
39 $(call Package/dibbler/Default)
43 define Package/dibbler-poslib/description
44 $(call Package/dibbler/Default/description)
45 This package contains the pos library.
48 define Package/dibbler-client
49 $(call Package/dibbler/Default)
53 define Package/dibbler-client/description
54 $(call Package/dibbler/Default/description)
55 This package contains the dibbler client.
58 define Package/dibbler-relay
59 $(call Package/dibbler/Default)
63 define Package/dibbler-relay/description
64 $(call Package/dibbler/Default/description)
65 This package contains the dibbler relay.
68 define Package/dibbler-server
69 $(call Package/dibbler/Default)
70 DEPENDS += +dibbler-poslib
74 define Package/dibbler-server/description
75 $(call Package/dibbler/Default/description)
76 This package contains the dibbler server.
79 define Build/Configure
80 (cd $(PKG_BUILD_DIR)/poslib; \
81 $(TARGET_CONFIGURE_OPTS) \
82 CFLAGS="$(TARGET_CFLAGS)" \
83 CPPFLAGS="$(TARGET_CPPFLAGS)" \
84 LDFLAGS="$(TARGET_LDFLAGS)" \
86 --target=$(GNU_TARGET_NAME) \
87 --host=$(GNU_TARGET_NAME) \
88 --build=$(GNU_HOST_NAME) \
94 --datadir=/usr/share \
95 --includedir=/usr/include \
96 --infodir=/usr/share/info \
98 --libexecdir=/usr/lib \
99 --localstatedir=/var \
100 --mandir=/usr/share/man \
101 --sbindir=/usr/sbin \
104 $(DISABLE_LARGEFILE) \
109 $(MAKE) -C $(PKG_BUILD_DIR) \
110 $(TARGET_CONFIGURE_OPTS) \
111 PORT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
112 PORT_LDFLAGS="$(TARGET_LDFLAGS)" \
117 define Package/dibbler-poslib/install
118 $(INSTALL_DIR) $(1)/usr/lib
119 $(CP) $(PKG_BUILD_DIR)/./poslib/poslib/.libs/libposlib.so* $(1)/usr/lib/
122 define Package/dibbler-client/install
123 $(INSTALL_DIR) $(1)/usr/sbin
124 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/
127 define Package/dibbler-relay/install
128 $(INSTALL_DIR) $(1)/usr/sbin
129 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/
132 define Package/dibbler-server/install
133 $(INSTALL_DIR) $(1)/usr/sbin
134 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/
135 $(INSTALL_DIR) $(1)/etc/init.d
136 $(INSTALL_BIN) ./files/dibbler.init $(1)/etc/init.d/
139 $(eval $(call BuildPackage,dibbler-poslib))
140 $(eval $(call BuildPackage,dibbler-client))
141 $(eval $(call BuildPackage,dibbler-relay))
142 $(eval $(call BuildPackage,dibbler-server))