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.

201 lines
5.5 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.9.1
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.unbound.net/downloads
  13. PKG_HASH:=c3c0bf9b86ccba4ca64f93dd4fe7351308ab54293f297a67de5a8914c1dc59c5
  14. PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_CPE_ID:=cpe:/a:nlnetlabs:unbound
  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:=Validating Recursive DNS Server
  24. URL:=https://www.unbound.net/
  25. DEPENDS:=+libopenssl +@OPENSSL_WITH_EC
  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:unbound
  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+= (DSKEY 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)
  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+= (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. --enable-ecdsa \
  98. --enable-tfo-client \
  99. --enable-tfo-server \
  100. --with-libexpat="$(STAGING_DIR)/usr" \
  101. --with-ssl="$(STAGING_DIR)/usr" \
  102. --with-user=unbound \
  103. --with-run-dir=/var/lib/unbound \
  104. --with-conf-file=/var/lib/unbound/unbound.conf \
  105. --with-pidfile=/var/run/unbound.pid
  106. define Package/unbound/conffiles
  107. /etc/config/unbound
  108. /etc/unbound/unbound.conf
  109. /etc/unbound/unbound_ext.conf
  110. /etc/unbound/unbound_srv.conf
  111. endef
  112. define Build/InstallDev
  113. $(INSTALL_DIR) $(1)/usr/include
  114. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
  115. $(INSTALL_DIR) $(1)/usr/lib
  116. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
  117. endef
  118. define Package/unbound/install
  119. $(INSTALL_DIR) $(1)/usr/sbin
  120. $(INSTALL_BIN) \
  121. $(PKG_INSTALL_DIR)/usr/sbin/unbound \
  122. $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
  123. $(1)/usr/sbin/
  124. $(INSTALL_DIR) $(1)/etc/unbound
  125. $(INSTALL_DATA) \
  126. $(PKG_INSTALL_DIR)/var/lib/unbound/unbound.conf \
  127. $(1)/etc/unbound/unbound.conf
  128. $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
  129. $(INSTALL_DATA) ./files/unbound_ext.conf $(1)/etc/unbound/unbound_ext.conf
  130. $(INSTALL_DATA) ./files/unbound_srv.conf $(1)/etc/unbound/unbound_srv.conf
  131. $(INSTALL_DIR) $(1)/etc/config
  132. $(INSTALL_DATA) ./files/unbound.uci $(1)/etc/config/unbound
  133. $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp
  134. $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound
  135. $(INSTALL_DIR) $(1)/etc/init.d
  136. $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
  137. $(INSTALL_DIR) $(1)/usr/lib/unbound
  138. $(INSTALL_DATA) ./files/defaults.sh $(1)/usr/lib/unbound/defaults.sh
  139. $(INSTALL_DATA) ./files/dnsmasq.sh $(1)/usr/lib/unbound/dnsmasq.sh
  140. $(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh
  141. $(INSTALL_BIN) ./files/odhcpd.sh $(1)/usr/lib/unbound/odhcpd.sh
  142. $(INSTALL_DATA) ./files/odhcpd.awk $(1)/usr/lib/unbound/odhcpd.awk
  143. $(INSTALL_DATA) ./files/stopping.sh $(1)/usr/lib/unbound/stopping.sh
  144. $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
  145. endef
  146. define Package/unbound-anchor/install
  147. $(INSTALL_DIR) $(1)/usr/sbin
  148. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
  149. endef
  150. define Package/unbound-control/install
  151. $(INSTALL_DIR) $(1)/usr/sbin
  152. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
  153. endef
  154. define Package/unbound-control-setup/install
  155. $(INSTALL_DIR) $(1)/usr/sbin
  156. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
  157. endef
  158. define Package/unbound-host/install
  159. $(INSTALL_DIR) $(1)/usr/sbin
  160. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
  161. endef
  162. define Package/libunbound/install
  163. $(INSTALL_DIR) $(1)/usr/lib
  164. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
  165. endef
  166. $(eval $(call BuildPackage,unbound))
  167. $(eval $(call BuildPackage,unbound-anchor))
  168. $(eval $(call BuildPackage,unbound-control))
  169. $(eval $(call BuildPackage,unbound-control-setup))
  170. $(eval $(call BuildPackage,unbound-host))
  171. $(eval $(call BuildPackage,libunbound))