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.

206 lines
5.3 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.7-P3
  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:=022a8aca9ca51e1027d77094094eecfd
  20. PKG_FIXUP:=autoreconf
  21. PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
  22. PKG_INSTALL:=1
  23. PKG_CONFIG_DEPENDS := CONFIG_OPENSSL_WITH_EC
  24. include $(INCLUDE_DIR)/package.mk
  25. define Package/bind/Default
  26. SECTION:=net
  27. CATEGORY:=Network
  28. DEPENDS:=+bind-libs
  29. TITLE:=bind
  30. URL:=https://www.isc.org/software/bind
  31. SUBMENU:=IP Addresses and Names
  32. endef
  33. define Package/bind-libs
  34. SECTION:=libs
  35. CATEGORY:=Libraries
  36. DEPENDS:=+libopenssl
  37. TITLE:=bind shared libraries
  38. URL:=https://www.isc.org/software/bind
  39. endef
  40. define Package/bind-server
  41. $(call Package/bind/Default)
  42. TITLE+= DNS server
  43. endef
  44. define Package/bind-client
  45. $(call Package/bind/Default)
  46. TITLE+= dynamic DNS client
  47. endef
  48. define Package/bind-tools
  49. $(call Package/bind/Default)
  50. TITLE+= administration tools (all)
  51. endef
  52. define Package/bind-rndc
  53. $(call Package/bind/Default)
  54. TITLE+= administration tools (rndc and rndc-confgen only)
  55. endef
  56. define Package/bind-check
  57. $(call Package/bind/Default)
  58. TITLE+= administration tools (named-checkconf and named-checkzone only)
  59. endef
  60. define Package/bind-dnssec
  61. $(call Package/bind/Default)
  62. TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
  63. endef
  64. define Package/bind-host
  65. $(call Package/bind/Default)
  66. TITLE+= simple DNS client
  67. endef
  68. define Package/bind-dig
  69. $(call Package/bind/Default)
  70. TITLE+= DNS excavation tool
  71. endef
  72. export BUILD_CC="$(TARGET_CC)"
  73. CONFIGURE_ARGS += \
  74. --enable-shared \
  75. --enable-static \
  76. --with-randomdev="/dev/urandom" \
  77. --disable-threads \
  78. --disable-linux-caps \
  79. --with-openssl="$(STAGING_DIR)/usr" \
  80. --with-libtool \
  81. --with-libxml2=no \
  82. --enable-epoll=yes \
  83. --with-gost=no \
  84. --with-gssapi=no \
  85. --with-ecdsa=$(if $(CONFIG_OPENSSL_WITH_EC),yes,no) \
  86. --with-readline=no
  87. CONFIGURE_VARS += \
  88. BUILD_CC="$(TARGET_CC)" \
  89. define Build/Compile
  90. $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
  91. BUILD_CC="$(HOSTCC)" \
  92. CC="$(HOSTCC)" \
  93. CFLAGS="-O2" \
  94. LIBS="" \
  95. gen
  96. $(call Build/Compile/Default)
  97. endef
  98. define Package/bind-libs/install
  99. $(INSTALL_DIR) $(1)/usr/lib
  100. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  101. endef
  102. define Package/bind-server/install
  103. $(INSTALL_DIR) $(1)/usr/sbin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
  105. $(INSTALL_DIR) $(1)/etc/bind
  106. $(CP) \
  107. ./files/bind/db.0 \
  108. ./files/bind/db.127 \
  109. ./files/bind/db.255 \
  110. ./files/bind/db.local \
  111. ./files/bind/db.root \
  112. $(1)/etc/bind/
  113. $(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf
  114. $(INSTALL_DIR) $(1)/etc/init.d
  115. $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
  116. find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
  117. endef
  118. define Package/bind-server/conffiles
  119. /etc/bind/db.0
  120. /etc/bind/db.127
  121. /etc/bind/db.255
  122. /etc/bind/db.local
  123. /etc/bind/db.root
  124. /etc/bind/named.conf
  125. endef
  126. define Package/bind-client/install
  127. $(INSTALL_DIR) $(1)/usr/bin
  128. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
  129. endef
  130. define Package/bind-tools/install
  131. $(INSTALL_DIR) $(1)/usr/bin
  132. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  133. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  134. $(INSTALL_DIR) $(1)/usr/sbin
  135. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  136. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  137. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  138. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  139. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
  140. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
  141. endef
  142. define Package/bind-rndc/install
  143. $(INSTALL_DIR) $(1)/usr/sbin
  144. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
  146. endef
  147. define Package/bind-check/install
  148. $(INSTALL_DIR) $(1)/usr/sbin
  149. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
  150. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
  151. endef
  152. define Package/bind-dnssec/install
  153. $(INSTALL_DIR) $(1)/usr/sbin
  154. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
  155. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
  156. endef
  157. define Package/bind-host/install
  158. $(INSTALL_DIR) $(1)/usr/bin
  159. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
  160. endef
  161. define Package/bind-dig/install
  162. $(INSTALL_DIR) $(1)/usr/bin
  163. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
  164. endef
  165. $(eval $(call BuildPackage,bind-libs))
  166. $(eval $(call BuildPackage,bind-server))
  167. $(eval $(call BuildPackage,bind-client))
  168. $(eval $(call BuildPackage,bind-tools))
  169. $(eval $(call BuildPackage,bind-rndc))
  170. $(eval $(call BuildPackage,bind-check))
  171. $(eval $(call BuildPackage,bind-dnssec))
  172. $(eval $(call BuildPackage,bind-host))
  173. $(eval $(call BuildPackage,bind-dig))