Merge pull request #2126 from lynxis/libmicrohttpd
[feed/packages.git] / net / isc-dhcp / Makefile
1 #
2 # Copyright (C) 2006-2012 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:=isc-dhcp
11 UPSTREAM_NAME:=dhcp
12 PKG_VERSION:=4.3.3
13 PKG_RELEASE:=1
14
15 PKG_LICENSE:=BSD-3-Clause
16 PKG_LICENSE_FILES:=LICENSE
17 PKG_MAINTAINER:=Antony Antony <antony@phenome.org>
18
19 PKG_SOURCE:=$(UPSTREAM_NAME)-$(PKG_VERSION).tar.gz
20 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION)
21 PKG_MD5SUM:=c5577b09c9017cdd319a11ff6364268e
22
23 PKG_FIXUP:=autoreconf
24 PKG_BUILD_PARALLEL:=1
25
26 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(UPSTREAM_NAME)-$(PKG_VERSION)
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/isc-dhcp/Default
31 SECTION:=net
32 CATEGORY:=Network
33 SUBMENU:=IP Addresses and Names
34 TITLE:=ISC's DHCP
35 URL:=https://www.isc.org/software/dhcp
36 endef
37
38 define Package/isc-dhcp-relay-ipv4
39 $(call Package/isc-dhcp/Default)
40 TITLE+= relay (without IPv6)
41 VARIANT:=ipv4
42 endef
43
44 define Package/isc-dhcp-relay-ipv6
45 $(call Package/isc-dhcp/Default)
46 TITLE+= relay (with IPv6)
47 VARIANT:=ipv6
48 endef
49
50 define Package/isc-dhcp-relay/description
51 provides a means for relaying DHCP and BOOTP requests from a subnet to which
52 no DHCP server is directly connected to one or more DHCP servers on other
53 subnets.
54 endef
55
56 define Package/isc-dhcp-relay-ipv4/description
57 $(call Package/isc-dhcp-relay-ipv6/description)
58 This package is compiled with IPv4 support only.
59 endef
60
61 define Package/isc-dhcp-relay-ipv4/conffiles
62 /etc/config/dhcrelay
63 endef
64
65 define Package/isc-dhcp-relay-ipv6/description
66 $(call Package/isc-dhcp-relay/description)
67 This package is compiled with IPv4 and IPv6 support.
68 endef
69
70 define Package/isc-dhcp-relay-ipv6/conffiles
71 /etc/config/dhcrelay
72 endef
73
74 define Package/isc-dhcp-client-ipv4
75 $(call Package/isc-dhcp/Default)
76 TITLE+= client (without IPv6)
77 VARIANT:=ipv4
78 endef
79
80 define Package/isc-dhcp-client-ipv6
81 $(call Package/isc-dhcp/Default)
82 TITLE+= client (with IPv6)
83 VARIANT:=ipv6
84 endef
85
86 define Package/isc-dhcp-client/description
87 provides a means for configuring one or more network interfaces using the
88 Dynamic Host Configuration Protocol, BOOTP protocol, or if these protocols
89 fail, by statically assigning an address.
90 endef
91
92 define Package/isc-dhcp-client-ipv4/description
93 $(call Package/isc-dhcp-client/description)
94 This package is compiled with IPv4 support only.
95 endef
96
97 define Package/isc-dhcp-client-ipv6/description
98 $(call Package/isc-dhcp-client/description)
99 This package is compiled with IPv4 and IPv6 support.
100 endef
101
102 define Package/isc-dhcp-server-ipv4
103 $(call Package/isc-dhcp/Default)
104 TITLE+= server (without IPv6)
105 VARIANT:=ipv4
106 endef
107
108 define Package/isc-dhcp-server-ipv6
109 $(call Package/isc-dhcp/Default)
110 TITLE+= server (with IPv6)
111 VARIANT:=ipv6
112 endef
113
114 define Package/isc-dhcp-server/description
115 implements the Dynamic Host Configuration Protocol (DHCP) and the Internet
116 Bootstrap Protocol (BOOTP).
117 endef
118
119 define Package/isc-dhcp-server-ipv4/description
120 $(call Package/isc-dhcp-server/description)
121 This package is compiled with IPv4 support only.
122 endef
123
124 define Package/isc-dhcp-server-ipv6/description
125 $(call Package/isc-dhcp-server/description)
126 This package is compiled with IPv4 and IPv6 support.
127 endef
128
129 define Package/isc-dhcp-omshell-ipv4
130 $(call Package/isc-dhcp/Default)
131 DEPENDS:= +isc-dhcp-server-ipv4
132 TITLE+= omshell (without IPv6)
133 VARIANT:=ipv4
134 endef
135
136 define Package/isc-dhcp-omshell-ipv6
137 $(call Package/isc-dhcp/Default)
138 DEPENDS:= +isc-dhcp-server-ipv6
139 TITLE+= omshell (with IPv6)
140 VARIANT:=ipv6
141 endef
142
143 define Package/isc-dhcp-omshell/description
144 provides an interactive way to connect to, query, and possibly change, the ISC
145 DHCP Server's state via OMAPI, the Object Management API.
146 endef
147
148 define Package/isc-dhcp-omshell-ipv4/description
149 $(call Package/isc-dhcp-omshell/description)
150 This package is compiled with IPv4 support only.
151 endef
152
153 define Package/isc-dhcp-omshell-ipv6/description
154 $(call Package/isc-dhcp-omshell/description)
155 This package is compiled with IPv4 and IPv6 support.
156 endef
157
158 CONFIGURE_ARGS += \
159 --disable-tracing \
160 --enable-paranoia \
161 --disable-dependency-tracking \
162 --with-randomdev=/dev/urandom \
163 ac_cv_file__dev_random=yes
164
165 ifeq ($(BUILD_VARIANT),ipv4)
166 CONFIGURE_ARGS += --disable-dhcpv6
167 endif
168 ifeq ($(BUILD_VARIANT),ipv6)
169 CONFIGURE_ARGS += --enable-dhcpv6
170 endif
171
172 define Build/Compile
173 $(MAKE) -C $(PKG_BUILD_DIR) \
174 DESTDIR="$(PKG_INSTALL_DIR)" \
175 BUILD_CC="$(HOSTCC_NOCACHE)" \
176 CROSS_CC="$(TARGET_CC)" \
177 host_alias="$(GNU_TARGET_NAME)" \
178 target_alias="$(GNU_TARGET_NAME)" \
179 build_alias="$(GNU_HOST_NAME)" \
180 all install-exec
181 endef
182
183 define Package/isc-dhcp-relay-$(BUILD_VARIANT)/install
184 $(INSTALL_DIR) $(1)/usr/sbin
185 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin
186 $(INSTALL_DIR) $(1)/etc/config
187 $(INSTALL_DATA) ./files/etc/config/dhcrelay $(1)/etc/config
188 $(INSTALL_DIR) $(1)/etc/init.d
189 $(INSTALL_BIN) ./files/dhcrelay4.init $(1)/etc/init.d/dhcrelay4
190 endef
191
192 define Package/isc-dhcp-server-$(BUILD_VARIANT)/install
193 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc
194 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
195 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin
196 $(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
197 $(INSTALL_BIN) ./files/dhcpd.conf $(1)/etc
198 ifeq ($(BUILD_VARIANT),ipv6)
199 $(INSTALL_BIN) ./files/dhcpd6.init $(1)/etc/init.d/dhcpd6
200 $(INSTALL_BIN) ./files/dhcpd6.conf $(1)/etc
201 endif
202 endef
203
204 define Package/isc-dhcp-server-ipv4/conffiles
205 /etc/dhcpd.conf
206 endef
207
208 define Package/isc-dhcp-server-ipv6/conffiles
209 /etc/dhcpd6.conf
210 endef
211
212 define Package/isc-dhcp-client-$(BUILD_VARIANT)/install
213 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc
214 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhclient $(1)/usr/sbin
215 $(INSTALL_BIN) ./files/dhclient-script $(1)/usr/sbin/
216 ifeq ($(BUILD_VARIANT),ipv6)
217 $(INSTALL_BIN) ./files/dhclient6.conf $(1)/etc
218 endif
219 endef
220
221 define Package/isc-dhcp-client-ipv4/conffiles
222 /etc/dhclient.conf
223 endef
224
225 define Package/isc-dhcp-client-ipv6/conffiles
226 /etc/dhclient6.conf
227 endef
228
229 define Package/isc-dhcp-omshell-$(BUILD_VARIANT)/install
230 $(INSTALL_DIR) $(1)/usr/bin
231 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin
232 endef
233
234 $(eval $(call BuildPackage,isc-dhcp-relay-ipv4))
235 $(eval $(call BuildPackage,isc-dhcp-server-ipv4))
236 $(eval $(call BuildPackage,isc-dhcp-client-ipv4))
237 $(eval $(call BuildPackage,isc-dhcp-omshell-ipv4))
238 $(eval $(call BuildPackage,isc-dhcp-relay-ipv6))
239 $(eval $(call BuildPackage,isc-dhcp-server-ipv6))
240 $(eval $(call BuildPackage,isc-dhcp-client-ipv6))
241 $(eval $(call BuildPackage,isc-dhcp-omshell-ipv6))