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.

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