1 include $(TOPDIR
)/rules.mk
7 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
8 PKG_SOURCE_URL
:=https
://downloads.powerdns.com
/releases
/
9 PKG_HASH
:=3b173fda4c51bb07b5a51d8c599eedd7962a02056b410e3c9d9d69ed97be35b9
11 PKG_MAINTAINER
:=Peter van Dijk
<peter.van.dijk@powerdns.com
>
12 PKG_LICENCE
:=GPL-2.0
-only
13 PKG_LICENCE_FILES
:=COPYING
14 PKG_CPE_ID
:=cpe
:/a
:powerdns
:authoritative
22 PKG_BUILD_DEPENDS
:=unixodbc
/host protobuf-c
/host
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/pdns
/Default
29 SUBMENU
:=IP Addresses and Names
30 TITLE
:=PowerDNS Authoritative Server
32 URL
:=https
://www.powerdns.com
/auth.html
35 define Package
/pdns
/description
36 PowerDNS is a versatile nameserver which supports a large number
37 of different backends ranging from simple zonefiles to relational
38 databases and load balancing
/failover algorithms.
39 PowerDNS tries to emphasize speed and security.
41 This is the authoritative nameserver that answers questions about
42 domains that it knows about. You also need at least one backend installed to
48 define Package
/pdns-backends
49 $(call Package
/pdns
/Default
)
50 TITLE
+= (all backends
)
51 DEPENDS
+= $(PDNS_DEPENDS
)
55 define Package
/pdns-backends
/description
56 This meta package contains only dependencies for PowerDNS backends.
59 # Create a meta-package of dependent backends (for ALL)
60 define Package
/pdns-backends
/install
64 define Package
/pdns-tools
65 $(call Package
/pdns
/Default
)
66 TITLE
:=Tools for DNS debugging by PowerDNS
67 DEPENDS
+=+boost
+boost-program_options
+libcurl
+libmbedtls
+libopenssl
+p11-kit
+protobuf
70 define Package
/pdns-tools
/description
71 PowerDNS is a versatile nameserver which supports a large number
72 of different backends ranging from simple zonefiles to relational
73 databases and load balancing
/failover algorithms.
74 PowerDNS tries to emphasize speed and security.
76 This package contains several tools to debug DNS issues. These tools do not
77 require any part of the PowerDNS server components to work.
79 * dnsbulktest
: A resolver stress-tester
80 * dnsgram
: Show per
5-second statistics to study intermittent resolver issues
81 * dnsreplay
: Replay a pcap with DNS queries
82 * dnsscan
: Prints the query-type amounts in a pcap
83 * dnsscope
: Calculates statistics without replaying traffic
84 * dnstcpbench
: Perform TCP benchmarking of DNS servers
85 * dnswasher
: Clean a pcap of identifying IP information
86 * ixplore
: Explore diffs from IXFRs
87 * nsec3dig
: Calculate the correctness of NSEC3 proofs
88 * saxfr
: AXFR zones and show extra information
91 define Package
/pdns-ixfrdist
92 $(call Package
/pdns
/Default
)
93 TITLE
:=Redistribute zones via AXFR and IXFR
94 DEPENDS
+=+boost
+boost-program_options
+libopenssl
+libyaml-cpp
+p11-kit
+protobuf
97 define Package
/pdns-ixfrdist
/description
98 PowerDNS is a versatile nameserver which supports a large number
99 of different backends ranging from simple zonefiles to relational
100 databases and load balancing
/failover algorithms.
101 PowerDNS tries to emphasize speed and security.
103 This package contains the ixfrdist tool that can redistribute multiple versions
104 of zones over AXFR and IXFR. This tool does not require any part of the
105 PowerDNS server components to work.
109 $(call Package
/pdns
/Default
)
110 DEPENDS
+=+boost
+boost-program_options
+libcurl
+liblua
+libopenssl
+libsqlite3
+p11-kit
113 define Package
/pdns
/config
114 menu
"Select PowerDNS backends"
115 depends on PACKAGE_pdns
116 comment
"PowerDNS backends"
118 $(foreach backend
,$(PDNS_BACKENDS
), \
119 config PACKAGE_pdns-backend-
$(backend
)
120 prompt
"$(PDNS_BACKEND_$(backend)_DESC) backend"
128 # 2: dependencies on other PowerDNS libraries (short name)
129 # 3: dependencies on other packages
130 # 4: conditional/inward dependencies
131 # 5: friendly display name
132 define DefinePdnsBackend
133 PDNS_DEPENDS
+= +pdns-backend-
$(1)
134 PKG_CONFIG_DEPENDS
+= CONFIG_PACKAGE_pdns-backend
$(1)
138 PDNS_BACKEND_
$(1)_DESC
=$(if
$(5),$(5),$(1))
139 PDNS_BACKEND_
$(1)_LIB
=$(if
$(4),$(4),$(1))
141 define Package
/pdns-backend-
$(1)
142 $(call Package
/pdns
/Default
)
144 DEPENDS
+= pdns
$$(foreach backend
,$(2),+pdns-backend-
$$(backend
)) \
145 $$(foreach dependency
,$(3),+$$(dependency
))
149 define Package
/pdns-backend-
$(1)/description
150 PowerDNS is a versatile nameserver which supports a large number
151 of different backends ranging from simple zonefiles to relational
152 databases and load balancing
/failover algorithms.
153 PowerDNS tries to emphasize speed and security.
155 This package contains the
$(if
$(5),$(5),$(1)) backend for the PowerDNS nameserver.
159 $(eval
$(call DefinePdnsBackend
,geoip
,,libmaxminddb libyaml-cpp
,,GeoIP
))
160 $(eval
$(call DefinePdnsBackend
,mysql
,,libmysqlclient
,gmysql
,MySQL
))
161 $(eval
$(call DefinePdnsBackend
,odbc
,,unixodbc
,godbc
,ODBC
))
162 $(eval
$(call DefinePdnsBackend
,pgsql
,,libpq
,gpgsql
,PostgreSQL
))
163 $(eval
$(call DefinePdnsBackend
,sqlite3
,,libsqlite3
,gsqlite3
,SQLite
3))
164 $(eval
$(call DefinePdnsBackend
,ldap
,,libopenldap krb5-libs
,,OpenLDAP
))
165 $(eval
$(call DefinePdnsBackend
,lua2
,,lua liblua
,,Lua2
))
166 $(eval
$(call DefinePdnsBackend
,pipe
,,,,Pipe
))
167 $(eval
$(call DefinePdnsBackend
,remote
,,,,Remote
))
169 define Package
/pdns
/conffiles
170 /etc
/powerdns
/pdns.conf
174 TARGET_CXX
+=-std
=c
++17
177 --sysconfdir
=/etc
/powerdns \
178 --libdir=/usr
/lib
/powerdns \
179 --with-dynmodules
="$(foreach backend,$(PDNS_BACKENDS),$(if $(CONFIG_PACKAGE_pdns-backend-$(backend)),$(PDNS_BACKEND_$(backend)_LIB),))" \
181 --with-modules
="bind" \
182 --with-mysql-lib
=$(STAGING_DIR
)/usr \
183 --with-mysql-includes
=$(STAGING_DIR
)/usr \
184 $(if
$(CONFIG_PACKAGE_pdns-tools
),--enable-tools
,) \
186 --without-libsodium \
187 --enable-experimental-pkcs11 \
188 --enable-lua-records \
189 --enable-reproducible \
190 $(if
$(CONFIG_PACKAGE_pdns-ixfrdist
),--enable-ixfrdist
,)
192 define Package
/pdns
/install
193 $(INSTALL_DIR
) $(1)/etc
/powerdns
194 $(INSTALL_CONF
) .
/files
/pdns.conf-dist
$(1)/etc
/powerdns
/pdns.conf-dist
195 $(INSTALL_DIR
) $(1)/etc
/init.d
196 $(INSTALL_BIN
) .
/files
/pdns.init
$(1)/etc
/init.d
/pdns
197 $(INSTALL_DIR
) $(1)/usr
/bin
198 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/pdns_control
$(1)/usr
/bin
/
199 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/pdnsutil
$(1)/usr
/bin
/
200 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/zone2sql
$(1)/usr
/bin
/
201 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/zone2json
$(1)/usr
/bin
/
202 $(INSTALL_DIR
) $(1)/usr
/sbin
203 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/pdns_server
$(1)/usr
/sbin
/
206 define Package
/pdns
/Default
/install
207 $(INSTALL_DIR
) $(1)/usr
/lib
/powerdns
/pdns
208 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/powerdns
/pdns
/lib
$(PDNS_BACKEND_
$(2)_LIB
)backend.so
$(1)/usr
/lib
/powerdns
/pdns
/
209 if
[ "$(PDNS_BACKEND_$(2)_LIB)" == "ldap" ]; then \
210 $(INSTALL_DIR
) $(1)/usr
/bin
; \
211 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/zone2ldap
$(1)/usr
/bin
/; \
215 define Package
/pdns-ixfrdist
/install
216 $(INSTALL_DIR
) $(1)/etc
/powerdns
217 $(CP
) $(PKG_INSTALL_DIR
)/etc
/powerdns
/ixfrdist.example.yml
$(1)/etc
/powerdns
/
218 $(INSTALL_DIR
) $(1)/usr
/bin
219 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ixfrdist
$(1)/usr
/bin
/
222 define Package
/pdns-tools
/install
223 $(INSTALL_DIR
) $(1)/usr
/bin
224 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnsgram
$(1)/usr
/bin
/
225 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnsreplay
$(1)/usr
/bin
/
226 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnsscan
$(1)/usr
/bin
/
227 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnsscope
$(1)/usr
/bin
/
228 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnswasher
$(1)/usr
/bin
/
229 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dumresp
$(1)/usr
/bin
/
230 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/pdns_notify
$(1)/usr
/bin
/
231 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/nproxy
$(1)/usr
/bin
/
232 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/nsec3dig
$(1)/usr
/bin
/
233 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/saxfr
$(1)/usr
/bin
/
234 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/stubquery
$(1)/usr
/bin
/
235 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ixplore
$(1)/usr
/bin
/
236 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/sdig
$(1)/usr
/bin
/
237 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/calidns
$(1)/usr
/bin
/
238 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnsbulktest
$(1)/usr
/bin
/
239 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnstcpbench
$(1)/usr
/bin
/
240 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnspcap2protobuf
$(1)/usr
/bin
/
243 define BuildPdnsBackend
244 define Package
/pdns-backend-
$(1)/install
245 $(call Package
/pdns
/Default
/install,$$(1),$(1))
248 $$(eval
$$(call BuildPackage
,pdns-backend-
$(1)))
251 $(foreach backend
,$(PDNS_BACKENDS
),$(eval
$(call BuildPdnsBackend
,$(backend
))))
252 $(eval
$(call BuildPackage
,pdns
))
253 $(eval
$(call BuildPackage
,pdns-tools
))
254 $(eval
$(call BuildPackage
,pdns-ixfrdist
))