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