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
:=26a90d28ad694029e480fadcdf60b6219e8128a02d3dd594f6c1a83d002890fd
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
44 define Package
/bind
/Default
47 DEPENDS
:=+bind-libs
+@OPENSSL_WITH_EC
49 URL
:=https
://www.isc.org
/software
/bind
50 SUBMENU
:=IP Addresses and Names
53 define Package
/bind-libs
56 DEPENDS
:=+libopenssl \
62 +BIND_LIBXML2
:libxml2 \
63 +BIND_LIBJSON
:libjson-c
64 TITLE
:=bind shared libraries
65 URL
:=https
://www.isc.org
/software
/bind
68 define Package
/bind-server
69 $(call Package
/bind
/Default
)
73 define Package
/bind-server
/config
74 source
"$(SOURCE)/Config.in"
77 define Package
/bind-server-filter-aaaa
78 $(call Package
/bind-server
)
80 TITLE
+= filter AAAA plugin
83 define Package
/bind-client
84 $(call Package
/bind
/Default
)
85 TITLE
+= dynamic DNS client
88 define Package
/bind-tools
89 $(call Package
/bind
/Default
)
90 TITLE
+= administration tools
(all)
100 define Package
/bind-rndc
101 $(call Package
/bind
/Default
)
102 TITLE
+= administration tools
(rndc and rndc-confgen only
)
105 define Package
/bind-check
106 $(call Package
/bind
/Default
)
107 TITLE
+= administration tools
(named-checkconf and named-checkzone only
)
110 define Package
/bind-dnssec
111 $(call Package
/bind
/Default
)
112 TITLE
+= administration tools
(dnssec-keygen
, dnssec-settime and dnssec-signzone only
)
115 define Package
/bind-host
116 $(call Package
/bind
/Default
)
117 TITLE
+= simple DNS client
120 define Package
/bind-dig
121 $(call Package
/bind
/Default
)
122 TITLE
+= DNS excavation tool
125 define Package
/bind-nslookup
126 $(call Package
/bind
/Default
)
127 TITLE
+= nslookup utility
129 200:/usr
/bin
/nslookup
:/usr
/libexec
/nslookup-bind
132 export BUILD_CC
="$(TARGET_CC)"
134 TARGET_LDFLAGS
+= -Wl
,--gc-sections
,--as-needed
137 --disable-linux-caps \
138 --with-openssl
="$(STAGING_DIR)/usr" \
145 --sysconfdir
=/etc
/bind
147 ifdef CONFIG_BIND_LIBJSON
148 TARGET_CFLAGS
+= -DHAVE_JSON_C
-UHAVE_JSON
156 ifdef CONFIG_BIND_LIBXML2
165 BUILD_CC
="$(TARGET_CC)" \
168 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lib
/dns \
169 BUILD_CC
="$(HOSTCC)" \
174 $(call Build
/Compile
/Default
)
177 define Package
/bind-libs
/install
178 $(INSTALL_DIR
) $(1)/usr
/lib
179 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* $(1)/usr
/lib
182 define Package
/bind-server
/install
183 $(INSTALL_DIR
) $(1)/usr
/sbin
184 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/named
$(1)/usr
/sbin
/
185 $(INSTALL_DIR
) $(1)/etc
/bind
188 .
/files
/bind
/db
.127 \
189 .
/files
/bind
/db
.255 \
190 .
/files
/bind
/db.local \
191 .
/files
/bind
/db.root \
192 .
/files
/bind
/bind.keys \
194 sed
-e
'1s/ broadcast / empty rfc1918 /' \
195 < .
/files
/bind
/db
.0 \
196 > $(1)/etc
/bind
/db.empty
197 $(CP
) .
/files
/bind
/named.conf.example
$(1)/etc
/bind
/named.conf
198 $(INSTALL_DIR
) $(1)/etc
/init.d
199 $(INSTALL_BIN
) .
/files
/named.init
$(1)/etc
/init.d
/named
200 find
$(1)/etc
/bind
/ -name
".svn" | xargs
rm -rf
203 define Package
/bind-server
/conffiles
212 define Package
/bind-server-filter-aaaa
/install
213 $(INSTALL_DIR
) $(1)/usr
/lib
/bind
214 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/bind
/filter-aaaa.so
$(1)/usr
/lib
/bind
217 define Package
/bind-client
/install
218 $(INSTALL_DIR
) $(1)/usr
/bin
219 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nsupdate
$(1)/usr
/bin
/
222 define Package
/bind-tools
/install
223 $(INSTALL_DIR
) $(1)/usr
/bin
224 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/delv
$(1)/usr
/bin
/
227 define Package
/bind-rndc
/install
228 $(INSTALL_DIR
) $(1)/usr
/sbin
229 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rndc
$(1)/usr
/sbin
/
230 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rndc-confgen
$(1)/usr
/sbin
/
233 define Package
/bind-check
/install
234 $(INSTALL_DIR
) $(1)/usr
/bin
235 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/named-checkconf
$(1)/usr
/bin
/
236 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/named-checkzone
$(1)/usr
/bin
/
239 define Package
/bind-dnssec
/install
240 $(INSTALL_DIR
) $(1)/usr
/bin
241 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-keygen
$(1)/usr
/bin
/
242 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-settime
$(1)/usr
/bin
/
243 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-signzone
$(1)/usr
/bin
/
246 define Package
/bind-host
/install
247 $(INSTALL_DIR
) $(1)/usr
/bin
248 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/host
$(1)/usr
/bin
/
251 define Package
/bind-dig
/install
252 $(INSTALL_DIR
) $(1)/usr
/bin
253 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dig
$(1)/usr
/bin
/
256 define Package
/bind-nslookup
/install
257 $(INSTALL_DIR
) $(1)/usr
/libexec
258 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nslookup
$(1)/usr
/libexec
/nslookup-bind
261 $(eval
$(call BuildPackage
,bind-libs
))
262 $(eval
$(call BuildPackage
,bind-server
))
263 $(eval
$(call BuildPackage
,bind-server-filter-aaaa
))
264 $(eval
$(call BuildPackage
,bind-client
))
265 $(eval
$(call BuildPackage
,bind-tools
))
266 $(eval
$(call BuildPackage
,bind-rndc
))
267 $(eval
$(call BuildPackage
,bind-check
))
268 $(eval
$(call BuildPackage
,bind-dnssec
))
269 $(eval
$(call BuildPackage
,bind-host
))
270 $(eval
$(call BuildPackage
,bind-dig
))
271 $(eval
$(call BuildPackage
,bind-nslookup
))