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.

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