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.

218 lines
5.5 KiB

  1. #
  2. # Copyright (C) 2006-2012 OpenWrt.org
  3. # 2014-2016 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.10.4-P4
  11. PKG_RELEASE:=1
  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. ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
  18. http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
  19. PKG_MD5SUM:=e110904a1d54f83f01d4be8bcd842927
  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_OPENSSL_WITH_EC \
  26. CONFIG_BIND_ENABLE_FILTER_AAAA
  27. include $(INCLUDE_DIR)/package.mk
  28. define Package/bind/Default
  29. SECTION:=net
  30. CATEGORY:=Network
  31. DEPENDS:=+bind-libs
  32. TITLE:=bind
  33. URL:=https://www.isc.org/software/bind
  34. SUBMENU:=IP Addresses and Names
  35. endef
  36. define Package/bind-libs
  37. SECTION:=libs
  38. CATEGORY:=Libraries
  39. DEPENDS:=+libopenssl
  40. TITLE:=bind shared libraries
  41. URL:=https://www.isc.org/software/bind
  42. endef
  43. define Package/bind-server
  44. $(call Package/bind/Default)
  45. TITLE+= DNS server
  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 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-libtool \
  87. --with-libxml2=no \
  88. --enable-epoll=yes \
  89. --with-gost=no \
  90. --with-gssapi=no \
  91. --with-ecdsa=$(if $(CONFIG_OPENSSL_WITH_EC),yes,no) \
  92. --with-readline=no
  93. ifdef CONFIG_BIND_ENABLE_FILTER_AAAA
  94. CONFIGURE_ARGS += \
  95. --enable-filter-aaaa
  96. endif
  97. CONFIGURE_VARS += \
  98. BUILD_CC="$(TARGET_CC)" \
  99. define Build/Compile
  100. $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
  101. BUILD_CC="$(HOSTCC)" \
  102. CC="$(HOSTCC)" \
  103. CFLAGS="-O2" \
  104. LIBS="" \
  105. gen
  106. $(call Build/Compile/Default)
  107. endef
  108. define Package/bind-libs/install
  109. $(INSTALL_DIR) $(1)/usr/lib
  110. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  111. endef
  112. define Package/bind-server/install
  113. $(INSTALL_DIR) $(1)/usr/sbin
  114. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
  115. $(INSTALL_DIR) $(1)/etc/bind
  116. $(CP) \
  117. ./files/bind/db.0 \
  118. ./files/bind/db.127 \
  119. ./files/bind/db.255 \
  120. ./files/bind/db.local \
  121. ./files/bind/db.root \
  122. $(1)/etc/bind/
  123. $(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf
  124. $(INSTALL_DIR) $(1)/etc/init.d
  125. $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
  126. find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
  127. endef
  128. define Package/bind-server/conffiles
  129. /etc/bind/db.0
  130. /etc/bind/db.127
  131. /etc/bind/db.255
  132. /etc/bind/db.local
  133. /etc/bind/db.root
  134. /etc/bind/named.conf
  135. endef
  136. define Package/bind-client/install
  137. $(INSTALL_DIR) $(1)/usr/bin
  138. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
  139. endef
  140. define Package/bind-tools/install
  141. $(INSTALL_DIR) $(1)/usr/bin
  142. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  143. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  144. $(INSTALL_DIR) $(1)/usr/sbin
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  146. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  147. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  148. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  149. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
  150. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
  151. endef
  152. define Package/bind-rndc/install
  153. $(INSTALL_DIR) $(1)/usr/sbin
  154. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
  155. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
  156. endef
  157. define Package/bind-check/install
  158. $(INSTALL_DIR) $(1)/usr/sbin
  159. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  160. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  161. endef
  162. define Package/bind-dnssec/install
  163. $(INSTALL_DIR) $(1)/usr/sbin
  164. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  165. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  166. endef
  167. define Package/bind-host/install
  168. $(INSTALL_DIR) $(1)/usr/bin
  169. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  170. endef
  171. define Package/bind-dig/install
  172. $(INSTALL_DIR) $(1)/usr/bin
  173. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  174. endef
  175. $(eval $(call BuildPackage,bind-libs))
  176. $(eval $(call BuildPackage,bind-server))
  177. $(eval $(call BuildPackage,bind-client))
  178. $(eval $(call BuildPackage,bind-tools))
  179. $(eval $(call BuildPackage,bind-rndc))
  180. $(eval $(call BuildPackage,bind-check))
  181. $(eval $(call BuildPackage,bind-dnssec))
  182. $(eval $(call BuildPackage,bind-host))
  183. $(eval $(call BuildPackage,bind-dig))