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.

223 lines
5.8 KiB

  1. #
  2. # Copyright (C) 2006-2012 OpenWrt.org
  3. # 2014-2017 Noah Meyerhans <frodo@morgul.net>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=bind
  10. PKG_VERSION:=9.11.2
  11. PKG_RELEASE:=2
  12. USERID:=bind=57:bind=57
  13. PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
  14. PKG_LICENSE := BSD-3-Clause
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  16. PKG_SOURCE_URL:= \
  17. http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \
  18. http://ftp.isc.org/isc/bind9/$(PKG_VERSION)
  19. PKG_HASH:=7f46ad8620f7c3b0ac375d7a5211b15677708fda84ce25d7aeb7222fe2e3c77a
  20. PKG_FIXUP:=autoreconf
  21. PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
  22. PKG_INSTALL:=1
  23. PKG_USE_MIPS16:=0
  24. PKG_CONFIG_DEPENDS := \
  25. CONFIG_BIND_ENABLE_FILTER_AAAA
  26. include $(INCLUDE_DIR)/package.mk
  27. define Package/bind/Default
  28. SECTION:=net
  29. CATEGORY:=Network
  30. DEPENDS:=+bind-libs +@OPENSSL_WITH_EC
  31. TITLE:=bind
  32. URL:=https://www.isc.org/software/bind
  33. SUBMENU:=IP Addresses and Names
  34. endef
  35. define Package/bind-libs
  36. SECTION:=libs
  37. CATEGORY:=Libraries
  38. DEPENDS:=+libopenssl +zlib
  39. TITLE:=bind shared libraries
  40. URL:=https://www.isc.org/software/bind
  41. endef
  42. define Package/bind-server
  43. $(call Package/bind/Default)
  44. TITLE+= DNS server
  45. DEPENDS+= +@OPENSSL_WITH_DEPRECATED
  46. endef
  47. define Package/bind-server/config
  48. source "$(SOURCE)/Config.in"
  49. endef
  50. define Package/bind-client
  51. $(call Package/bind/Default)
  52. TITLE+= dynamic DNS client
  53. endef
  54. define Package/bind-tools
  55. $(call Package/bind/Default)
  56. TITLE+= administration tools (all)
  57. endef
  58. define Package/bind-rndc
  59. $(call Package/bind/Default)
  60. TITLE+= administration tools (rndc and rndc-confgen only)
  61. endef
  62. define Package/bind-check
  63. $(call Package/bind/Default)
  64. TITLE+= administration tools (named-checkconf and named-checkzone only)
  65. endef
  66. define Package/bind-dnssec
  67. $(call Package/bind/Default)
  68. TITLE+= administration tools (dnssec-keygen, dnssec-settime and dnssec-signzone only)
  69. endef
  70. define Package/bind-host
  71. $(call Package/bind/Default)
  72. TITLE+= simple DNS client
  73. endef
  74. define Package/bind-dig
  75. $(call Package/bind/Default)
  76. TITLE+= DNS excavation tool
  77. endef
  78. export BUILD_CC="$(TARGET_CC)"
  79. CONFIGURE_ARGS += \
  80. --enable-shared \
  81. --enable-static \
  82. --with-randomdev="/dev/urandom" \
  83. --disable-threads \
  84. --disable-linux-caps \
  85. --with-openssl="$(STAGING_DIR)/usr" \
  86. --with-libjson=no \
  87. --with-libtool \
  88. --with-libxml2=no \
  89. --without-lmdb \
  90. --enable-epoll=yes \
  91. --with-gost=no \
  92. --with-gssapi=no \
  93. --with-ecdsa=$(if $(CONFIG_OPENSSL_WITH_EC),yes,no) \
  94. --with-readline=no \
  95. --sysconfdir=/etc/bind
  96. ifdef CONFIG_BIND_ENABLE_FILTER_AAAA
  97. CONFIGURE_ARGS += \
  98. --enable-filter-aaaa
  99. endif
  100. CONFIGURE_VARS += \
  101. BUILD_CC="$(TARGET_CC)" \
  102. define Build/Compile
  103. $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
  104. BUILD_CC="$(HOSTCC)" \
  105. CC="$(HOSTCC)" \
  106. CFLAGS="-O2" \
  107. LIBS="" \
  108. gen
  109. $(call Build/Compile/Default)
  110. endef
  111. define Package/bind-libs/install
  112. $(INSTALL_DIR) $(1)/usr/lib
  113. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  114. endef
  115. define Package/bind-server/install
  116. $(INSTALL_DIR) $(1)/usr/sbin
  117. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
  118. $(INSTALL_DIR) $(1)/etc/bind
  119. $(CP) \
  120. ./files/bind/db.0 \
  121. ./files/bind/db.127 \
  122. ./files/bind/db.255 \
  123. ./files/bind/db.local \
  124. ./files/bind/db.root \
  125. $(1)/etc/bind/
  126. $(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf
  127. $(INSTALL_DIR) $(1)/etc/init.d
  128. $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
  129. find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
  130. endef
  131. define Package/bind-server/conffiles
  132. /etc/bind/db.0
  133. /etc/bind/db.127
  134. /etc/bind/db.255
  135. /etc/bind/db.local
  136. /etc/bind/db.root
  137. /etc/bind/named.conf
  138. endef
  139. define Package/bind-client/install
  140. $(INSTALL_DIR) $(1)/usr/bin
  141. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
  142. endef
  143. define Package/bind-tools/install
  144. $(INSTALL_DIR) $(1)/usr/bin
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  146. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  147. $(INSTALL_DIR) $(1)/usr/sbin
  148. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  149. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-settime $(1)/usr/sbin/
  150. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  151. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  152. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  153. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
  154. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
  155. endef
  156. define Package/bind-rndc/install
  157. $(INSTALL_DIR) $(1)/usr/sbin
  158. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
  159. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
  160. endef
  161. define Package/bind-check/install
  162. $(INSTALL_DIR) $(1)/usr/sbin
  163. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  164. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  165. endef
  166. define Package/bind-dnssec/install
  167. $(INSTALL_DIR) $(1)/usr/sbin
  168. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  169. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-settime $(1)/usr/sbin/
  170. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  171. endef
  172. define Package/bind-host/install
  173. $(INSTALL_DIR) $(1)/usr/bin
  174. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  175. endef
  176. define Package/bind-dig/install
  177. $(INSTALL_DIR) $(1)/usr/bin
  178. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  179. endef
  180. $(eval $(call BuildPackage,bind-libs))
  181. $(eval $(call BuildPackage,bind-server))
  182. $(eval $(call BuildPackage,bind-client))
  183. $(eval $(call BuildPackage,bind-tools))
  184. $(eval $(call BuildPackage,bind-rndc))
  185. $(eval $(call BuildPackage,bind-check))
  186. $(eval $(call BuildPackage,bind-dnssec))
  187. $(eval $(call BuildPackage,bind-host))
  188. $(eval $(call BuildPackage,bind-dig))