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.

83 lines
2.7 KiB

  1. #
  2. # Copyright (C) 2019-2020 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=dnscrypt-proxy2
  9. PKG_VERSION:=2.0.42
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=dnscrypt-proxy-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/DNSCrypt/dnscrypt-proxy/tar.gz/$(PKG_VERSION)?
  13. PKG_HASH:=c000ca4e159c6606cb3476ea9e34ed64b5c46c710d70cc5651f14f1125c8d352
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/dnscrypt-proxy-$(PKG_VERSION)
  15. PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
  16. PKG_LICENSE:=ISC
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_BUILD_DEPENDS:=golang/host
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_USE_MIPS16:=0
  21. GO_PKG:=github.com/DNSCrypt/dnscrypt-proxy
  22. include $(INCLUDE_DIR)/package.mk
  23. include ../../lang/golang/golang-package.mk
  24. define Package/dnscrypt-proxy2
  25. SECTION:=net
  26. CATEGORY:=Network
  27. TITLE:=Flexible DNS proxy with encrypted DNS protocols
  28. URL:=https://github.com/DNSCrypt/dnscrypt-proxy
  29. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  30. CONFLICTS:=dnscrypt-proxy
  31. endef
  32. define Package/dnscrypt-proxy2/install
  33. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  34. $(INSTALL_DIR) $(1)/usr/sbin
  35. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/
  36. $(INSTALL_DIR) $(1)/etc/dnscrypt-proxy2
  37. $(INSTALL_CONF) $(PKG_BUILD_DIR)/dnscrypt-proxy/example-dnscrypt-proxy.toml $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
  38. $(INSTALL_CONF) ./files/blacklist.txt $(1)/etc/dnscrypt-proxy2/blacklist.txt
  39. $(INSTALL_DIR) $(1)/etc/init.d
  40. $(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy
  41. sed -i "s/^listen_addresses = .*/listen_addresses = ['127.0.0.53:53']/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
  42. sed -i "s/^ # blacklist_file = 'blacklist.txt'/blacklist_file = 'blacklist.txt'/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
  43. endef
  44. define Package/dnscrypt-proxy2/description
  45. A flexible DNS proxy, with support for modern encrypted DNS protocols
  46. such as DNSCrypt v2 and DNS-over-HTTPS.
  47. endef
  48. define Package/dnscrypt-proxy2/conffiles
  49. /etc/dnscrypt-proxy2/dnscrypt-proxy.toml
  50. endef
  51. define Package/golang-github-jedisct1-dnscrypt-proxy2-dev
  52. $(call Package/dnscrypt-proxy2)
  53. $(call GoPackage/GoSubMenu)
  54. TITLE+= (source files)
  55. PKGARCH:=all
  56. endef
  57. define Package/golang-github-jedisct1-dnscrypt-proxy2-dev/description
  58. $(call Package/dnscrypt-proxy2/description)
  59. This package provides the source files for the client/bridge program.
  60. endef
  61. $(eval $(call GoBinPackage,dnscrypt-proxy2))
  62. $(eval $(call BuildPackage,dnscrypt-proxy2))
  63. $(eval $(call GoSrcPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))
  64. $(eval $(call BuildPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))