summaryrefslogtreecommitdiff
path: root/net-vpn/cloudflared/cloudflared-2026.1.2.ebuild
blob: b5b4a2adc36220bc1dc79797f26f3f853cebeaf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module

DESCRIPTION="A command-line client and tunneling daemon for Cloudflare Tunnel"
HOMEPAGE="https://github.com/cloudflare/cloudflared"
SRC_URI="https://github.com/cloudflare/cloudflared/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 arm64"

# "make test" fails since cloudflared-2024.12.1, and fails with network-sanbox
RESTRICT="test"

BDEPEND=">=dev-lang/go-1.24.11"

src_compile(){
	local ldflags="
		-X main.Version=${PV}
		-X 'main.BuildTime=$(date +'%F %T %z')'"
	ego build -ldflags "${ldflags}" ./cmd/cloudflared
}

src_install(){
	dobin cloudflared
	einstalldocs
}