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.

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