2 # Copyright (C) 2010-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.unbound.net/downloads
16 PKG_MD5SUM:=cd69fdaaa6af01ea0b6fbc59802f74ba
18 PKG_BUILD_DEPENDS:=libexpat
23 include $(INCLUDE_DIR)/package.mk
25 define Package/unbound/Default
26 TITLE:=A validating, recursive & caching DNS resolver
27 URL:=http://www.unbound.net/
31 define Package/unbound
32 $(call Package/unbound/Default)
35 SUBMENU:=IP Addresses and Names
40 define Package/unbound/description
41 This package contains the Unbound daemon.
44 define Package/unbound-anchor
45 $(call Package/unbound/Default)
48 SUBMENU:=IP Addresses and Names
49 TITLE+= (anchor utility)
50 DEPENDS+= +unbound +libexpat
53 define Package/unbound-anchor/description
54 This package contains the Unbound anchor utility.
57 define Package/unbound-control
58 $(call Package/unbound/Default)
61 SUBMENU:=IP Addresses and Names
62 TITLE+= (control utility)
66 define Package/unbound-control/description
67 This package contains the Unbound control utility.
70 define Package/unbound-control-setup
71 $(call Package/unbound/Default)
74 SUBMENU:=IP Addresses and Names
75 TITLE+= (control setup utility)
76 DEPENDS+= +unbound-control +openssl-util
79 define Package/unbound-control-setup/description
80 This package contains the Unbound control setup utility.
83 define Package/unbound-host
84 $(call Package/unbound/Default)
87 SUBMENU:=IP Addresses and Names
88 TITLE+= (DNS lookup utility)
92 define Package/unbound-host/description
93 This package contains the Unbound DNS lookup utility.
96 define Package/libunbound
97 $(call Package/unbound/Default)
103 define Package/libunbound/description
104 This package contains the Unbound shared library.
109 --enable-allsymbols \
110 --with-ldns="$(STAGING_DIR)/usr" \
111 --with-libexpat="$(STAGING_DIR)/usr" \
112 --with-ssl="$(STAGING_DIR)/usr" \
115 define Package/unbound/conffiles
116 /etc/unbound/unbound.conf
119 define Build/InstallDev
120 $(INSTALL_DIR) $(1)/usr/include
121 $(CP) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
122 $(INSTALL_DIR) $(1)/usr/lib
123 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
126 define Package/unbound/install
127 $(INSTALL_DIR) $(1)/usr/sbin
129 $(PKG_INSTALL_DIR)/usr/sbin/unbound \
130 $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
132 $(INSTALL_DIR) $(1)/etc/unbound
134 $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
136 $(INSTALL_CONF) ./files/root.key $(1)/etc/unbound/
137 $(INSTALL_CONF) ./files/named.cache $(1)/etc/unbound/
138 $(INSTALL_DIR) $(1)/etc/init.d
139 $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
142 define Package/unbound-anchor/install
143 $(INSTALL_DIR) $(1)/usr/sbin
144 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
147 define Package/unbound-control/install
148 $(INSTALL_DIR) $(1)/usr/sbin
149 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
152 define Package/unbound-control-setup/install
153 $(INSTALL_DIR) $(1)/usr/sbin
154 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
157 define Package/unbound-host/install
158 $(INSTALL_DIR) $(1)/usr/sbin
159 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
162 define Package/libunbound/install
163 $(INSTALL_DIR) $(1)/usr/lib
164 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
167 $(eval $(call BuildPackage,unbound))
168 $(eval $(call BuildPackage,unbound-anchor))
169 $(eval $(call BuildPackage,unbound-control))
170 $(eval $(call BuildPackage,unbound-control-setup))
171 $(eval $(call BuildPackage,unbound-host))
172 $(eval $(call BuildPackage,libunbound))