You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
2.8 KiB

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