[Packages] ipv6/dibbler: Update to 0.6.1 (closes: #3226
[packages.git] / ipv6 / dibbler / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=dibbler
12 PKG_VERSION:=0.6.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
16 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17 PKG_MD5SUM:=220e68795ab0375cb3bc1f40c47e0bb2
18
19 include $(INCLUDE_DIR)/package.mk
20
21 # add dependency on 2.6 since recent dibbler needs <linux/ip_mp_alg.h>
22 define Package/dibbler/Default
23   SECTION:=ipv6
24   CATEGORY:=IPv6
25   DEPENDS:=+uclibcxx @LINUX_2_6
26   TITLE:=Dibbler, a portable DHCPv6 implementation
27   URL:=http://klub.com.pl/dhcpv6/
28 endef
29
30 define Package/dibbler-client
31   $(call Package/dibbler/Default)
32   TITLE+= (client)
33 endef
34
35 define Package/dibbler-relay
36   $(call Package/dibbler/Default)
37   TITLE+= (relay)
38 endef
39
40 define Package/dibbler-server
41   $(call Package/dibbler/Default)
42   TITLE+= (server)
43 endef
44
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)" \
51                 ./configure \
52                         --target=$(GNU_TARGET_NAME) \
53                         --host=$(GNU_TARGET_NAME) \
54                         --build=$(GNU_HOST_NAME) \
55                         --program-prefix="" \
56                         --program-suffix="" \
57                         --prefix=/usr \
58                         --exec-prefix=/usr \
59                         --bindir=/usr/bin \
60                         --datadir=/usr/share \
61                         --includedir=/usr/include \
62                         --infodir=/usr/share/info \
63                         --libdir=/usr/lib \
64                         --libexecdir=/usr/lib \
65                         --localstatedir=/var \
66                         --mandir=/usr/share/man \
67                         --sbindir=/usr/sbin \
68                         --sysconfdir=/etc \
69                         $(DISABLE_NLS) \
70                         $(DISABLE_LARGEFILE) \
71         );
72 endef
73
74 # link stuff missing from uClibc++ but present in stdc++ statically
75 CXX_LIBS:= -nodefaultlibs -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -lm
76
77 define Build/Compile
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)" \
82                 DEBUGINFO= \
83                 CXXLD="$(TARGET_CC)" \
84                 CLNT_LIBS="$(CXX_LIBS)" \
85                 SRV_LIBS="$(CXX_LIBS)" \
86                 server client relay
87 endef
88
89 define Package/dibbler-client/install
90         $(INSTALL_DIR) $(1)/usr/sbin
91         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/
92 endef
93
94 define Package/dibbler-relay/install
95         $(INSTALL_DIR) $(1)/usr/sbin
96         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/
97 endef
98
99 define Package/dibbler-server/install
100         $(INSTALL_DIR) $(1)/usr/sbin
101         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/
102 endef
103
104 $(eval $(call BuildPackage,dibbler-client))
105 $(eval $(call BuildPackage,dibbler-relay))
106 $(eval $(call BuildPackage,dibbler-server))