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.

86 lines
2.7 KiB

  1. #
  2. # Copyright (C) 2019-2021 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.1.2
  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:=aa55fd52b9c1b983405bf98b42ec754f5d6f59b429ba9c98115df617eef5dea4
  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. GO_MOD_ARGS:=
  25. GO_PKG_BUILD_VARS+= GO111MODULE=off
  26. define Package/dnscrypt-proxy2
  27. SECTION:=net
  28. CATEGORY:=Network
  29. TITLE:=Flexible DNS proxy with encrypted DNS protocols
  30. URL:=https://github.com/DNSCrypt/dnscrypt-proxy
  31. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  32. CONFLICTS:=dnscrypt-proxy
  33. endef
  34. define Package/dnscrypt-proxy2/install
  35. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  36. $(INSTALL_DIR) $(1)/usr/sbin
  37. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/
  38. $(INSTALL_DIR) $(1)/etc/dnscrypt-proxy2
  39. $(INSTALL_CONF) $(PKG_BUILD_DIR)/dnscrypt-proxy/example-dnscrypt-proxy.toml $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
  40. $(INSTALL_CONF) ./files/blocked-names.txt $(1)/etc/dnscrypt-proxy2/blocked-names.txt
  41. $(INSTALL_DIR) $(1)/etc/init.d
  42. $(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy
  43. sed -i "s/^listen_addresses = .*/listen_addresses = ['127.0.0.53:53']/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
  44. sed -i "s/^ # blocked_names_file = 'blocked-names.txt'/blocked_names_file = 'blocked-names.txt'/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
  45. endef
  46. define Package/dnscrypt-proxy2/description
  47. A flexible DNS proxy, with support for modern encrypted DNS protocols
  48. such as DNSCrypt v2 and DNS-over-HTTPS.
  49. endef
  50. define Package/dnscrypt-proxy2/conffiles
  51. /etc/dnscrypt-proxy2/dnscrypt-proxy.toml
  52. endef
  53. define Package/golang-github-jedisct1-dnscrypt-proxy2-dev
  54. $(call Package/dnscrypt-proxy2)
  55. $(call GoPackage/GoSubMenu)
  56. TITLE+= (source files)
  57. PKGARCH:=all
  58. endef
  59. define Package/golang-github-jedisct1-dnscrypt-proxy2-dev/description
  60. $(call Package/dnscrypt-proxy2/description)
  61. This package provides the source files for the client/bridge program.
  62. endef
  63. $(eval $(call GoBinPackage,dnscrypt-proxy2))
  64. $(eval $(call BuildPackage,dnscrypt-proxy2))
  65. $(eval $(call GoSrcPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))
  66. $(eval $(call BuildPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))