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
13 PKG_RELEASE
:=$(AUTORELEASE
)
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
:=bf485ac49715d43fa65c2c6e33271aab965bcd1b461fe2ac9f439754a210e6c7
28 PKG_REMOVE_FILES
:=aclocal.m4 libtool.m4
34 PKG_BUILD_DEPENDS
:=nghttp2
36 PKG_CONFIG_DEPENDS
:= \
40 PKG_BUILD_DEPENDS
+= BIND_LIBXML2
:libxml2 BIND_LIBJSON
:libjson-c
42 include $(INCLUDE_DIR
)/package.mk
43 include $(INCLUDE_DIR
)/nls.mk
45 define Package
/bind
/Default
48 DEPENDS
:=+bind-libs
+@OPENSSL_WITH_EC
50 URL
:=https
://www.isc.org
/software
/bind
51 SUBMENU
:=IP Addresses and Names
54 define Package
/bind-libs
57 DEPENDS
:=+libopenssl \
63 +BIND_LIBXML2
:libxml2 \
64 +BIND_LIBJSON
:libjson-c
65 TITLE
:=bind shared libraries
66 URL
:=https
://www.isc.org
/software
/bind
69 define Package
/bind-server
70 $(call Package
/bind
/Default
)
74 define Package
/bind-server
/config
75 source
"$(SOURCE)/Config.in"
78 define Package
/bind-server-filter-aaaa
79 $(call Package
/bind-server
)
81 TITLE
+= filter AAAA plugin
84 define Package
/bind-client
85 $(call Package
/bind
/Default
)
86 TITLE
+= dynamic DNS client
89 define Package
/bind-tools
90 $(call Package
/bind
/Default
)
91 TITLE
+= administration tools
(all)
101 define Package
/bind-rndc
102 $(call Package
/bind
/Default
)
103 TITLE
+= administration tools
(rndc and rndc-confgen only
)
106 define Package
/bind-check
107 $(call Package
/bind
/Default
)
108 TITLE
+= administration tools
(named-checkconf and named-checkzone only
)
111 define Package
/bind-dnssec
112 $(call Package
/bind
/Default
)
113 TITLE
+= administration tools
(dnssec-keygen
, dnssec-settime and dnssec-signzone only
)
116 define Package
/bind-host
117 $(call Package
/bind
/Default
)
118 TITLE
+= simple DNS client
121 define Package
/bind-dig
122 $(call Package
/bind
/Default
)
123 TITLE
+= DNS excavation tool
126 define Package
/bind-nslookup
127 $(call Package
/bind
/Default
)
128 TITLE
+= nslookup utility
130 200:/usr
/bin
/nslookup
:/usr
/libexec
/nslookup-bind
133 export BUILD_CC
="$(TARGET_CC)"
135 TARGET_LDFLAGS
+= -Wl
,--gc-sections
,--as-needed
138 --disable-linux-caps \
139 --with-openssl
="$(STAGING_DIR)/usr" \
146 --sysconfdir
=/etc
/bind
148 ifdef CONFIG_BIND_LIBJSON
149 TARGET_CFLAGS
+= -DHAVE_JSON_C
-UHAVE_JSON
157 ifdef CONFIG_BIND_LIBXML2
166 BUILD_CC
="$(TARGET_CC)" \
169 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lib
/dns \
170 BUILD_CC
="$(HOSTCC)" \
175 $(call Build
/Compile
/Default
)
178 define Package
/bind-libs
/install
179 $(INSTALL_DIR
) $(1)/usr
/lib
180 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* $(1)/usr
/lib
183 define Package
/bind-server
/install
184 $(INSTALL_DIR
) $(1)/usr
/sbin
185 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/named
$(1)/usr
/sbin
/
186 $(INSTALL_DIR
) $(1)/etc
/bind
189 .
/files
/bind
/db
.127 \
190 .
/files
/bind
/db
.255 \
191 .
/files
/bind
/db.local \
192 .
/files
/bind
/db.root \
193 .
/files
/bind
/bind.keys \
195 sed
-e
'1s/ broadcast / empty rfc1918 /' \
196 < .
/files
/bind
/db
.0 \
197 > $(1)/etc
/bind
/db.empty
198 $(CP
) .
/files
/bind
/named.conf.example
$(1)/etc
/bind
/named.conf
199 $(INSTALL_DIR
) $(1)/etc
/init.d
200 $(INSTALL_BIN
) .
/files
/named.init
$(1)/etc
/init.d
/named
201 find
$(1)/etc
/bind
/ -name
".svn" | xargs
rm -rf
204 define Package
/bind-server
/conffiles
213 define Package
/bind-server-filter-aaaa
/install
214 $(INSTALL_DIR
) $(1)/usr
/lib
/bind
215 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/bind
/filter-aaaa.so
$(1)/usr
/lib
/bind
218 define Package
/bind-client
/install
219 $(INSTALL_DIR
) $(1)/usr
/bin
220 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nsupdate
$(1)/usr
/bin
/
223 define Package
/bind-tools
/install
224 $(INSTALL_DIR
) $(1)/usr
/bin
225 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/delv
$(1)/usr
/bin
/
228 define Package
/bind-rndc
/install
229 $(INSTALL_DIR
) $(1)/usr
/sbin
230 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rndc
$(1)/usr
/sbin
/
231 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rndc-confgen
$(1)/usr
/sbin
/
234 define Package
/bind-check
/install
235 $(INSTALL_DIR
) $(1)/usr
/bin
236 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/named-checkconf
$(1)/usr
/bin
/
237 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/named-checkzone
$(1)/usr
/bin
/
240 define Package
/bind-dnssec
/install
241 $(INSTALL_DIR
) $(1)/usr
/bin
242 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-keygen
$(1)/usr
/bin
/
243 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-settime
$(1)/usr
/bin
/
244 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-signzone
$(1)/usr
/bin
/
247 define Package
/bind-host
/install
248 $(INSTALL_DIR
) $(1)/usr
/bin
249 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/host
$(1)/usr
/bin
/
252 define Package
/bind-dig
/install
253 $(INSTALL_DIR
) $(1)/usr
/bin
254 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dig
$(1)/usr
/bin
/
257 define Package
/bind-nslookup
/install
258 $(INSTALL_DIR
) $(1)/usr
/libexec
259 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nslookup
$(1)/usr
/libexec
/nslookup-bind
262 $(eval
$(call BuildPackage
,bind-libs
))
263 $(eval
$(call BuildPackage
,bind-server
))
264 $(eval
$(call BuildPackage
,bind-server-filter-aaaa
))
265 $(eval
$(call BuildPackage
,bind-client
))
266 $(eval
$(call BuildPackage
,bind-tools
))
267 $(eval
$(call BuildPackage
,bind-rndc
))
268 $(eval
$(call BuildPackage
,bind-check
))
269 $(eval
$(call BuildPackage
,bind-dnssec
))
270 $(eval
$(call BuildPackage
,bind-host
))
271 $(eval
$(call BuildPackage
,bind-dig
))
272 $(eval
$(call BuildPackage
,bind-nslookup
))