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.

177 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:=3
  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. endef
  89. define Package/libunbound/description
  90. This package contains the Unbound shared library.
  91. endef
  92. CONFIGURE_ARGS += \
  93. --disable-gost \
  94. --enable-allsymbols \
  95. --with-libexpat="$(STAGING_DIR)/usr" \
  96. --with-ssl="$(STAGING_DIR)/usr" \
  97. --with-pidfile=/var/run/unbound.pid \
  98. --with-user=unbound \
  99. --without-pthreads
  100. define Package/unbound/conffiles
  101. /etc/unbound/unbound.conf
  102. endef
  103. define Build/InstallDev
  104. $(INSTALL_DIR) $(1)/usr/include
  105. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
  106. $(INSTALL_DIR) $(1)/usr/lib
  107. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
  108. endef
  109. define Package/unbound/install
  110. $(INSTALL_DIR) $(1)/usr/sbin
  111. $(INSTALL_BIN) \
  112. $(PKG_INSTALL_DIR)/usr/sbin/unbound \
  113. $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
  114. $(1)/usr/sbin/
  115. $(INSTALL_DIR) $(1)/etc/unbound
  116. $(INSTALL_CONF) \
  117. $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
  118. $(1)/etc/unbound/
  119. $(INSTALL_CONF) ./files/root.key $(1)/etc/unbound/
  120. $(INSTALL_DIR) $(1)/etc/init.d
  121. $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
  122. endef
  123. define Package/unbound-anchor/install
  124. $(INSTALL_DIR) $(1)/usr/sbin
  125. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
  126. endef
  127. define Package/unbound-control/install
  128. $(INSTALL_DIR) $(1)/usr/sbin
  129. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
  130. endef
  131. define Package/unbound-control-setup/install
  132. $(INSTALL_DIR) $(1)/usr/sbin
  133. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
  134. endef
  135. define Package/unbound-host/install
  136. $(INSTALL_DIR) $(1)/usr/sbin
  137. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
  138. endef
  139. define Package/libunbound/install
  140. $(INSTALL_DIR) $(1)/usr/lib
  141. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
  142. endef
  143. $(eval $(call BuildPackage,unbound))
  144. $(eval $(call BuildPackage,unbound-anchor))
  145. $(eval $(call BuildPackage,unbound-control))
  146. $(eval $(call BuildPackage,unbound-control-setup))
  147. $(eval $(call BuildPackage,unbound-host))
  148. $(eval $(call BuildPackage,libunbound))