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.

129 lines
2.9 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=dnsdist
  3. PKG_VERSION:=1.4.0
  4. PKG_RELEASE:=5
  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_BUILD_PARALLEL:=1
  14. PKG_ASLR_PIE:=0
  15. PKG_BUILD_DEPENDS:=protobuf/host
  16. PKG_CONFIG_DEPENDS:= \
  17. CONFIG_DNSDIST_GNUTLS \
  18. CONFIG_DNSDIST_OPENSSL
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/dnsdist/config
  21. menu "Configuration"
  22. depends on PACKAGE_dnsdist
  23. comment "SSL Support"
  24. choice
  25. prompt "Selected SSL library"
  26. default DNSDIST_OPENSSL
  27. config DNSDIST_OPENSSL
  28. bool "OpenSSL"
  29. config DNSDIST_GNUTLS
  30. bool "GnuTLS"
  31. config DNSDIST_NOSSL
  32. bool "No SSL support"
  33. endchoice
  34. comment "DNS over HTTPS/TLS Support"
  35. depends on !DNSDIST_NOSSL
  36. config DNSDIST_DNS_OVER_HTTPS
  37. depends on DNSDIST_OPENSSL
  38. depends on !DNSDIST_NOSSL
  39. bool "DNS over HTTPS Support"
  40. help
  41. "Enables DNS over HTTPS Support for dnsdist"
  42. default y
  43. config DNSDIST_DNS_OVER_TLS
  44. depends on !DNSDIST_NOSSL
  45. bool "DNS over TLS Support"
  46. help
  47. "Enabled DNS over TLS Support for dnsdist"
  48. default y
  49. endmenu
  50. endef
  51. define Package/dnsdist
  52. SECTION:=net
  53. CATEGORY:=Network
  54. SUBMENU:=IP Addresses and Names
  55. TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer
  56. DEPENDS:= \
  57. +DNSDIST_DNS_OVER_HTTPS:libh2o-evloop \
  58. +DNSDIST_GNUTLS:libgnutls \
  59. +DNSDIST_OPENSSL:libopenssl \
  60. +boost \
  61. +libatomic \
  62. +libcap \
  63. +libedit \
  64. +libfstrm \
  65. +libnetsnmp \
  66. +libsodium \
  67. +lmdb \
  68. +lua \
  69. +protobuf \
  70. +re2 \
  71. +tinycdb
  72. URL:=https://dnsdist.org/
  73. endef
  74. define Package/dnsdist/description
  75. dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life
  76. is to route traffic to the best server, delivering top performance to legitimate
  77. users while shunting or blocking abusive traffic.
  78. endef
  79. define Package/dnsdist/conffiles
  80. /etc/dnsdist.conf
  81. /etc/config/dnsdist
  82. /etc/init.d/dnsdist
  83. endef
  84. CONFIGURE_ARGS+= \
  85. --enable-dnscrypt \
  86. --enable-dnstap \
  87. --with-libsodium \
  88. --with-pic \
  89. --with-protobuf \
  90. --with-re2 \
  91. --with-lua=lua \
  92. --with-net-snmp \
  93. $(if $(CONFIG_DNSDIST_GNUTLS),--with,--without)-gnutls \
  94. $(if $(CONFIG_DNSDIST_OPENSSL),--with,--without)-libssl \
  95. $(if $(CONFIG_DNSDIST_DNS_OVER_TLS),--enable-dns-over-tls,) \
  96. $(if $(CONFIG_DNSDIST_DNS_OVER_HTTPS),--enable-dns-over-https,)
  97. define Package/dnsdist/install
  98. $(INSTALL_DIR) $(1)/etc
  99. $(INSTALL_CONF) ./files/dnsdist.conf $(1)/etc/dnsdist.conf
  100. $(INSTALL_DIR) $(1)/etc/config
  101. $(INSTALL_CONF) ./files/dnsdist.config $(1)/etc/config/dnsdist
  102. $(INSTALL_DIR) $(1)/etc/init.d
  103. $(INSTALL_BIN) ./files/dnsdist.init $(1)/etc/init.d/dnsdist
  104. $(INSTALL_DIR) $(1)/usr/bin
  105. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnsdist $(1)/usr/bin/
  106. endef
  107. $(eval $(call BuildPackage,dnsdist))