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.

87 lines
2.3 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=dnsdist
  3. PKG_VERSION:=1.3.3
  4. PKG_RELEASE:=3
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  6. PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
  7. PKG_HASH:=9fb24f9032025955169f3c6e9b0a05b6aa9d6441ec47da08d22de1c1aa23e8cf
  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. comment "SSL support"
  19. choice
  20. prompt "Selected SSL library"
  21. default DNSDIST_OPENSSSL
  22. config DNSDIST_OPENSSL
  23. bool "OpenSSL"
  24. config DNSDIST_GNUTLS
  25. bool "GnuTLS"
  26. config DNSDIST_NOSSL
  27. bool "No SSL support"
  28. endchoice
  29. endef
  30. define Package/dnsdist
  31. SECTION:=net
  32. CATEGORY:=Network
  33. SUBMENU:=IP Addresses and Names
  34. TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer
  35. DEPENDS:=+DNSDIST_OPENSSL:libopenssl +DNSDIST_GNUTLS:libgnutls +protobuf +re2 +libedit +libfstrm +libsodium +lua +boost +libnetsnmp +libatomic
  36. URL:=https://dnsdist.org/
  37. endef
  38. define Package/dnsdist/description
  39. dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life
  40. is to route traffic to the best server, delivering top performance to legitimate
  41. users while shunting or blocking abusive traffic.
  42. endef
  43. define Package/dnsdist/conffiles
  44. /etc/dnsdist.conf
  45. /etc/config/dnsdist
  46. /etc/init.d/dnsdist
  47. endef
  48. CONFIGURE_ARGS+= \
  49. --enable-dnscrypt \
  50. $(if $(CONFIG_DNSDIST_NOSSL),,--enable-dns-over-tls) \
  51. --enable-fstrm \
  52. --enable-libsodium \
  53. --enable-protobuf \
  54. --enable-re2 \
  55. --with-lua=lua \
  56. --with-net-snmp \
  57. $(if $(CONFIG_DNSDIST_GNUTLS),--enable,--disable)-gnutls \
  58. $(if $(CONFIG_DNSDIST_OPENSSL),--enable,--disable)-libssl
  59. define Package/dnsdist/install
  60. $(INSTALL_DIR) $(1)/etc
  61. $(INSTALL_CONF) ./files/dnsdist.conf $(1)/etc/dnsdist.conf
  62. $(INSTALL_DIR) $(1)/etc/config
  63. $(INSTALL_CONF) ./files/dnsdist.config $(1)/etc/config/dnsdist
  64. $(INSTALL_DIR) $(1)/etc/init.d
  65. $(INSTALL_BIN) ./files/dnsdist.init $(1)/etc/init.d/dnsdist
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnsdist $(1)/usr/bin/
  68. endef
  69. $(eval $(call BuildPackage,dnsdist))