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.

79 lines
2.0 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.6.3
  10. PKG_RELEASE:=2
  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:=104ec2ffe21f1f1770bce7686e4f117019dfc64f3f6bfd8f8f06cfc1ff44da6d
  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/conffiles
  34. /etc/config/nextdns
  35. endef
  36. define Package/nextdns/install
  37. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  38. $(INSTALL_DIR) $(1)/usr/sbin
  39. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nextdns $(1)/usr/sbin/
  40. $(INSTALL_DIR) $(1)/etc/init.d
  41. $(INSTALL_BIN) ./files/nextdns.init $(1)/etc/init.d/nextdns
  42. $(INSTALL_DIR) $(1)/etc/config
  43. $(INSTALL_CONF) ./files/nextdns.config $(1)/etc/config/nextdns
  44. endef
  45. define Package/nextdns/description
  46. Official NextDNS DNS over HTTPS Proxy.
  47. endef
  48. define Package/golang-github-nextdns-nextdns-dev
  49. $(call Package/nextdns)
  50. $(call GoPackage/GoSubMenu)
  51. TITLE+= (source files)
  52. PKGARCH:=all
  53. endef
  54. define Package/golang-github-nextdns-nextdns-dev/description
  55. $(call Package/nextdns/description)
  56. This package provides the source files for the client/bridge program.
  57. endef
  58. $(eval $(call GoBinPackage,nextdns))
  59. $(eval $(call BuildPackage,nextdns))
  60. $(eval $(call GoSrcPackage,golang-github-nextdns-nextdns-dev))
  61. $(eval $(call BuildPackage,golang-github-nextdns-nextdns-dev))