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.

190 lines
5.1 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:=4
  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/config/unbound
  103. /etc/unbound/unbound.conf
  104. endef
  105. define Build/InstallDev
  106. $(INSTALL_DIR) $(1)/usr/include
  107. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
  108. $(INSTALL_DIR) $(1)/usr/lib
  109. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
  110. endef
  111. define Package/unbound/install
  112. $(INSTALL_DIR) $(1)/usr/sbin
  113. $(INSTALL_BIN) \
  114. $(PKG_INSTALL_DIR)/usr/sbin/unbound \
  115. $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
  116. $(1)/usr/sbin/
  117. $(INSTALL_DIR) $(1)/etc/unbound
  118. $(INSTALL_DATA) \
  119. $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
  120. $(1)/etc/unbound/unbound.conf
  121. $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
  122. $(INSTALL_DIR) $(1)/etc/config
  123. $(INSTALL_DATA) ./files/unbound.uci $(1)/etc/config/unbound
  124. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  125. $(INSTALL_BIN) ./files/unbound.iface $(1)/etc/hotplug.d/iface/25-unbound
  126. $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp
  127. $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound
  128. $(INSTALL_DIR) $(1)/etc/init.d
  129. $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
  130. $(INSTALL_DIR) $(1)/usr/lib/unbound
  131. $(INSTALL_DATA) ./files/dnsmasq.sh $(1)/usr/lib/unbound/dnsmasq.sh
  132. $(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh
  133. $(INSTALL_DATA) ./files/rootzone.sh $(1)/usr/lib/unbound/rootzone.sh
  134. $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
  135. endef
  136. define Package/unbound-anchor/install
  137. $(INSTALL_DIR) $(1)/usr/sbin
  138. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
  139. endef
  140. define Package/unbound-control/install
  141. $(INSTALL_DIR) $(1)/usr/sbin
  142. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
  143. endef
  144. define Package/unbound-control-setup/install
  145. $(INSTALL_DIR) $(1)/usr/sbin
  146. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
  147. endef
  148. define Package/unbound-host/install
  149. $(INSTALL_DIR) $(1)/usr/sbin
  150. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
  151. endef
  152. define Package/libunbound/install
  153. $(INSTALL_DIR) $(1)/usr/lib
  154. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
  155. endef
  156. $(eval $(call BuildPackage,unbound))
  157. $(eval $(call BuildPackage,unbound-anchor))
  158. $(eval $(call BuildPackage,unbound-control))
  159. $(eval $(call BuildPackage,unbound-control-setup))
  160. $(eval $(call BuildPackage,unbound-host))
  161. $(eval $(call BuildPackage,libunbound))