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
:=05f356fcce29c4ece03c2d8df046adff3aaab0b036d6801c1a311c6d5bb3c07f
11 PKG_MAINTAINER
:=Peter van Dijk
<peter.van.dijk@powerdns.com
>
12 PKG_LICENSE
:=GPL-2.0
-only
13 PKG_LICENSE_FILES
:=COPYING
14 PKG_CPE_ID
:=cpe
:/a
:powerdns
:dnsdist
19 PKG_BUILD_DEPENDS
:=boost
21 PKG_CONFIG_DEPENDS
:= \
22 CONFIG_DNSDIST_GNUTLS \
23 CONFIG_DNSDIST_OPENSSL
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/dnsdist
/Default
30 SUBMENU
:=IP Addresses and Names
31 TITLE
:=dnsdist DNS-
, DOS- and abuse-aware loadbalancer
$(2)
32 USERID
:=dnsdist
:dnsdist
39 URL
:=https
://dnsdist.org
/
44 define Package
/dnsdist
/description
/Default
45 dnsdist is a highly DNS-
, DoS- and abuse-aware loadbalancer. Its goal in life
46 is to route traffic to the best server
, delivering top performance to legitimate
47 users while shunting or blocking abusive traffic.
50 define Package
/dnsdist
/conffiles
/Default
56 define Package
/dnsdist
/config
57 source
"$(SOURCE)/Config.in"
60 define Package
/dnsdist
/install/Default
61 $(INSTALL_DIR
) $(1)/etc
62 $(INSTALL_DIR
) $(1)/etc
/dnsdist.conf.d
63 $(INSTALL_CONF
) .
/files
/dnsdist.conf
$(1)/etc
/dnsdist.conf
64 $(INSTALL_DIR
) $(1)/etc
/config
65 $(INSTALL_CONF
) .
/files
/dnsdist.config
$(1)/etc
/config
/dnsdist
66 $(INSTALL_DIR
) $(1)/etc
/init.d
67 $(INSTALL_BIN
) .
/files
/dnsdist.init
$(1)/etc
/init.d
/dnsdist
68 $(INSTALL_DIR
) $(1)/usr
/bin
69 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/dnsdist
$(1)/usr
/bin
/
72 define Package
/dnsdist
73 $(call Package
/dnsdist
/Default
,mini
,- minimal version with a restricted feature set
)
75 +DNSDIST_LIBEDIT
:libedit \
76 +DNSDIST_DNSTAP
:libfstrm \
77 +DNSDIST_GNUTLS
:libgnutls \
78 +DNSDIST_DNS_OVER_HTTPS
:libh2o-evloop \
79 +DNSDIST_NET_SNMP
:libnetsnmp \
80 +DNSDIST_DNS_OVER_HTTPS_OUTGOING
:libnghttp2 \
81 +DNSDIST_OPENSSL
:libopenssl \
82 +DNSDIST_SODIUM
:libsodium \
84 +DNSDIST_CDB
:tinycdb \
88 Package
/dnsdist
/description
=$(call Package
/dnsdist
/description
/Default
)
89 Package
/dnsdist
/conffiles
=$(call Package
/dnsdist
/conffiles
/Default
)
90 Package
/dnsdist
/install=$(call Package
/dnsdist
/install/Default
,$1)
92 define Package
/dnsdist-full
93 $(call Package
/dnsdist
/Default
,full
,- full version with
all the features built in
)
107 Package
/dnsdist-full
/description
=$(call Package
/dnsdist
/description
/Default
)
108 Package
/dnsdist-full
/conffiles
=$(call Package
/dnsdist
/conffiles
/Default
)
109 Package
/dnsdist-full
/install=$(call Package
/dnsdist
/install/Default
,$1)
111 # not everything groks --disable-nls
114 # disable PIE for this package, see CONFIG_DNSDIST_PIE
117 ifneq ($(CONFIG_DNSDIST_DEBUG_SYMBOLS
),)
122 IsEnabled
= $(or
$(filter full
,$(BUILD_VARIANT
)),$(CONFIG_
$(1)))
124 # OpenWRT's setting of CXX destroys dnsdist's -std=c++17
125 # --with-re2 compensates for that because it compensates for a bug in re2.pc that also destroys it
126 # so this addition is for the --without-re2 case
128 # none of this is pretty
129 TARGET_CXX
+=-std
=c
++17
130 TARGET_CFLAGS
+=-Os
-fvisibility
=hidden
-flto
-fno-ipa-cp
-DNDEBUG
131 TARGET_CXXFLAGS
+=-Os
-fvisibility
=hidden
-flto
-fno-ipa-cp
-DNDEBUG \
132 -DDISABLE_DEPRECATED_DYNBLOCK
-DDISABLE_RECVMMSG
-DDISABLE_NPN
-DDISABLE_FALSE_SHARING_PADDING
-DUSE_SINGLE_ACCEPTOR_THREAD
-DOPENSSL_NO_ENGINE
-DDISABLE_OPENSSL_ERROR_STRINGS \
133 $(if
$(call IsEnabled
,DNSDIST_CARBON
),,-DDISABLE_CARBON
) \
134 $(if
$(call IsEnabled
,DNSDIST_COMPLETION
),,-DDISABLE_COMPLETION
) \
135 $(if
$(call IsEnabled
,DNSDIST_DEBUG_SYMBOLS
),-g3
,) \
136 $(if
$(call IsEnabled
,DNSDIST_DELAY_PIPE
),,-DDISABLE_DELAY_PIPE
) \
137 $(if
$(call IsEnabled
,DNSDIST_DYNBLOCKS
),,-DDISABLE_DYNBLOCKS
) \
138 $(if
$(call IsEnabled
,DNSDIST_ECS_ACTIONS
),,-DDISABLE_ECS_ACTIONS
) \
139 $(if
$(call IsEnabled
,DNSDIST_HASHED
),,-DDISABLE_HASHED_CREDENTIALS
) \
140 $(if
$(call IsEnabled
,DNSDIST_LUA_ADVANCED
),,-DDISABLE_NON_FFI_DQ_BINDINGS
-DDISABLE_POLICIES_BINDINGS
-DDISABLE_DOWNSTREAM_BINDINGS
-DDISABLE_DNSHEADER_BINDINGS
-DDISABLE_COMBO_ADDR_BINDINGS
-DDISABLE_QPS_LIMITER_BINDINGS
-DDISABLE_PACKETCACHE_BINDINGS
-DDISABLE_CLIENT_STATE_BINDINGS
-DDISABLE_DNSPACKET_BINDINGS
-DDISABLE_LUA_BINDINGS_RINGS
) \
141 $(if
$(call IsEnabled
,DNSDIST_MAC
),-DDNSDIST_RINGS_WITH_MACADDRESS
,) \
142 $(if
$(call IsEnabled
,DNSDIST_OCSP_STAPLING
),,-DDISABLE_OCSP_STAPLING
) \
143 $(if
$(call IsEnabled
,DNSDIST_PROTOBUF
),,-DDISABLE_PROTOBUF
) \
144 $(if
$(call IsEnabled
,DNSDIST_PROMETHEUS
),,-DDISABLE_PROMETHEUS
) \
145 $(if
$(call IsEnabled
,DNSDIST_RULES_ALTER
),,-DDISABLE_RULES_ALTERING_QUERIES
) \
146 $(if
$(call IsEnabled
,DNSDIST_SECPOLL
),,-DDISABLE_SECPOLL
) \
147 $(if
$(call IsEnabled
,DNSDIST_TOP_N
),,-DDISABLE_TOP_N_BINDINGS
) \
148 $(if
$(call IsEnabled
,DNSDIST_WEB
),,-DDISABLE_WEB_CONFIG
-DDISABLE_BUILTIN_HTML
-DDISABLE_LUA_WEB_HANDLERS
)
154 $(if
$(call IsEnabled
,DNSDIST_PIE
),,--disable-hardening
) \
155 $(if
$(call IsEnabled
,DNSDIST_SODIUM
),--enable-dnscrypt
--with-libsodium
,--disable-dnscrypt
--without-libsodium
) \
156 $(if
$(call IsEnabled
,DNSDIST_DNSTAP
),--enable-dnstap
=yes
,--enable-dnstap
=no
) \
157 $(if
$(call IsEnabled
,DNSDIST_RE2
),--with
,--without
)-re2 \
158 $(if
$(call IsEnabled
,DNSDIST_NET_SNMP
),--with
,--without
)-net-snmp \
159 $(if
$(call IsEnabled
,DNSDIST_GNUTLS
),--with
,--without
)-gnutls \
160 $(if
$(call IsEnabled
,DNSDIST_OPENSSL
),--with
,--without
)-libssl \
161 $(if
$(call IsEnabled
,DNSDIST_DNS_OVER_TLS
),--enable-dns-over-tls
,) \
162 $(if
$(call IsEnabled
,DNSDIST_CDB
),--with
,--without
)-cdb \
163 $(if
$(call IsEnabled
,DNSDIST_LMDB
),--with
,--without
)-lmdb \
164 $(if
$(call IsEnabled
,DNSDIST_LIBEDIT
),--with
,--without
)-libedit \
165 $(if
$(call IsEnabled
,DNSDIST_IPCIPHER
),--enable
,--disable
)-ipcipher \
166 $(if
$(call IsEnabled
,DNSDIST_EBPF
),--with
,--without
)-ebpf \
167 $(if
$(call IsEnabled
,DNSDIST_DNS_OVER_HTTPS
),--enable-dns-over-https
,) \
168 $(if
$(call IsEnabled
,DNSDIST_DNS_OVER_HTTPS_OUTGOING
),--with
,--without
)-nghttp2
170 $(eval
$(call BuildPackage
,dnsdist
))
171 $(eval
$(call BuildPackage
,dnsdist-full
))