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.

178 lines
4.4 KiB

  1. #
  2. # Copyright (C) 2010-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=unbound
  9. PKG_VERSION:=1.5.9
  10. PKG_RELEASE:=4
  11. PKG_LICENSE:=BSD-3-Clause
  12. PKG_LICENSE_FILES:=LICENSE
  13. PKG_MAINTAINER:=Michael Hanselmann <public@hansmi.ch>
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=http://www.unbound.net/downloads
  16. PKG_MD5SUM:=0cefa62c1690b4db18583db84bff00e3
  17. PKG_BUILD_DEPENDS:=libexpat
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/unbound/Default
  23. TITLE:=A validating, recursive & caching DNS resolver
  24. URL:=http://www.unbound.net/
  25. DEPENDS:=+libopenssl
  26. endef
  27. define Package/unbound
  28. $(call Package/unbound/Default)
  29. SECTION:=net
  30. CATEGORY:=Network
  31. SUBMENU:=IP Addresses and Names
  32. TITLE+= (daemon)
  33. DEPENDS+= +libunbound
  34. USERID:=unbound:unbound
  35. endef
  36. define Package/unbound/description
  37. This package contains the Unbound daemon.
  38. endef
  39. define Package/unbound-anchor
  40. $(call Package/unbound/Default)
  41. SECTION:=net
  42. CATEGORY:=Network
  43. SUBMENU:=IP Addresses and Names
  44. TITLE+= (anchor utility)
  45. DEPENDS+= +unbound +libexpat
  46. endef
  47. define Package/unbound-anchor/description
  48. This package contains the Unbound anchor utility.
  49. endef
  50. define Package/unbound-control
  51. $(call Package/unbound/Default)
  52. SECTION:=net
  53. CATEGORY:=Network
  54. SUBMENU:=IP Addresses and Names
  55. TITLE+= (control utility)
  56. DEPENDS+= +unbound
  57. endef
  58. define Package/unbound-control/description
  59. This package contains the Unbound control utility.
  60. endef
  61. define Package/unbound-control-setup
  62. $(call Package/unbound/Default)
  63. SECTION:=net
  64. CATEGORY:=Network
  65. SUBMENU:=IP Addresses and Names
  66. TITLE+= (control setup utility)
  67. DEPENDS+= +unbound-control +openssl-util
  68. endef
  69. define Package/unbound-control-setup/description
  70. This package contains the Unbound control setup utility.
  71. endef
  72. define Package/unbound-host
  73. $(call Package/unbound/Default)
  74. SECTION:=net
  75. CATEGORY:=Network
  76. SUBMENU:=IP Addresses and Names
  77. TITLE+= (DNS lookup utility)
  78. DEPENDS+= +libunbound
  79. endef
  80. define Package/unbound-host/description
  81. This package contains the Unbound DNS lookup utility.
  82. endef
  83. define Package/libunbound
  84. $(call Package/unbound/Default)
  85. SECTION:=libs
  86. CATEGORY:=Libraries
  87. TITLE+= (library)
  88. DEPENDS+= +libpthread
  89. endef
  90. define Package/libunbound/description
  91. This package contains the Unbound shared library.
  92. endef
  93. CONFIGURE_ARGS += \
  94. --disable-dsa \
  95. --disable-gost \
  96. --enable-allsymbols \
  97. --with-libexpat="$(STAGING_DIR)/usr" \
  98. --with-ssl="$(STAGING_DIR)/usr" \
  99. --with-pidfile=/var/run/unbound.pid \
  100. --with-user=unbound
  101. define Package/unbound/conffiles
  102. /etc/unbound/unbound.conf
  103. endef
  104. define Build/InstallDev
  105. $(INSTALL_DIR) $(1)/usr/include
  106. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
  107. $(INSTALL_DIR) $(1)/usr/lib
  108. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
  109. endef
  110. define Package/unbound/install
  111. $(INSTALL_DIR) $(1)/usr/sbin
  112. $(INSTALL_BIN) \
  113. $(PKG_INSTALL_DIR)/usr/sbin/unbound \
  114. $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
  115. $(1)/usr/sbin/
  116. $(INSTALL_DIR) $(1)/etc/unbound
  117. $(INSTALL_CONF) \
  118. $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
  119. $(1)/etc/unbound/
  120. $(INSTALL_CONF) ./files/root.key $(1)/etc/unbound/
  121. $(INSTALL_DIR) $(1)/etc/init.d
  122. $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
  123. endef
  124. define Package/unbound-anchor/install
  125. $(INSTALL_DIR) $(1)/usr/sbin
  126. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
  127. endef
  128. define Package/unbound-control/install
  129. $(INSTALL_DIR) $(1)/usr/sbin
  130. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
  131. endef
  132. define Package/unbound-control-setup/install
  133. $(INSTALL_DIR) $(1)/usr/sbin
  134. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
  135. endef
  136. define Package/unbound-host/install
  137. $(INSTALL_DIR) $(1)/usr/sbin
  138. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
  139. endef
  140. define Package/libunbound/install
  141. $(INSTALL_DIR) $(1)/usr/lib
  142. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
  143. endef
  144. $(eval $(call BuildPackage,unbound))
  145. $(eval $(call BuildPackage,unbound-anchor))
  146. $(eval $(call BuildPackage,unbound-control))
  147. $(eval $(call BuildPackage,unbound-control-setup))
  148. $(eval $(call BuildPackage,unbound-host))
  149. $(eval $(call BuildPackage,libunbound))