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.

199 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.8.2
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=BSD-3-Clause
  12. PKG_LICENSE_FILES:=LICENSE
  13. PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=http://www.unbound.net/downloads
  16. PKG_HASH:=19f2235a8936d89e7dc919bbfcef355de759f220e36bb5e1e931ac000ed04993
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/unbound/Default
  22. TITLE:=Validating Recursive DNS Server
  23. URL:=http://www.unbound.net/
  24. DEPENDS:=+libopenssl
  25. endef
  26. define Package/unbound
  27. $(call Package/unbound/Default)
  28. SECTION:=net
  29. CATEGORY:=Network
  30. SUBMENU:=IP Addresses and Names
  31. USERID:=unbound:unbound
  32. TITLE+= (daemon)
  33. DEPENDS+= +libunbound
  34. endef
  35. define Package/unbound/description
  36. This package contains the Unbound daemon.
  37. endef
  38. define Package/unbound-anchor
  39. $(call Package/unbound/Default)
  40. SECTION:=net
  41. CATEGORY:=Network
  42. SUBMENU:=IP Addresses and Names
  43. TITLE+= (DSKEY utility)
  44. DEPENDS+= +unbound +libexpat
  45. endef
  46. define Package/unbound-anchor/description
  47. This package contains the Unbound anchor utility.
  48. endef
  49. define Package/unbound-control
  50. $(call Package/unbound/Default)
  51. SECTION:=net
  52. CATEGORY:=Network
  53. SUBMENU:=IP Addresses and Names
  54. TITLE+= (control utility)
  55. DEPENDS+= +unbound
  56. endef
  57. define Package/unbound-control/description
  58. This package contains the Unbound control utility.
  59. endef
  60. define Package/unbound-control-setup
  61. $(call Package/unbound/Default)
  62. SECTION:=net
  63. CATEGORY:=Network
  64. SUBMENU:=IP Addresses and Names
  65. TITLE+= (control setup)
  66. DEPENDS+= +unbound-control +openssl-util
  67. endef
  68. define Package/unbound-control-setup/description
  69. This package contains the Unbound control setup utility.
  70. endef
  71. define Package/unbound-host
  72. $(call Package/unbound/Default)
  73. SECTION:=net
  74. CATEGORY:=Network
  75. SUBMENU:=IP Addresses and Names
  76. TITLE+= (lookup utility)
  77. DEPENDS+= +libunbound
  78. endef
  79. define Package/unbound-host/description
  80. This package contains the Unbound DNS lookup utility.
  81. endef
  82. define Package/libunbound
  83. $(call Package/unbound/Default)
  84. SECTION:=libs
  85. CATEGORY:=Libraries
  86. TITLE+= (library)
  87. DEPENDS+= +libpthread
  88. endef
  89. define Package/libunbound/description
  90. This package contains the Unbound shared library.
  91. endef
  92. CONFIGURE_ARGS += \
  93. --disable-dsa \
  94. --disable-gost \
  95. --enable-allsymbols \
  96. --enable-tfo-client \
  97. --enable-tfo-server \
  98. --with-libexpat="$(STAGING_DIR)/usr" \
  99. --with-ssl="$(STAGING_DIR)/usr" \
  100. --with-user=unbound \
  101. --with-run-dir=/var/lib/unbound \
  102. --with-conf-file=/var/lib/unbound/unbound.conf \
  103. --with-pidfile=/var/run/unbound.pid
  104. define Package/unbound/conffiles
  105. /etc/config/unbound
  106. /etc/unbound/unbound.conf
  107. /etc/unbound/unbound_ext.conf
  108. /etc/unbound/unbound_srv.conf
  109. endef
  110. define Build/InstallDev
  111. $(INSTALL_DIR) $(1)/usr/include
  112. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
  113. $(INSTALL_DIR) $(1)/usr/lib
  114. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
  115. endef
  116. define Package/unbound/install
  117. $(INSTALL_DIR) $(1)/usr/sbin
  118. $(INSTALL_BIN) \
  119. $(PKG_INSTALL_DIR)/usr/sbin/unbound \
  120. $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
  121. $(1)/usr/sbin/
  122. $(INSTALL_DIR) $(1)/etc/unbound
  123. $(INSTALL_DATA) \
  124. $(PKG_INSTALL_DIR)/var/lib/unbound/unbound.conf \
  125. $(1)/etc/unbound/unbound.conf
  126. $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
  127. $(INSTALL_DATA) ./files/unbound_ext.conf $(1)/etc/unbound/unbound_ext.conf
  128. $(INSTALL_DATA) ./files/unbound_srv.conf $(1)/etc/unbound/unbound_srv.conf
  129. $(INSTALL_DIR) $(1)/etc/config
  130. $(INSTALL_DATA) ./files/unbound.uci $(1)/etc/config/unbound
  131. $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp
  132. $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound
  133. $(INSTALL_DIR) $(1)/etc/init.d
  134. $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
  135. $(INSTALL_DIR) $(1)/usr/lib/unbound
  136. $(INSTALL_DATA) ./files/defaults.sh $(1)/usr/lib/unbound/defaults.sh
  137. $(INSTALL_DATA) ./files/dnsmasq.sh $(1)/usr/lib/unbound/dnsmasq.sh
  138. $(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh
  139. $(INSTALL_BIN) ./files/odhcpd.sh $(1)/usr/lib/unbound/odhcpd.sh
  140. $(INSTALL_DATA) ./files/odhcpd.awk $(1)/usr/lib/unbound/odhcpd.awk
  141. $(INSTALL_DATA) ./files/stopping.sh $(1)/usr/lib/unbound/stopping.sh
  142. $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
  143. endef
  144. define Package/unbound-anchor/install
  145. $(INSTALL_DIR) $(1)/usr/sbin
  146. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
  147. endef
  148. define Package/unbound-control/install
  149. $(INSTALL_DIR) $(1)/usr/sbin
  150. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
  151. endef
  152. define Package/unbound-control-setup/install
  153. $(INSTALL_DIR) $(1)/usr/sbin
  154. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
  155. endef
  156. define Package/unbound-host/install
  157. $(INSTALL_DIR) $(1)/usr/sbin
  158. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
  159. endef
  160. define Package/libunbound/install
  161. $(INSTALL_DIR) $(1)/usr/lib
  162. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
  163. endef
  164. $(eval $(call BuildPackage,unbound))
  165. $(eval $(call BuildPackage,unbound-anchor))
  166. $(eval $(call BuildPackage,unbound-control))
  167. $(eval $(call BuildPackage,unbound-control-setup))
  168. $(eval $(call BuildPackage,unbound-host))
  169. $(eval $(call BuildPackage,libunbound))