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.

65 lines
2.0 KiB

  1. # SPDX-License-Identifier: GPL-3.0-only
  2. #
  3. # Copyright (C) 2021 ImmortalWrt.org
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=cloudflared
  6. PKG_VERSION:=2022.7.1
  7. PKG_RELEASE:=$(AUTORELEASE)
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_SOURCE_URL:=https://codeload.github.com/cloudflare/cloudflared/tar.gz/$(PKG_VERSION)?
  10. PKG_HASH:=3a822faaed7ae90be5ba4920f9226cd85367402d2c5a2bf2f0732c37cad6599d
  11. PKG_LICENSE:=Apache-2.0
  12. PKG_LICENSE_FILES:=LICENSE
  13. PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
  14. PKG_BUILD_DEPENDS:=golang/host
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_USE_MIPS16:=0
  17. GO_PKG:=github.com/cloudflare/cloudflared
  18. GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION)
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../../lang/golang/golang-package.mk
  21. define Package/cloudflared
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=Web Servers/Proxies
  25. TITLE:=Cloudflare Tunnel client
  26. URL:=https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide
  27. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  28. endef
  29. define Package/cloudflared/description
  30. Contains the command-line client for Cloudflare Tunnel, a tunneling
  31. daemon that proxies traffic from the Cloudflare network to your origins.
  32. This daemon sits between Cloudflare network and your origin (e.g. a
  33. webserver). Cloudflare attracts client requests and sends them to you
  34. via this daemon, without requiring you to poke holes on your firewall
  35. --- your origin can remain as closed as possible.
  36. endef
  37. define Package/cloudflared/conffiles
  38. /etc/config/cloudflared
  39. /etc/cloudflared/
  40. endef
  41. define Package/cloudflared/install
  42. $(call GoPackage/Package/Install/Bin,$(1))
  43. $(INSTALL_DIR) $(1)/etc/cloudflared/
  44. $(INSTALL_CONF) $(CURDIR)/files/sample_config.yml $(1)/etc/cloudflared/config.yml
  45. $(INSTALL_DIR) $(1)/etc/config/
  46. $(INSTALL_CONF) $(CURDIR)/files/cloudflared.config $(1)/etc/config/cloudflared
  47. $(INSTALL_DIR) $(1)/etc/init.d/
  48. $(INSTALL_BIN) $(CURDIR)/files/cloudflared.init $(1)/etc/init.d/cloudflared
  49. endef
  50. $(eval $(call GoBinPackage,cloudflared))
  51. $(eval $(call BuildPackage,cloudflared))