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.

183 lines
4.7 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.10
  10. PKG_RELEASE:=3
  11. PKG_LICENSE:=BSD-3-Clause
  12. PKG_LICENSE_FILES:=LICENSE
  13. PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@hotmail.com>
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=http://www.unbound.net/downloads
  16. PKG_MD5SUM:=0a3a236811f1ab5c1dc31974fa74e047
  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:=Unbound is a validating, recursive, and 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. USERID:=unbound=553:unbound=553
  33. TITLE+= (daemon)
  34. DEPENDS+= +libunbound
  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_DATA) \
  118. $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
  119. $(1)/etc/unbound/unbound.conf
  120. $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
  121. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  122. $(INSTALL_BIN) ./files/unbound.iface $(1)/etc/hotplug.d/iface/25-unbound
  123. $(INSTALL_DIR) $(1)/etc/init.d
  124. $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
  125. $(INSTALL_DIR) $(1)/usr/lib/unbound
  126. $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
  127. $(INSTALL_DATA) ./files/rootzone.sh $(1)/usr/lib/unbound/rootzone.sh
  128. endef
  129. define Package/unbound-anchor/install
  130. $(INSTALL_DIR) $(1)/usr/sbin
  131. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
  132. endef
  133. define Package/unbound-control/install
  134. $(INSTALL_DIR) $(1)/usr/sbin
  135. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
  136. endef
  137. define Package/unbound-control-setup/install
  138. $(INSTALL_DIR) $(1)/usr/sbin
  139. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
  140. endef
  141. define Package/unbound-host/install
  142. $(INSTALL_DIR) $(1)/usr/sbin
  143. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
  144. endef
  145. define Package/libunbound/install
  146. $(INSTALL_DIR) $(1)/usr/lib
  147. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
  148. endef
  149. $(eval $(call BuildPackage,unbound))
  150. $(eval $(call BuildPackage,unbound-anchor))
  151. $(eval $(call BuildPackage,unbound-control))
  152. $(eval $(call BuildPackage,unbound-control-setup))
  153. $(eval $(call BuildPackage,unbound-host))
  154. $(eval $(call BuildPackage,libunbound))