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
12 PKG_RELEASE
:=$(AUTORELEASE
)
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://nlnetlabs.nl
/downloads
/unbound
16 PKG_HASH
:=ea0c6665e2c3325b769eac1dfccd60fe1828d5fcf662650039eccb3f67edb28e
18 PKG_MAINTAINER
:=Eric Luehrsen
<ericluehrsen@gmail.com
>
19 PKG_LICENSE
:=BSD-3-Clause
20 PKG_LICENSE_FILES
:=LICENSE
21 PKG_CPE_ID
:=cpe
:/a
:nlnetlabs
:unbound
27 PKG_CONFIG_DEPENDS
:=CONFIG_PACKAGE_libunbound_dnscrypt \
28 CONFIG_PACKAGE_libunbound_ipset \
29 CONFIG_PACKAGE_libunbound_libevent \
30 CONFIG_PACKAGE_libunbound_libpthread \
31 CONFIG_PACKAGE_libunbound_nghttp2 \
32 CONFIG_PACKAGE_libunbound_pythonmodule \
33 CONFIG_PACKAGE_libunbound_subnet \
34 CONFIG_PACKAGE_libunbound_dnstap
36 include $(INCLUDE_DIR
)/package.mk
38 define Package
/unbound
/Default
41 SUBMENU
:=IP Addresses and Names
42 USERID
:=unbound
:unbound
43 TITLE
:=Recursive DNS Server
44 URL
:=https
://nlnetlabs.nl
/projects
/unbound
/about
45 DEPENDS
:=+ca-bundle
+libopenssl
+@OPENSSL_WITH_EC
48 define Package
/unbound-daemon
49 $(call Package
/unbound
/Default
)
54 define Package
/unbound-daemon
/description
55 This package contains the Unbound daemon including
'libevent', 'libmnl', and
56 'libpthread' to better handle large networks with heavy query loads. Options
57 are available under libraries
/network
/libunbound to custom trim Unbound for
61 define Package
/libunbound
62 $(call Package
/unbound
/Default
)
67 DEPENDS
+=+PACKAGE_libunbound_dnscrypt
:libsodium \
68 +PACKAGE_libunbound_ipset
:libmnl \
69 +PACKAGE_libunbound_libevent
:libevent2 \
70 +PACKAGE_libunbound_libpthread
:libpthread \
71 +PACKAGE_libunbound_nghttp2
:libnghttp2 \
72 +PACKAGE_libunbound_pythonmodule
:python3-base \
73 +PACKAGE_libunbound_dnstap
:libprotobuf-c
76 define Package
/libunbound
/description
77 This package contains the Unbound library including
'libevent', 'libmnl', and
78 'libpthread' to better handle large networks with heavy query loads. Options
79 are available to custom trim Unbound for smaller targets.
82 define Package
/unbound-anchor
83 $(call Package
/unbound
/Default
)
85 DEPENDS
+= +unbound-daemon
+libexpat
88 define Package
/unbound-anchor
/description
89 This package contains the Unbound anchor utility.
92 define Package
/unbound-checkconf
93 $(call Package
/unbound
/Default
)
94 TITLE
+= (config checker
)
95 DEPENDS
+= +unbound-daemon
98 define Package
/unbound-checkconf
/description
99 This package contains the Unbound DNS configuration checker utility.
102 define Package
/unbound-control
103 $(call Package
/unbound
/Default
)
104 TITLE
+= (remote control
)
105 DEPENDS
+= +unbound-daemon
108 define Package
/unbound-control
/description
109 This package contains the Unbound control utility.
112 define Package
/unbound-control-setup
113 $(call Package
/unbound
/Default
)
114 TITLE
+= (control setup
)
115 DEPENDS
+= +unbound-control
+openssl-util
118 define Package
/unbound-control-setup
/description
119 This package contains the Unbound control setup utility.
122 define Package
/unbound-host
123 $(call Package
/unbound
/Default
)
125 DEPENDS
+= +libunbound
128 define Package
/unbound-host
/description
129 This package contains the Unbound DNS lookup utility.
132 define Package
/libunbound
/config
133 if PACKAGE_libunbound
134 config PACKAGE_libunbound_dnscrypt
135 bool
"Build with DNSCRYPT support."
137 config PACKAGE_libunbound_ipset
138 bool
"Build with IPSET (libmnl) support."
140 config PACKAGE_libunbound_libevent
141 bool
"Build with expanded network resource (libevent) support."
143 config PACKAGE_libunbound_libpthread
144 bool
"Build with POSIX threading (libpthread) support."
146 config PACKAGE_libunbound_nghttp2
147 bool
"Build with DNS over HTTPS support (nghttp2 framework)."
149 config PACKAGE_libunbound_pythonmodule
150 bool
"Build with PYTHON module for prototyping and data analysis."
152 config PACKAGE_libunbound_subnet
153 bool
"Build with SUBNET cache module support."
155 config PACKAGE_libunbound_dnstap
156 bool
"Build with dnstap support."
161 CONFIGURE_VARS
+= UNAME
=Linux
166 --enable-allsymbols \
168 --enable-tfo-client \
169 --enable-tfo-server \
170 --with-libexpat
="$(STAGING_DIR)/usr" \
171 --with-ssl
="$(STAGING_DIR)/usr" \
172 --with-user
=unbound \
173 --with-run-dir
=/var
/lib
/unbound \
174 --with-conf-file
=/var
/lib
/unbound
/unbound.conf \
175 --with-pidfile
=/var
/run
/unbound.pid \
176 $(if
$(CONFIG_PACKAGE_libunbound_dnscrypt
), \
177 --enable-dnscrypt
--with-libsodium
="$(STAGING_DIR)/usr",) \
178 $(if
$(CONFIG_PACKAGE_libunbound_ipset
), \
179 --enable-ipset
--with-libmnl
="$(STAGING_DIR)/usr",) \
180 $(if
$(CONFIG_PACKAGE_libunbound_libevent
), \
181 --enable-event-api
--with-libevent
="$(STAGING_DIR)/usr",--without-libevent
) \
182 $(if
$(CONFIG_PACKAGE_libunbound_nghttp2
), \
183 --with-libnghttp2
="$(STAGING_DIR)/usr",) \
184 $(if
$(CONFIG_PACKAGE_libunbound_libpthread
), \
185 --with-pthreads
,--without-pthreads
--without-solaris-threads
) \
186 $(if
$(CONFIG_PACKAGE_libunbound_python
),--with-pythonmodule
,) \
187 $(if
$(CONFIG_PACKAGE_libunbound_subnet
),--enable-subnet
,) \
188 $(if
$(CONFIG_PACKAGE_libunbound_dnstap
),--enable-dnstap
,) \
190 define Package
/unbound-daemon
/conffiles
192 /etc
/unbound
/unbound.conf
193 /etc
/unbound
/unbound_ext.conf
194 /etc
/unbound
/unbound_srv.conf
197 define Build
/InstallDev
198 $(INSTALL_DIR
) $(1)/usr
/lib
199 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libunbound.
{so
*,a
,la
} $(1)/usr
/lib
/
200 $(INSTALL_DIR
) $(1)/usr
/include
201 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/unbound.h
$(1)/usr
/include/
202 ifneq ($(CONFIG_PACKAGE_libunbound_libevent
),)
203 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/unbound-event.h
$(1)/usr
/include/
207 define Package
/unbound-daemon
/install
208 $(INSTALL_DIR
) $(1)/usr
/sbin
210 $(PKG_INSTALL_DIR
)/usr
/sbin
/unbound
$(1)/usr
/sbin
/
211 $(INSTALL_DIR
) $(1)/etc
/unbound
213 $(PKG_INSTALL_DIR
)/var
/lib
/unbound
/unbound.conf \
214 $(1)/etc
/unbound
/unbound.conf
215 $(INSTALL_DATA
) .
/files
/root.key
$(1)/etc
/unbound
/root.key
216 $(INSTALL_CONF
) .
/files
/unbound_ext.conf
$(1)/etc
/unbound
/unbound_ext.conf
217 $(INSTALL_CONF
) .
/files
/unbound_srv.conf
$(1)/etc
/unbound
/unbound_srv.conf
218 $(INSTALL_DIR
) $(1)/etc
/config
219 $(INSTALL_CONF
) .
/files
/unbound.uci
$(1)/etc
/config
/unbound
220 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/ntp
221 $(INSTALL_BIN
) .
/files
/unbound.ntpd
$(1)/etc
/hotplug.d
/ntp
/25-unbound
222 $(INSTALL_DIR
) $(1)/etc
/init.d
223 $(INSTALL_BIN
) .
/files
/unbound.init
$(1)/etc
/init.d
/unbound
224 $(INSTALL_DIR
) $(1)/usr
/lib
/unbound
225 $(INSTALL_DATA
) .
/files
/defaults.sh
$(1)/usr
/lib
/unbound
/defaults.sh
226 $(INSTALL_DATA
) .
/files
/dnsmasq.sh
$(1)/usr
/lib
/unbound
/dnsmasq.sh
227 $(INSTALL_DATA
) .
/files
/iptools.sh
$(1)/usr
/lib
/unbound
/iptools.sh
228 $(INSTALL_BIN
) .
/files
/odhcpd.sh
$(1)/usr
/lib
/unbound
/odhcpd.sh
229 $(INSTALL_DATA
) .
/files
/odhcpd.awk
$(1)/usr
/lib
/unbound
/odhcpd.awk
230 $(INSTALL_DATA
) .
/files
/stopping.sh
$(1)/usr
/lib
/unbound
/stopping.sh
231 $(INSTALL_DATA
) .
/files
/unbound.sh
$(1)/usr
/lib
/unbound
/unbound.sh
234 define Package
/libunbound
/install
235 $(INSTALL_DIR
) $(1)/usr
/lib
236 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libunbound.so.
* $(1)/usr
/lib
/
239 define Package
/unbound-anchor
/install
240 $(INSTALL_DIR
) $(1)/usr
/sbin
241 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/unbound-anchor
$(1)/usr
/sbin
/
244 define Package
/unbound-checkconf
/install
245 $(INSTALL_DIR
) $(1)/usr
/sbin
246 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/unbound-checkconf
$(1)/usr
/sbin
/
249 define Package
/unbound-control
/install
250 $(INSTALL_DIR
) $(1)/usr
/sbin
251 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/unbound-control
$(1)/usr
/sbin
/
254 define Package
/unbound-control-setup
/install
255 $(INSTALL_DIR
) $(1)/usr
/sbin
256 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/unbound-control-setup
$(1)/usr
/sbin
/
259 define Package
/unbound-host
/install
260 $(INSTALL_DIR
) $(1)/usr
/sbin
261 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/unbound-host
$(1)/usr
/sbin
/
264 $(eval
$(call BuildPackage
,unbound-daemon
))
265 $(eval
$(call BuildPackage
,libunbound
))
266 $(eval
$(call BuildPackage
,unbound-anchor
))
267 $(eval
$(call BuildPackage
,unbound-checkconf
))
268 $(eval
$(call BuildPackage
,unbound-control
))
269 $(eval
$(call BuildPackage
,unbound-control-setup
))
270 $(eval
$(call BuildPackage
,unbound-host
))