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.

85 lines
2.1 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.37.11
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=nextdns-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  13. PKG_SOURCE_URL:=https://codeload.github.com/nextdns/nextdns/tar.gz/v$(PKG_VERSION)?
  14. PKG_HASH:=f70cb424b0ae47456c8579d3910b486f75afde34572f28f8cf6eb1222e59b88b
  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_X:=main.version=$(PKG_VERSION)
  23. include $(INCLUDE_DIR)/package.mk
  24. include ../../lang/golang/golang-package.mk
  25. define Package/nextdns
  26. SECTION:=net
  27. CATEGORY:=Network
  28. TITLE:=NextDNS DNS over HTTPS Proxy
  29. URL:=https://github.com/nextdns/nextdns
  30. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  31. endef
  32. define Package/nextdns/conffiles
  33. /etc/config/nextdns
  34. endef
  35. define Package/nextdns/install
  36. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  37. $(INSTALL_DIR) $(1)/usr/sbin
  38. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nextdns $(1)/usr/sbin/
  39. $(INSTALL_DIR) $(1)/etc/config
  40. $(INSTALL_CONF) ./files/nextdns.config $(1)/etc/config/nextdns
  41. $(INSTALL_DIR) $(1)/etc/uci-defaults
  42. $(INSTALL_BIN) ./files/nextdns.defaults $(1)/etc/uci-defaults/nextdns
  43. endef
  44. define Package/nextdns/prerm
  45. #!/bin/sh
  46. if [ -z "$${IPKG_INSTROOT}" ]; then
  47. nextdns uninstall
  48. fi
  49. endef
  50. define Package/nextdns/description
  51. Official NextDNS DNS over HTTPS Proxy.
  52. endef
  53. define Package/golang-github-nextdns-nextdns-dev
  54. $(call Package/nextdns)
  55. $(call GoPackage/GoSubMenu)
  56. TITLE+= (source files)
  57. PKGARCH:=all
  58. endef
  59. define Package/golang-github-nextdns-nextdns-dev/description
  60. $(call Package/nextdns/description)
  61. This package provides the source files for the client/bridge program.
  62. endef
  63. $(eval $(call GoBinPackage,nextdns))
  64. $(eval $(call BuildPackage,nextdns))
  65. $(eval $(call GoSrcPackage,golang-github-nextdns-nextdns-dev))
  66. $(eval $(call BuildPackage,golang-github-nextdns-nextdns-dev))