Makefile 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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.1
  10. PKG_RELEASE:=6
  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:=42df63f743c0fe8424aeafcf003ad4b880b46c14149d696057313f5c1ef51400
  17. PKG_BUILD_DEPENDS:=libexpat
  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:=http://www.unbound.net/
  25. DEPENDS:=+libopenssl
  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=553:unbound=553
  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. --with-libexpat="$(STAGING_DIR)/usr" \
  98. --with-ssl="$(STAGING_DIR)/usr" \
  99. --with-pidfile=/var/run/unbound.pid \
  100. --with-user=unbound
  101. define Package/unbound/conffiles
  102. /etc/config/unbound
  103. /etc/unbound/unbound.conf
  104. /etc/unbound/unbound_ext.conf
  105. /etc/unbound/unbound_srv.conf
  106. endef
  107. define Build/InstallDev
  108. $(INSTALL_DIR) $(1)/usr/include
  109. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
  110. $(INSTALL_DIR) $(1)/usr/lib
  111. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
  112. endef
  113. define Package/unbound/install
  114. $(INSTALL_DIR) $(1)/usr/sbin
  115. $(INSTALL_BIN) \
  116. $(PKG_INSTALL_DIR)/usr/sbin/unbound \
  117. $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
  118. $(1)/usr/sbin/
  119. $(INSTALL_DIR) $(1)/etc/unbound
  120. $(INSTALL_DATA) \
  121. $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
  122. $(1)/etc/unbound/unbound.conf
  123. $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
  124. $(INSTALL_DATA) ./files/unbound_ext.conf $(1)/etc/unbound/unbound_ext.conf
  125. $(INSTALL_DATA) ./files/unbound_srv.conf $(1)/etc/unbound/unbound_srv.conf
  126. $(INSTALL_DIR) $(1)/etc/config
  127. $(INSTALL_DATA) ./files/unbound.uci $(1)/etc/config/unbound
  128. $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp
  129. $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound
  130. $(INSTALL_DIR) $(1)/etc/init.d
  131. $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
  132. $(INSTALL_DIR) $(1)/usr/lib/unbound
  133. $(INSTALL_BIN) ./files/odhcpd.sh $(1)/usr/lib/unbound/odhcpd.sh
  134. $(INSTALL_DATA) ./files/odhcpd.awk $(1)/usr/lib/unbound/odhcpd.awk
  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_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))