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.

53 lines
1.7 KiB

  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Copyright (C) 2021 Martin Schneider <martschneider@google.com>
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=dns-over-https
  6. PKG_VERSION:=2.3.0
  7. PKG_RELEASE:=$(AUTORELEASE)
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_SOURCE_URL:=https://codeload.github.com/m13253/dns-over-https/tar.gz/v${PKG_VERSION}?
  10. PKG_HASH:=887456b25396a0234ef351e474079198b5b81bccf63cc6eedefef9d2d81821f2
  11. PKG_MAINTAINER:=Martin Schneider <martschneider@google.com>
  12. PKG_LICENSE:=MIT
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_BUILD_DEPENDS:=golang/host
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_USE_MIPS16:=0
  17. GO_PKG:=github.com/m13253/dns-over-https
  18. GO_PKG_INSTALL_BIN_PATH:=/usr/sbin
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../../lang/golang/golang-package.mk
  21. define Package/dns-over-https
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=IP Addresses and Names
  25. TITLE:=Query DNS over HTTPS
  26. URL:=https://github.com/m13253/dns-over-https
  27. DEPENDS:=$(GO_ARCH_DEPENDS)
  28. endef
  29. define Package/dns-over-https/description
  30. Client and server software to query DNS over HTTPS, using Google DNS-over-HTTPS protocol and IETF DNS-over-HTTPS (RFC 8484).
  31. endef
  32. define Package/dns-over-https/install
  33. $(call GoPackage/Package/Install/Bin,$(1))
  34. $(INSTALL_DIR) $(1)/etc/dns-over-https
  35. $(CP) $(PKG_BUILD_DIR)/doh-client/doh-client.conf $(1)/etc/dns-over-https/doh-client.conf
  36. $(CP) $(PKG_BUILD_DIR)/doh-server/doh-server.conf $(1)/etc/dns-over-https/doh-server.conf
  37. $(INSTALL_DIR) $(1)/etc/init.d/
  38. $(INSTALL_BIN) ./files/doh-client.init $(1)/etc/init.d/doh-client
  39. $(INSTALL_BIN) ./files/doh-server.init $(1)/etc/init.d/doh-server
  40. endef
  41. $(eval $(call GoBinPackage,dns-over-https))
  42. $(eval $(call BuildPackage,dns-over-https))