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.

217 lines
5.5 KiB

  1. #
  2. # Copyright (C) 2006-2012 OpenWrt.org
  3. # 2014 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.9.8-P4
  11. PKG_RELEASE:=3
  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:=5e401f6cf024f596044d733ceb0d6415
  20. PKG_FIXUP:=autoreconf
  21. PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
  22. PKG_INSTALL:=1
  23. PKG_CONFIG_DEPENDS := \
  24. CONFIG_OPENSSL_WITH_EC \
  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
  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
  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. endef
  46. define Package/bind-server/config
  47. source "$(SOURCE)/Config.in"
  48. endef
  49. define Package/bind-client
  50. $(call Package/bind/Default)
  51. TITLE+= dynamic DNS client
  52. endef
  53. define Package/bind-tools
  54. $(call Package/bind/Default)
  55. TITLE+= administration tools (all)
  56. endef
  57. define Package/bind-rndc
  58. $(call Package/bind/Default)
  59. TITLE+= administration tools (rndc and rndc-confgen only)
  60. endef
  61. define Package/bind-check
  62. $(call Package/bind/Default)
  63. TITLE+= administration tools (named-checkconf and named-checkzone only)
  64. endef
  65. define Package/bind-dnssec
  66. $(call Package/bind/Default)
  67. TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
  68. endef
  69. define Package/bind-host
  70. $(call Package/bind/Default)
  71. TITLE+= simple DNS client
  72. endef
  73. define Package/bind-dig
  74. $(call Package/bind/Default)
  75. TITLE+= DNS excavation tool
  76. endef
  77. export BUILD_CC="$(TARGET_CC)"
  78. CONFIGURE_ARGS += \
  79. --enable-shared \
  80. --enable-static \
  81. --with-randomdev="/dev/urandom" \
  82. --disable-threads \
  83. --disable-linux-caps \
  84. --with-openssl="$(STAGING_DIR)/usr" \
  85. --with-libtool \
  86. --with-libxml2=no \
  87. --enable-epoll=yes \
  88. --with-gost=no \
  89. --with-gssapi=no \
  90. --with-ecdsa=$(if $(CONFIG_OPENSSL_WITH_EC),yes,no) \
  91. --with-readline=no
  92. ifdef CONFIG_BIND_ENABLE_FILTER_AAAA
  93. CONFIGURE_ARGS += \
  94. --enable-filter-aaaa
  95. endif
  96. CONFIGURE_VARS += \
  97. BUILD_CC="$(TARGET_CC)" \
  98. define Build/Compile
  99. $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
  100. BUILD_CC="$(HOSTCC)" \
  101. CC="$(HOSTCC)" \
  102. CFLAGS="-O2" \
  103. LIBS="" \
  104. gen
  105. $(call Build/Compile/Default)
  106. endef
  107. define Package/bind-libs/install
  108. $(INSTALL_DIR) $(1)/usr/lib
  109. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  110. endef
  111. define Package/bind-server/install
  112. $(INSTALL_DIR) $(1)/usr/sbin
  113. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
  114. $(INSTALL_DIR) $(1)/etc/bind
  115. $(CP) \
  116. ./files/bind/db.0 \
  117. ./files/bind/db.127 \
  118. ./files/bind/db.255 \
  119. ./files/bind/db.local \
  120. ./files/bind/db.root \
  121. $(1)/etc/bind/
  122. $(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf
  123. $(INSTALL_DIR) $(1)/etc/init.d
  124. $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
  125. find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
  126. endef
  127. define Package/bind-server/conffiles
  128. /etc/bind/db.0
  129. /etc/bind/db.127
  130. /etc/bind/db.255
  131. /etc/bind/db.local
  132. /etc/bind/db.root
  133. /etc/bind/named.conf
  134. endef
  135. define Package/bind-client/install
  136. $(INSTALL_DIR) $(1)/usr/bin
  137. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
  138. endef
  139. define Package/bind-tools/install
  140. $(INSTALL_DIR) $(1)/usr/bin
  141. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  142. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  143. $(INSTALL_DIR) $(1)/usr/sbin
  144. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  146. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  147. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  148. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
  149. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
  150. endef
  151. define Package/bind-rndc/install
  152. $(INSTALL_DIR) $(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-check/install
  157. $(INSTALL_DIR) $(1)/usr/sbin
  158. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  159. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  160. endef
  161. define Package/bind-dnssec/install
  162. $(INSTALL_DIR) $(1)/usr/sbin
  163. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  164. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  165. endef
  166. define Package/bind-host/install
  167. $(INSTALL_DIR) $(1)/usr/bin
  168. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  169. endef
  170. define Package/bind-dig/install
  171. $(INSTALL_DIR) $(1)/usr/bin
  172. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  173. endef
  174. $(eval $(call BuildPackage,bind-libs))
  175. $(eval $(call BuildPackage,bind-server))
  176. $(eval $(call BuildPackage,bind-client))
  177. $(eval $(call BuildPackage,bind-tools))
  178. $(eval $(call BuildPackage,bind-rndc))
  179. $(eval $(call BuildPackage,bind-check))
  180. $(eval $(call BuildPackage,bind-dnssec))
  181. $(eval $(call BuildPackage,bind-host))
  182. $(eval $(call BuildPackage,bind-dig))