2 # Copyright (C) 2006-2012 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
15 PKG_SOURCE:=$(UPSTREAM_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION)
17 PKG_MD5SUM:=c244cefe663d43100af757d8ff625a1f
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(UPSTREAM_NAME)-$(PKG_VERSION)
24 include $(INCLUDE_DIR)/package.mk
26 define Package/isc-dhcp/Default
29 SUBMENU:=IP Addresses and Names
31 URL:=https://www.isc.org/software/dhcp
34 define Package/isc-dhcp-relay-ipv4
35 $(call Package/isc-dhcp/Default)
36 TITLE+= relay (without IPv6)
40 define Package/isc-dhcp-relay-ipv6
41 $(call Package/isc-dhcp/Default)
43 TITLE+= relay (with IPv6)
47 define Package/isc-dhcp-relay/description
48 provides a means for relaying DHCP and BOOTP requests from a subnet to which
49 no DHCP server is directly connected to one or more DHCP servers on other
53 define Package/isc-dhcp-relay-ipv4/description
54 $(call Package/isc-dhcp-relay-ipv6/description)
55 This package is compiled with IPv4 support only.
58 define Package/isc-dhcp-relay-ipv4/conffiles
62 define Package/isc-dhcp-relay-ipv6/description
63 $(call Package/isc-dhcp-relay/description)
64 This package is compiled with IPv4 and IPv6 support.
67 define Package/isc-dhcp-relay-ipv6/conffiles
71 define Package/isc-dhcp-client-ipv4
72 $(call Package/isc-dhcp/Default)
73 TITLE+= client (without IPv6)
77 define Package/isc-dhcp-client-ipv6
78 $(call Package/isc-dhcp/Default)
80 TITLE+= client (with IPv6)
84 define Package/isc-dhcp-client/description
85 provides a means for configuring one or more network interfaces using the
86 Dynamic Host Configuration Protocol, BOOTP protocol, or if these protocols
87 fail, by statically assigning an address.
90 define Package/isc-dhcp-client-ipv4/description
91 $(call Package/isc-dhcp-client/description)
92 This package is compiled with IPv4 support only.
95 define Package/isc-dhcp-client-ipv6/description
96 $(call Package/isc-dhcp-client/description)
97 This package is compiled with IPv4 and IPv6 support.
100 define Package/isc-dhcp-server-ipv4
101 $(call Package/isc-dhcp/Default)
102 TITLE+= server (without IPv6)
106 define Package/isc-dhcp-server-ipv6
107 $(call Package/isc-dhcp/Default)
109 TITLE+= server (with IPv6)
113 define Package/isc-dhcp-server/description
114 implements the Dynamic Host Configuration Protocol (DHCP) and the Internet
115 Bootstrap Protocol (BOOTP).
118 define Package/isc-dhcp-server-ipv4/description
119 $(call Package/isc-dhcp-server/description)
120 This package is compiled with IPv4 support only.
123 define Package/isc-dhcp-server-ipv6/description
124 $(call Package/isc-dhcp-server/description)
125 This package is compiled with IPv4 and IPv6 support.
128 define Package/isc-dhcp-omshell-ipv4
129 $(call Package/isc-dhcp/Default)
130 DEPENDS:= +isc-dhcp-server-ipv4
131 TITLE+= omshell (without IPv6)
135 define Package/isc-dhcp-omshell-ipv6
136 $(call Package/isc-dhcp/Default)
137 DEPENDS:= @IPV6 +isc-dhcp-server-ipv6
138 TITLE+= omshell (with IPv6)
142 define Package/isc-dhcp-omshell/description
143 provides an interactive way to connect to, query, and possibly change, the ISC
144 DHCP Server's state via OMAPI, the Object Management API.
147 define Package/isc-dhcp-omshell-ipv4/description
148 $(call Package/isc-dhcp-omshell/description)
149 This package is compiled with IPv4 support only.
152 define Package/isc-dhcp-omshell-ipv6/description
153 $(call Package/isc-dhcp-omshell/description)
154 This package is compiled with IPv4 and IPv6 support.
160 --disable-dependency-tracking \
161 ac_cv_file__dev_random=yes
163 ifeq ($(BUILD_VARIANT),ipv4)
164 CONFIGURE_ARGS += --disable-dhcpv6
166 ifeq ($(BUILD_VARIANT),ipv6)
167 CONFIGURE_ARGS += --enable-dhcpv6
171 $(MAKE) -C $(PKG_BUILD_DIR) \
172 DESTDIR="$(PKG_INSTALL_DIR)" \
173 BUILD_CC="$(HOSTCC_NOCACHE)" \
174 host_alias="$(GNU_TARGET_NAME)" \
175 target_alias="$(GNU_TARGET_NAME)" \
176 build_alias="$(GNU_HOST_NAME)" \
177 ac_cv_file__dev_random=yes \
181 define Package/isc-dhcp-relay-$(BUILD_VARIANT)/install
182 $(INSTALL_DIR) $(1)/usr/sbin
183 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin
184 $(INSTALL_DIR) $(1)/etc/config
185 $(INSTALL_DATA) ./files/etc/config/dhcrelay $(1)/etc/config
186 $(INSTALL_DIR) $(1)/etc/init.d
187 $(INSTALL_BIN) ./files/dhcrelay4.init $(1)/etc/init.d/dhcrelay4
188 ifeq ($(BUILD_VARIANT),ipv6)
189 $(INSTALL_BIN) ./files/dhcrelay6.init $(1)/etc/init.d/dhcrelay6
193 define Package/isc-dhcp-server-$(BUILD_VARIANT)/install
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
204 define Package/isc-dhcp-client-$(BUILD_VARIANT)/install
205 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
206 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhclient $(1)/usr/sbin
207 $(INSTALL_BIN) ./files/dhclient-script $(1)/usr/sbin/
208 $(INSTALL_BIN) ./files/dhclient.init $(1)/etc/init.d/dhclient
209 ifeq ($(BUILD_VARIANT),ipv6)
210 $(INSTALL_BIN) ./files/dhclient6.init $(1)/etc/init.d/dhclient6
211 $(INSTALL_BIN) ./files/dhclient6.conf $(1)/etc
215 define Package/isc-dhcp-omshell-$(BUILD_VARIANT)/install
216 $(INSTALL_DIR) $(1)/usr/bin
217 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin
220 $(eval $(call BuildPackage,isc-dhcp-relay-ipv4))
221 $(eval $(call BuildPackage,isc-dhcp-server-ipv4))
222 $(eval $(call BuildPackage,isc-dhcp-client-ipv4))
223 $(eval $(call BuildPackage,isc-dhcp-omshell-ipv4))
224 $(eval $(call BuildPackage,isc-dhcp-relay-ipv6))
225 $(eval $(call BuildPackage,isc-dhcp-server-ipv6))
226 $(eval $(call BuildPackage,isc-dhcp-client-ipv6))
227 $(eval $(call BuildPackage,isc-dhcp-omshell-ipv6))