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.

219 lines
5.6 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:=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. 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. --sysconfdir=/etc/bind
  94. ifdef CONFIG_BIND_ENABLE_FILTER_AAAA
  95. CONFIGURE_ARGS += \
  96. --enable-filter-aaaa
  97. endif
  98. CONFIGURE_VARS += \
  99. BUILD_CC="$(TARGET_CC)" \
  100. define Build/Compile
  101. $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
  102. BUILD_CC="$(HOSTCC)" \
  103. CC="$(HOSTCC)" \
  104. CFLAGS="-O2" \
  105. LIBS="" \
  106. gen
  107. $(call Build/Compile/Default)
  108. endef
  109. define Package/bind-libs/install
  110. $(INSTALL_DIR) $(1)/usr/lib
  111. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  112. endef
  113. define Package/bind-server/install
  114. $(INSTALL_DIR) $(1)/usr/sbin
  115. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
  116. $(INSTALL_DIR) $(1)/etc/bind
  117. $(CP) \
  118. ./files/bind/db.0 \
  119. ./files/bind/db.127 \
  120. ./files/bind/db.255 \
  121. ./files/bind/db.local \
  122. ./files/bind/db.root \
  123. $(1)/etc/bind/
  124. $(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf
  125. $(INSTALL_DIR) $(1)/etc/init.d
  126. $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
  127. find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
  128. endef
  129. define Package/bind-server/conffiles
  130. /etc/bind/db.0
  131. /etc/bind/db.127
  132. /etc/bind/db.255
  133. /etc/bind/db.local
  134. /etc/bind/db.root
  135. /etc/bind/named.conf
  136. endef
  137. define Package/bind-client/install
  138. $(INSTALL_DIR) $(1)/usr/bin
  139. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
  140. endef
  141. define Package/bind-tools/install
  142. $(INSTALL_DIR) $(1)/usr/bin
  143. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  144. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  145. $(INSTALL_DIR) $(1)/usr/sbin
  146. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  147. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  148. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  149. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  150. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
  151. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
  152. endef
  153. define Package/bind-rndc/install
  154. $(INSTALL_DIR) $(1)/usr/sbin
  155. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
  156. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
  157. endef
  158. define Package/bind-check/install
  159. $(INSTALL_DIR) $(1)/usr/sbin
  160. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  161. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  162. endef
  163. define Package/bind-dnssec/install
  164. $(INSTALL_DIR) $(1)/usr/sbin
  165. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  166. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  167. endef
  168. define Package/bind-host/install
  169. $(INSTALL_DIR) $(1)/usr/bin
  170. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  171. endef
  172. define Package/bind-dig/install
  173. $(INSTALL_DIR) $(1)/usr/bin
  174. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  175. endef
  176. $(eval $(call BuildPackage,bind-libs))
  177. $(eval $(call BuildPackage,bind-server))
  178. $(eval $(call BuildPackage,bind-client))
  179. $(eval $(call BuildPackage,bind-tools))
  180. $(eval $(call BuildPackage,bind-rndc))
  181. $(eval $(call BuildPackage,bind-check))
  182. $(eval $(call BuildPackage,bind-dnssec))
  183. $(eval $(call BuildPackage,bind-host))
  184. $(eval $(call BuildPackage,bind-dig))