2 # Copyright (C) 2006-2012 OpenWrt.org
3 # 2014-2020 Noah Meyerhans <frodo@morgul.net>
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
14 USERID
:=bind
=57:bind
=57
16 PKG_MAINTAINER
:=Noah Meyerhans
<frodo@morgul.net
>
18 PKG_LICENSE_FILES
:=LICENSE
19 PKG_CPE_ID
:=cpe
:/a
:isc
:bind
21 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
23 https
://www.mirrorservice.org
/sites
/ftp.isc.org
/isc
/bind9
/$(PKG_VERSION
) \
24 https
://ftp.isc.org
/isc
/bind9
/$(PKG_VERSION
)
25 PKG_HASH
:=d735cdc127a6c5709bde475b5bf16fa2133f36fdba202f7c3c37d134e5192160
28 PKG_REMOVE_FILES
:=aclocal.m4 libtool.m4
31 PKG_BUILD_FLAGS
:=no-mips16
34 PKG_CONFIG_DEPENDS
:= \
37 CONFIG_BIND_ENABLE_DOH \
38 CONFIG_BIND_ENABLE_GSSAPI
40 PKG_BUILD_DEPENDS
+= BIND_LIBXML2
:libxml2 BIND_LIBJSON
:libjson-c
42 include $(INCLUDE_DIR
)/package.mk
43 include $(INCLUDE_DIR
)/nls.mk
47 define Package
/bind
/Default
50 DEPENDS
:=+bind-libs
+@OPENSSL_WITH_EC
52 URL
:=https
://www.isc.org
/software
/bind
53 SUBMENU
:=IP Addresses and Names
56 define Package
/bind-libs
59 DEPENDS
:=+libopenssl \
64 +BIND_ENABLE_DOH
:libnghttp2 \
65 +BIND_ENABLE_GSSAPI
:krb5-libs \
66 +BIND_ENABLE_GSSAPI
:libcomerr \
67 +BIND_LIBXML2
:libxml2 \
68 +BIND_LIBJSON
:libjson-c
69 TITLE
:=bind shared libraries
70 URL
:=https
://www.isc.org
/software
/bind
73 define Package
/bind-server
74 $(call Package
/bind
/Default
)
79 define Package
/bind-server
/config
80 source
"$(SOURCE)/Config.in"
83 define Package
/bind-server-filter-aaaa
84 $(call Package
/bind-server
)
86 TITLE
+= filter AAAA plugin
89 define Package
/bind-client
90 $(call Package
/bind
/Default
)
91 TITLE
+= dynamic DNS client
94 define Package
/bind-tools
95 $(call Package
/bind
/Default
)
96 TITLE
+= administration tools
(all)
107 define Package
/bind-rndc
108 $(call Package
/bind
/Default
)
109 TITLE
+= administration tools
(rndc and rndc-confgen only
)
112 define Package
/bind-check
113 $(call Package
/bind
/Default
)
114 TITLE
+= administration tools
(named-checkconf and named-checkzone only
)
117 define Package
/bind-dnssec
118 $(call Package
/bind
/Default
)
119 TITLE
+= administration tools
(dnssec-keygen
, dnssec-settime and dnssec-signzone only
)
122 define Package
/bind-host
123 $(call Package
/bind
/Default
)
124 TITLE
+= simple DNS client
127 define Package
/bind-dig
128 $(call Package
/bind
/Default
)
129 TITLE
+= DNS excavation tool
132 define Package
/bind-nslookup
133 $(call Package
/bind
/Default
)
134 TITLE
+= nslookup utility
136 200:/usr
/bin
/nslookup
:/usr
/libexec
/nslookup-bind
139 define Package
/bind-ddns-confgen
140 $(call Package
/bind
/Default
)
141 TITLE
+= administration tools
(ddns-confgen and tsig-keygen only
)
144 export BUILD_CC
="$(TARGET_CC)"
146 TARGET_LDFLAGS
+= -Wl
,--gc-sections
,--as-needed
150 --with-openssl
="$(STAGING_DIR)/usr" \
154 --sysconfdir
=/etc
/bind
156 ifdef CONFIG_BIND_LIBJSON
157 TARGET_CFLAGS
+= -DHAVE_JSON_C
-UHAVE_JSON
165 ifdef CONFIG_BIND_LIBXML2
173 ifdef CONFIG_BIND_ENABLE_DOH
181 ifdef CONFIG_BIND_ENABLE_GSSAPI
190 BUILD_CC
="$(TARGET_CC)" \
193 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lib
/dns \
194 BUILD_CC
="$(HOSTCC)" \
199 $(call Build
/Compile
/Default
)
202 define Package
/bind-libs
/install
203 $(INSTALL_DIR
) $(1)/usr
/lib
204 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* $(1)/usr
/lib
207 define Package
/bind-server
/install
208 $(INSTALL_DIR
) $(1)/usr
/sbin
209 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/named
$(1)/usr
/sbin
/
210 $(INSTALL_DIR
) $(1)/etc
/bind
213 .
/files
/bind
/db
.127 \
214 .
/files
/bind
/db
.255 \
215 .
/files
/bind
/db.local \
216 .
/files
/bind
/db.root \
217 .
/files
/bind
/bind.keys \
219 sed
-e
'1s/ broadcast / empty rfc1918 /' \
220 < .
/files
/bind
/db
.0 \
221 > $(1)/etc
/bind
/db.empty
222 $(CP
) .
/files
/bind
/named.conf.example
$(1)/etc
/bind
/named.conf
223 $(INSTALL_DIR
) $(1)/etc
/init.d
224 $(INSTALL_BIN
) .
/files
/named.init
$(1)/etc
/init.d
/named
225 find
$(1)/etc
/bind
/ -name
".svn" | xargs
rm -rf
228 define Package
/bind-server
/conffiles
237 define Package
/bind-server-filter-aaaa
/install
238 $(INSTALL_DIR
) $(1)/usr
/lib
/bind
239 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/bind
/filter-aaaa.so
$(1)/usr
/lib
/bind
242 define Package
/bind-client
/install
243 $(INSTALL_DIR
) $(1)/usr
/bin
244 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nsupdate
$(1)/usr
/bin
/
247 define Package
/bind-tools
/install
248 $(INSTALL_DIR
) $(1)/usr
/bin
249 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/delv
$(1)/usr
/bin
/
252 define Package
/bind-rndc
/install
253 $(INSTALL_DIR
) $(1)/usr
/sbin
254 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rndc
$(1)/usr
/sbin
/
255 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rndc-confgen
$(1)/usr
/sbin
/
258 define Package
/bind-check
/install
259 $(INSTALL_DIR
) $(1)/usr
/bin
260 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/named-checkconf
$(1)/usr
/bin
/
261 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/named-checkzone
$(1)/usr
/bin
/
264 define Package
/bind-dnssec
/install
265 $(INSTALL_DIR
) $(1)/usr
/bin
266 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-keygen
$(1)/usr
/bin
/
267 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-settime
$(1)/usr
/bin
/
268 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-signzone
$(1)/usr
/bin
/
271 define Package
/bind-host
/install
272 $(INSTALL_DIR
) $(1)/usr
/bin
273 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/host
$(1)/usr
/bin
/
276 define Package
/bind-dig
/install
277 $(INSTALL_DIR
) $(1)/usr
/bin
278 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dig
$(1)/usr
/bin
/
281 define Package
/bind-nslookup
/install
282 $(INSTALL_DIR
) $(1)/usr
/libexec
283 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nslookup
$(1)/usr
/libexec
/nslookup-bind
286 define Package
/bind-ddns-confgen
/install
287 $(INSTALL_DIR
) $(1)/usr
/sbin
288 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ddns-confgen
$(1)/usr
/sbin
/ddns-confgen
289 $(LN
) -s ddns-confgen
$(1)/usr
/sbin
/tsig-keygen
292 $(eval
$(call BuildPackage
,bind-libs
))
293 $(eval
$(call BuildPackage
,bind-server
))
294 $(eval
$(call BuildPackage
,bind-server-filter-aaaa
))
295 $(eval
$(call BuildPackage
,bind-client
))
296 $(eval
$(call BuildPackage
,bind-tools
))
297 $(eval
$(call BuildPackage
,bind-rndc
))
298 $(eval
$(call BuildPackage
,bind-check
))
299 $(eval
$(call BuildPackage
,bind-dnssec
))
300 $(eval
$(call BuildPackage
,bind-host
))
301 $(eval
$(call BuildPackage
,bind-dig
))
302 $(eval
$(call BuildPackage
,bind-nslookup
))
303 $(eval
$(call BuildPackage
,bind-ddns-confgen
))