2 # Copyright (C) 2010-2016 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_LICENSE:=BSD-3-Clause
15 PKG_LICENSE_FILES:=LICENSE
16 PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_SOURCE_URL:=http://www.unbound.net/downloads
20 PKG_HASH:=c11de115d928a6b48b2165e0214402a7a7da313cd479203a7ce7a8b62cba602d
26 include $(INCLUDE_DIR)/package.mk
28 define Package/unbound/Default
29 TITLE:=Validating Recursive DNS Server
30 URL:=http://www.unbound.net/
34 define Package/unbound
35 $(call Package/unbound/Default)
38 SUBMENU:=IP Addresses and Names
39 USERID:=unbound:unbound
44 define Package/unbound/description
45 This package contains the Unbound daemon.
48 define Package/unbound-anchor
49 $(call Package/unbound/Default)
52 SUBMENU:=IP Addresses and Names
53 TITLE+= (DSKEY utility)
54 DEPENDS+= +unbound +libexpat
57 define Package/unbound-anchor/description
58 This package contains the Unbound anchor utility.
61 define Package/unbound-control
62 $(call Package/unbound/Default)
65 SUBMENU:=IP Addresses and Names
66 TITLE+= (control utility)
70 define Package/unbound-control/description
71 This package contains the Unbound control utility.
74 define Package/unbound-control-setup
75 $(call Package/unbound/Default)
78 SUBMENU:=IP Addresses and Names
79 TITLE+= (control setup)
80 DEPENDS+= +unbound-control +openssl-util
83 define Package/unbound-control-setup/description
84 This package contains the Unbound control setup utility.
87 define Package/unbound-host
88 $(call Package/unbound/Default)
91 SUBMENU:=IP Addresses and Names
92 TITLE+= (lookup utility)
96 define Package/unbound-host/description
97 This package contains the Unbound DNS lookup utility.
100 define Package/libunbound
101 $(call Package/unbound/Default)
105 DEPENDS+= +libpthread
108 define Package/libunbound/description
109 This package contains the Unbound shared library.
115 --enable-allsymbols \
116 --enable-tfo-client \
117 --enable-tfo-server \
118 --with-libexpat="$(STAGING_DIR)/usr" \
119 --with-ssl="$(STAGING_DIR)/usr" \
120 --with-user=unbound \
121 --with-run-dir=/var/lib/unbound \
122 --with-conf-file=/var/lib/unbound/unbound.conf \
123 --with-pidfile=/var/run/unbound.pid
125 define Package/unbound/conffiles
127 /etc/unbound/unbound.conf
128 /etc/unbound/unbound_ext.conf
129 /etc/unbound/unbound_srv.conf
132 define Build/InstallDev
133 $(INSTALL_DIR) $(1)/usr/include
134 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
135 $(INSTALL_DIR) $(1)/usr/lib
136 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
139 define Package/unbound/install
140 $(INSTALL_DIR) $(1)/usr/sbin
142 $(PKG_INSTALL_DIR)/usr/sbin/unbound \
143 $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
145 $(INSTALL_DIR) $(1)/etc/unbound
147 $(PKG_INSTALL_DIR)/var/lib/unbound/unbound.conf \
148 $(1)/etc/unbound/unbound.conf
149 $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
150 $(INSTALL_DATA) ./files/unbound_ext.conf $(1)/etc/unbound/unbound_ext.conf
151 $(INSTALL_DATA) ./files/unbound_srv.conf $(1)/etc/unbound/unbound_srv.conf
152 $(INSTALL_DIR) $(1)/etc/config
153 $(INSTALL_DATA) ./files/unbound.uci $(1)/etc/config/unbound
154 $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp
155 $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound
156 $(INSTALL_DIR) $(1)/etc/init.d
157 $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
158 $(INSTALL_DIR) $(1)/usr/lib/unbound
159 $(INSTALL_DATA) ./files/defaults.sh $(1)/usr/lib/unbound/defaults.sh
160 $(INSTALL_DATA) ./files/dnsmasq.sh $(1)/usr/lib/unbound/dnsmasq.sh
161 $(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh
162 $(INSTALL_BIN) ./files/odhcpd.sh $(1)/usr/lib/unbound/odhcpd.sh
163 $(INSTALL_DATA) ./files/odhcpd.awk $(1)/usr/lib/unbound/odhcpd.awk
164 $(INSTALL_DATA) ./files/stopping.sh $(1)/usr/lib/unbound/stopping.sh
165 $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
168 define Package/unbound-anchor/install
169 $(INSTALL_DIR) $(1)/usr/sbin
170 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
173 define Package/unbound-control/install
174 $(INSTALL_DIR) $(1)/usr/sbin
175 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
178 define Package/unbound-control-setup/install
179 $(INSTALL_DIR) $(1)/usr/sbin
180 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
183 define Package/unbound-host/install
184 $(INSTALL_DIR) $(1)/usr/sbin
185 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
188 define Package/libunbound/install
189 $(INSTALL_DIR) $(1)/usr/lib
190 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
193 $(eval $(call BuildPackage,unbound))
194 $(eval $(call BuildPackage,unbound-anchor))
195 $(eval $(call BuildPackage,unbound-control))
196 $(eval $(call BuildPackage,unbound-control-setup))
197 $(eval $(call BuildPackage,unbound-host))
198 $(eval $(call BuildPackage,libunbound))