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