You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

241 lines
6.5 KiB

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