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
:=075de055d1c3d8fede6a93cc890203670948e0f13310a21d4980cb5e378f7306
28 PKG_REMOVE_FILES
:=aclocal.m4 libtool.m4
34 PKG_CONFIG_DEPENDS
:= \
38 PKG_BUILD_DEPENDS
+= BIND_LIBXML2
:libxml2 BIND_LIBJSON
:libjson-c
40 include $(INCLUDE_DIR
)/package.mk
42 define Package
/bind
/Default
45 DEPENDS
:=+bind-libs
+@OPENSSL_WITH_EC
47 URL
:=https
://www.isc.org
/software
/bind
48 SUBMENU
:=IP Addresses and Names
51 define Package
/bind-libs
54 DEPENDS
:=+libopenssl
+zlib
+libpthread
+libatomic
+libuv \
55 +BIND_LIBXML2
:libxml2
+BIND_LIBJSON
:libjson-c
56 TITLE
:=bind shared libraries
57 URL
:=https
://www.isc.org
/software
/bind
60 define Package
/bind-server
61 $(call Package
/bind
/Default
)
65 define Package
/bind-server
/config
66 source
"$(SOURCE)/Config.in"
69 define Package
/bind-server-filter-aaaa
70 $(call Package
/bind-server
)
72 TITLE
+= filter AAAA plugin
75 define Package
/bind-client
76 $(call Package
/bind
/Default
)
77 TITLE
+= dynamic DNS client
80 define Package
/bind-tools
81 $(call Package
/bind
/Default
)
82 TITLE
+= administration tools
(all)
92 define Package
/bind-rndc
93 $(call Package
/bind
/Default
)
94 TITLE
+= administration tools
(rndc and rndc-confgen only
)
97 define Package
/bind-check
98 $(call Package
/bind
/Default
)
99 TITLE
+= administration tools
(named-checkconf and named-checkzone only
)
102 define Package
/bind-dnssec
103 $(call Package
/bind
/Default
)
104 TITLE
+= administration tools
(dnssec-keygen
, dnssec-settime and dnssec-signzone only
)
107 define Package
/bind-host
108 $(call Package
/bind
/Default
)
109 TITLE
+= simple DNS client
112 define Package
/bind-dig
113 $(call Package
/bind
/Default
)
114 TITLE
+= DNS excavation tool
117 define Package
/bind-nslookup
118 $(call Package
/bind
/Default
)
119 TITLE
+= nslookup utility
121 200:/usr
/bin
/nslookup
:/usr
/libexec
/nslookup-bind
124 export BUILD_CC
="$(TARGET_CC)"
126 TARGET_LDFLAGS
+= -Wl
,--gc-sections
,--as-needed
129 --disable-linux-caps \
130 --with-openssl
="$(STAGING_DIR)/usr" \
137 --sysconfdir
=/etc
/bind
139 ifdef CONFIG_BIND_LIBJSON
140 TARGET_CFLAGS
+= -DHAVE_JSON_C
-UHAVE_JSON
148 ifdef CONFIG_BIND_LIBXML2
157 BUILD_CC
="$(TARGET_CC)" \
160 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lib
/dns \
161 BUILD_CC
="$(HOSTCC)" \
166 $(call Build
/Compile
/Default
)
169 define Package
/bind-libs
/install
170 $(INSTALL_DIR
) $(1)/usr
/lib
171 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* $(1)/usr
/lib
174 define Package
/bind-server
/install
175 $(INSTALL_DIR
) $(1)/usr
/sbin
176 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/named
$(1)/usr
/sbin
/
177 $(INSTALL_DIR
) $(1)/etc
/bind
180 .
/files
/bind
/db
.127 \
181 .
/files
/bind
/db
.255 \
182 .
/files
/bind
/db.local \
183 .
/files
/bind
/db.root \
184 .
/files
/bind
/bind.keys \
186 sed
-e
'1s/ broadcast / empty rfc1918 /' \
187 < .
/files
/bind
/db
.0 \
188 > $(1)/etc
/bind
/db.empty
189 $(CP
) .
/files
/bind
/named.conf.example
$(1)/etc
/bind
/named.conf
190 $(INSTALL_DIR
) $(1)/etc
/init.d
191 $(INSTALL_BIN
) .
/files
/named.init
$(1)/etc
/init.d
/named
192 find
$(1)/etc
/bind
/ -name
".svn" | xargs
rm -rf
195 define Package
/bind-server
/conffiles
204 define Package
/bind-server-filter-aaaa
/install
205 $(INSTALL_DIR
) $(1)/usr
/lib
/bind
206 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/bind
/filter-aaaa.so
$(1)/usr
/lib
/bind
209 define Package
/bind-client
/install
210 $(INSTALL_DIR
) $(1)/usr
/bin
211 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nsupdate
$(1)/usr
/bin
/
214 define Package
/bind-tools
/install
215 $(INSTALL_DIR
) $(1)/usr
/bin
216 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/delv
$(1)/usr
/bin
/
219 define Package
/bind-rndc
/install
220 $(INSTALL_DIR
) $(1)/usr
/sbin
221 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rndc
$(1)/usr
/sbin
/
222 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rndc-confgen
$(1)/usr
/sbin
/
225 define Package
/bind-check
/install
226 $(INSTALL_DIR
) $(1)/usr
/bin
227 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/named-checkconf
$(1)/usr
/bin
/
228 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/named-checkzone
$(1)/usr
/bin
/
231 define Package
/bind-dnssec
/install
232 $(INSTALL_DIR
) $(1)/usr
/bin
233 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-keygen
$(1)/usr
/bin
/
234 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-settime
$(1)/usr
/bin
/
235 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnssec-signzone
$(1)/usr
/bin
/
238 define Package
/bind-host
/install
239 $(INSTALL_DIR
) $(1)/usr
/bin
240 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/host
$(1)/usr
/bin
/
243 define Package
/bind-dig
/install
244 $(INSTALL_DIR
) $(1)/usr
/bin
245 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dig
$(1)/usr
/bin
/
248 define Package
/bind-nslookup
/install
249 $(INSTALL_DIR
) $(1)/usr
/libexec
250 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nslookup
$(1)/usr
/libexec
/nslookup-bind
253 $(eval
$(call BuildPackage
,bind-libs
))
254 $(eval
$(call BuildPackage
,bind-server
))
255 $(eval
$(call BuildPackage
,bind-server-filter-aaaa
))
256 $(eval
$(call BuildPackage
,bind-client
))
257 $(eval
$(call BuildPackage
,bind-tools
))
258 $(eval
$(call BuildPackage
,bind-rndc
))
259 $(eval
$(call BuildPackage
,bind-check
))
260 $(eval
$(call BuildPackage
,bind-dnssec
))
261 $(eval
$(call BuildPackage
,bind-host
))
262 $(eval
$(call BuildPackage
,bind-dig
))
263 $(eval
$(call BuildPackage
,bind-nslookup
))