Merge pull request #12342 from PolynomialDivision/feature/add_dawn_node_exporter
[feed/packages.git] / net / dnsdist / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=dnsdist
4 PKG_VERSION:=1.4.0
5 PKG_RELEASE:=5
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
8 PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
9 PKG_HASH:=a336fa2c3eb381c2464d9d9790014fd6d4505029ed2c1b73ee1dc9115a2f1dc0
10
11 PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
12 PKG_LICENSE:=GPL-2.0-only
13 PKG_LICENSE_FILES:=COPYING
14 PKG_CPE_ID:=cpe:/a:powerdns:dnsdist
15
16 PKG_INSTALL:=1
17 PKG_BUILD_PARALLEL:=1
18
19 PKG_ASLR_PIE:=0
20 PKG_BUILD_DEPENDS:=protobuf/host
21
22 PKG_CONFIG_DEPENDS:= \
23 CONFIG_DNSDIST_GNUTLS \
24 CONFIG_DNSDIST_OPENSSL
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/dnsdist/config
29 menu "Configuration"
30 depends on PACKAGE_dnsdist
31
32 comment "SSL Support"
33 choice
34 prompt "Selected SSL library"
35 default DNSDIST_OPENSSL
36
37 config DNSDIST_OPENSSL
38 bool "OpenSSL"
39
40 config DNSDIST_GNUTLS
41 bool "GnuTLS"
42
43 config DNSDIST_NOSSL
44 bool "No SSL support"
45
46 endchoice
47
48 comment "DNS over HTTPS/TLS Support"
49 depends on !DNSDIST_NOSSL
50
51 config DNSDIST_DNS_OVER_HTTPS
52 depends on DNSDIST_OPENSSL
53 depends on !DNSDIST_NOSSL
54 bool "DNS over HTTPS Support"
55 help
56 "Enables DNS over HTTPS Support for dnsdist"
57 default y
58
59 config DNSDIST_DNS_OVER_TLS
60 depends on !DNSDIST_NOSSL
61 bool "DNS over TLS Support"
62 help
63 "Enabled DNS over TLS Support for dnsdist"
64 default y
65 endmenu
66 endef
67
68 define Package/dnsdist
69 SECTION:=net
70 CATEGORY:=Network
71 SUBMENU:=IP Addresses and Names
72 TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer
73 DEPENDS:= \
74 +DNSDIST_DNS_OVER_HTTPS:libh2o-evloop \
75 +DNSDIST_GNUTLS:libgnutls \
76 +DNSDIST_OPENSSL:libopenssl \
77 +boost \
78 +libatomic \
79 +libcap \
80 +libedit \
81 +libfstrm \
82 +libnetsnmp \
83 +libsodium \
84 +lmdb \
85 +lua \
86 +protobuf \
87 +re2 \
88 +tinycdb
89 URL:=https://dnsdist.org/
90 endef
91
92 define Package/dnsdist/description
93 dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life
94 is to route traffic to the best server, delivering top performance to legitimate
95 users while shunting or blocking abusive traffic.
96 endef
97
98 define Package/dnsdist/conffiles
99 /etc/dnsdist.conf
100 /etc/config/dnsdist
101 /etc/init.d/dnsdist
102 endef
103
104 CONFIGURE_ARGS+= \
105 --enable-dnscrypt \
106 --enable-dnstap \
107 --with-libsodium \
108 --with-pic \
109 --with-protobuf \
110 --with-re2 \
111 --with-lua=lua \
112 --with-net-snmp \
113 $(if $(CONFIG_DNSDIST_GNUTLS),--with,--without)-gnutls \
114 $(if $(CONFIG_DNSDIST_OPENSSL),--with,--without)-libssl \
115 $(if $(CONFIG_DNSDIST_DNS_OVER_TLS),--enable-dns-over-tls,) \
116 $(if $(CONFIG_DNSDIST_DNS_OVER_HTTPS),--enable-dns-over-https,)
117
118 define Package/dnsdist/install
119 $(INSTALL_DIR) $(1)/etc
120 $(INSTALL_CONF) ./files/dnsdist.conf $(1)/etc/dnsdist.conf
121 $(INSTALL_DIR) $(1)/etc/config
122 $(INSTALL_CONF) ./files/dnsdist.config $(1)/etc/config/dnsdist
123 $(INSTALL_DIR) $(1)/etc/init.d
124 $(INSTALL_BIN) ./files/dnsdist.init $(1)/etc/init.d/dnsdist
125 $(INSTALL_DIR) $(1)/usr/bin
126 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnsdist $(1)/usr/bin/
127 endef
128
129 $(eval $(call BuildPackage,dnsdist))