Makefile 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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.6.8
  10. PKG_RELEASE:=3
  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:=e3b428e33f56a45417107448418865fe08d58e0e7fea199b855515f60884dd49
  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_BIN) ./files/odhcpd.sh $(1)/usr/lib/unbound/odhcpd.sh
  133. $(INSTALL_DATA) ./files/odhcpd.awk $(1)/usr/lib/unbound/odhcpd.awk
  134. $(INSTALL_DATA) ./files/dnsmasq.sh $(1)/usr/lib/unbound/dnsmasq.sh
  135. $(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh
  136. $(INSTALL_DATA) ./files/rootzone.sh $(1)/usr/lib/unbound/rootzone.sh
  137. $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
  138. endef
  139. define Package/unbound-anchor/install
  140. $(INSTALL_DIR) $(1)/usr/sbin
  141. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
  142. endef
  143. define Package/unbound-control/install
  144. $(INSTALL_DIR) $(1)/usr/sbin
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
  146. endef
  147. define Package/unbound-control-setup/install
  148. $(INSTALL_DIR) $(1)/usr/sbin
  149. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
  150. endef
  151. define Package/unbound-host/install
  152. $(INSTALL_DIR) $(1)/usr/sbin
  153. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
  154. endef
  155. define Package/libunbound/install
  156. $(INSTALL_DIR) $(1)/usr/lib
  157. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
  158. endef
  159. $(eval $(call BuildPackage,unbound))
  160. $(eval $(call BuildPackage,unbound-anchor))
  161. $(eval $(call BuildPackage,unbound-control))
  162. $(eval $(call BuildPackage,unbound-control-setup))
  163. $(eval $(call BuildPackage,unbound-host))
  164. $(eval $(call BuildPackage,libunbound))