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.

197 lines
5.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.7.3
  10. PKG_RELEASE:=2
  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:=c11de115d928a6b48b2165e0214402a7a7da313cd479203a7ce7a8b62cba602d
  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=553:unbound=553
  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-pidfile=/var/run/unbound.pid \
  101. --with-user=unbound
  102. define Package/unbound/conffiles
  103. /etc/config/unbound
  104. /etc/unbound/unbound.conf
  105. /etc/unbound/unbound_ext.conf
  106. /etc/unbound/unbound_srv.conf
  107. endef
  108. define Build/InstallDev
  109. $(INSTALL_DIR) $(1)/usr/include
  110. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
  111. $(INSTALL_DIR) $(1)/usr/lib
  112. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
  113. endef
  114. define Package/unbound/install
  115. $(INSTALL_DIR) $(1)/usr/sbin
  116. $(INSTALL_BIN) \
  117. $(PKG_INSTALL_DIR)/usr/sbin/unbound \
  118. $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
  119. $(1)/usr/sbin/
  120. $(INSTALL_DIR) $(1)/etc/unbound
  121. $(INSTALL_DATA) \
  122. $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
  123. $(1)/etc/unbound/unbound.conf
  124. $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
  125. $(INSTALL_DATA) ./files/unbound_ext.conf $(1)/etc/unbound/unbound_ext.conf
  126. $(INSTALL_DATA) ./files/unbound_srv.conf $(1)/etc/unbound/unbound_srv.conf
  127. $(INSTALL_DIR) $(1)/etc/config
  128. $(INSTALL_DATA) ./files/unbound.uci $(1)/etc/config/unbound
  129. $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp
  130. $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound
  131. $(INSTALL_DIR) $(1)/etc/init.d
  132. $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
  133. $(INSTALL_DIR) $(1)/usr/lib/unbound
  134. $(INSTALL_DATA) ./files/defaults.sh $(1)/usr/lib/unbound/defaults.sh
  135. $(INSTALL_DATA) ./files/dnsmasq.sh $(1)/usr/lib/unbound/dnsmasq.sh
  136. $(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh
  137. $(INSTALL_BIN) ./files/odhcpd.sh $(1)/usr/lib/unbound/odhcpd.sh
  138. $(INSTALL_DATA) ./files/odhcpd.awk $(1)/usr/lib/unbound/odhcpd.awk
  139. $(INSTALL_DATA) ./files/rootzone.sh $(1)/usr/lib/unbound/rootzone.sh
  140. $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
  141. endef
  142. define Package/unbound-anchor/install
  143. $(INSTALL_DIR) $(1)/usr/sbin
  144. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
  145. endef
  146. define Package/unbound-control/install
  147. $(INSTALL_DIR) $(1)/usr/sbin
  148. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
  149. endef
  150. define Package/unbound-control-setup/install
  151. $(INSTALL_DIR) $(1)/usr/sbin
  152. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
  153. endef
  154. define Package/unbound-host/install
  155. $(INSTALL_DIR) $(1)/usr/sbin
  156. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
  157. endef
  158. define Package/libunbound/install
  159. $(INSTALL_DIR) $(1)/usr/lib
  160. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
  161. endef
  162. $(eval $(call BuildPackage,unbound))
  163. $(eval $(call BuildPackage,unbound-anchor))
  164. $(eval $(call BuildPackage,unbound-control))
  165. $(eval $(call BuildPackage,unbound-control-setup))
  166. $(eval $(call BuildPackage,unbound-host))
  167. $(eval $(call BuildPackage,libunbound))