Files
openwrt-packages/net/cloudflared/Makefile
Bohdan Chubuk 137a710fc2 cloudflared: fix duplicate "run" command argument
The init script was appending the 'run' subcommand twice. The first
instance was misplaced, causing a command syntax error by placing 'run'
before other tunnel options, which breaks the service.

This patch removes the first, incorrect 'run' argument, leaving the
second one in the correct position after all options have been set.

This fixes a regression introduced in pull request #27786.

Ref: https://github.com/openwrt/packages/pull/27786
Signed-off-by: Bohdan Chubuk <chbgdn@gmail.com>
2025-11-10 20:06:34 +08:00

66 lines
2.0 KiB
Makefile

# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=cloudflared
PKG_VERSION:=2025.11.0
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/cloudflare/cloudflared/tar.gz/$(PKG_VERSION)?
PKG_HASH:=60bc4ba6ea89737d12fcb1a507741abba949e21dea3ffdced283710fd59f800a
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16
GO_PKG:=github.com/cloudflare/cloudflared
GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/cloudflared
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=Cloudflare Tunnel client
URL:=https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/get-started/
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
endef
define Package/cloudflared/description
Contains the command-line client for Cloudflare Tunnel, a tunneling
daemon that proxies traffic from the Cloudflare network to your origins.
This daemon sits between Cloudflare network and your origin (e.g. a
webserver). Cloudflare attracts client requests and sends them to you
via this daemon, without requiring you to poke holes on your firewall
--- your origin can remain as closed as possible.
endef
define Package/cloudflared/conffiles
/etc/config/cloudflared
/etc/cloudflared/
endef
define Package/cloudflared/install
$(call GoPackage/Package/Install/Bin,$(1))
$(INSTALL_DIR) $(1)/etc/cloudflared/
$(INSTALL_CONF) $(CURDIR)/files/sample_config.yml $(1)/etc/cloudflared/config.yml
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_CONF) $(CURDIR)/files/cloudflared.config $(1)/etc/config/cloudflared
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(CURDIR)/files/cloudflared.init $(1)/etc/init.d/cloudflared
endef
$(eval $(call GoBinPackage,cloudflared))
$(eval $(call BuildPackage,cloudflared))