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.

75 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2019 NextDNS Inc
  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:=nextdns
  9. PKG_VERSION:=1.3.1
  10. PKG_RELEASE:=4
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  13. PKG_SOURCE_URL:=https://github.com/nextdns/nextdns.git
  14. PKG_MIRROR_HASH:=bb3b1901ba4d65b91f69487c59fbae89654fc22d368d37f3640c6eb457a2a0a1
  15. PKG_MAINTAINER:=Olivier Poitrey <rs@nextdns.io>
  16. PKG_LICENSE:=MIT
  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/nextdns/nextdns
  22. GO_PKG_LDFLAGS:=-s -w
  23. GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
  24. include $(INCLUDE_DIR)/package.mk
  25. include ../../lang/golang/golang-package.mk
  26. define Package/nextdns
  27. SECTION:=net
  28. CATEGORY:=Network
  29. TITLE:=NextDNS DNS over HTTPS Proxy
  30. URL:=https://github.com/nextdns/nextdns
  31. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  32. endef
  33. define Package/nextdns/install
  34. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  35. $(INSTALL_DIR) $(1)/usr/sbin
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nextdns $(1)/usr/sbin/
  37. $(INSTALL_DIR) $(1)/etc/init.d
  38. $(INSTALL_BIN) ./files/nextdns.init $(1)/etc/init.d/nextdns
  39. $(INSTALL_DIR) $(1)/etc/config
  40. $(INSTALL_CONF) ./files/nextdns.config $(1)/etc/config/nextdns
  41. endef
  42. define Package/nextdns/description
  43. Official NextDNS DNS over HTTPS Proxy.
  44. endef
  45. define Package/golang-github-nextdns-nextdns-dev
  46. $(call Package/nextdns)
  47. $(call GoPackage/GoSubMenu)
  48. TITLE+= (source files)
  49. PKGARCH:=all
  50. endef
  51. define Package/golang-github-nextdns-nextdns-dev/description
  52. $(call Package/nextdns/description)
  53. This package provides the source files for the client/bridge program.
  54. endef
  55. $(eval $(call GoBinPackage,nextdns))
  56. $(eval $(call BuildPackage,nextdns))
  57. $(eval $(call GoSrcPackage,golang-github-nextdns-nextdns-dev))
  58. $(eval $(call BuildPackage,golang-github-nextdns-nextdns-dev))