[package] update dibbler to 0.7.3 and change download location (#5203)
[packages.git] / ipv6 / dibbler / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=dibbler
11 PKG_VERSION:=0.7.3
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
15 PKG_SOURCE_URL:=http://klub.com.pl/dhcpv6/dibbler/
16 PKG_MD5SUM:=
17
18 include $(INCLUDE_DIR)/package.mk
19
20 # add dependency on 2.6 since recent dibbler needs <linux/ip_mp_alg.h>
21 define Package/dibbler/Default
22   SECTION:=ipv6
23   CATEGORY:=IPv6
24   DEPENDS:=+uclibcxx @LINUX_2_6
25   TITLE:=Dibbler, a portable DHCPv6 implementation
26   URL:=http://klub.com.pl/dhcpv6/
27 endef
28
29 define Package/dibbler/Default/description
30         Dibbler is a portable DHCPv6 implementation. It supports stateful (i.e.
31         IPv6 address granting) as well as stateless (i.e. option granting)
32         autoconfiguration for IPv6.
33 endef
34
35 define Package/dibbler-client
36   $(call Package/dibbler/Default)
37   TITLE+= (client)
38 endef
39
40 define Package/dibbler-client/description
41   $(call Package/dibbler/Default/description)
42   This package contains the dibbler client.
43 endef
44
45 define Package/dibbler-relay
46   $(call Package/dibbler/Default)
47   TITLE+= (relay)
48 endef
49
50 define Package/dibbler-relay/description
51   $(call Package/dibbler/Default/description)
52   This package contains the dibbler relay.
53 endef
54
55 define Package/dibbler-server
56   $(call Package/dibbler/Default)
57   TITLE+= (server)
58 endef
59
60 define Package/dibbler-server/description
61   $(call Package/dibbler/Default/description)
62   This package contains the dibbler server.
63 endef
64
65 define Build/Configure
66         (cd $(PKG_BUILD_DIR)/poslib; \
67                 $(TARGET_CONFIGURE_OPTS) \
68                 CFLAGS="$(TARGET_CFLAGS)" \
69                 CPPFLAGS="$(TARGET_CPPFLAGS)" \
70                 LDFLAGS="$(TARGET_LDFLAGS)" \
71                 ./configure \
72                         --target=$(GNU_TARGET_NAME) \
73                         --host=$(GNU_TARGET_NAME) \
74                         --build=$(GNU_HOST_NAME) \
75                         --program-prefix="" \
76                         --program-suffix="" \
77                         --prefix=/usr \
78                         --exec-prefix=/usr \
79                         --bindir=/usr/bin \
80                         --datadir=/usr/share \
81                         --includedir=/usr/include \
82                         --infodir=/usr/share/info \
83                         --libdir=/usr/lib \
84                         --libexecdir=/usr/lib \
85                         --localstatedir=/var \
86                         --mandir=/usr/share/man \
87                         --sbindir=/usr/sbin \
88                         --sysconfdir=/etc \
89                         $(DISABLE_NLS) \
90                         $(DISABLE_LARGEFILE) \
91         );
92 endef
93
94 # link stuff missing from uClibc++ but present in stdc++ statically
95 CXX_LIBS:= -nodefaultlibs -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -lgcc
96
97 define Build/Compile
98         $(MAKE) -C $(PKG_BUILD_DIR) \
99                 $(TARGET_CONFIGURE_OPTS) \
100                 PORT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -fno-builtin" \
101                 PORT_LDFLAGS="$(TARGET_LDFLAGS)" \
102                 DEBUGINFO= \
103                 CXXLD="$(TARGET_CC)" \
104                 CLNT_LIBS="$(CXX_LIBS)" \
105                 SRV_LIBS="$(CXX_LIBS)" \
106                 server client relay
107 endef
108
109 define Package/dibbler-client/install
110         $(INSTALL_DIR) $(1)/usr/sbin
111         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/
112 endef
113
114 define Package/dibbler-relay/install
115         $(INSTALL_DIR) $(1)/usr/sbin
116         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/
117 endef
118
119 define Package/dibbler-server/install
120         $(INSTALL_DIR) $(1)/usr/sbin
121         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/
122 endef
123
124 $(eval $(call BuildPackage,dibbler-client))
125 $(eval $(call BuildPackage,dibbler-relay))
126 $(eval $(call BuildPackage,dibbler-server))