Files
gentoo-zh/dev-util/gitea-cli/gitea-cli-0.14.2.ebuild
T
Zakk f3cc334217 dev-util/gitea-cli: add 0.14.2, drop 0.14.1
Upstream renamed the module code.gitea.io/tea to gitea.dev/tea; update the
-ldflags version-injection path to match, or the binary reports "development".
The vendor bundle now comes from gentoo-zh/gentoo-deps, as douglarek/gentoo-deps
has no 0.14.2.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-07-21 20:55:46 +10:00

43 lines
917 B
Bash

# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module shell-completion
DESCRIPTION="Command line tool to interact with Gitea"
HOMEPAGE="https://gitea.com/gitea/tea"
SRC_URI="https://gitea.com/gitea/tea/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/gentoo-zh/gentoo-deps/releases/download/${P}/${P}-vendor.tar.xz -> ${P}-deps.tar.xz"
S="${WORKDIR}/tea"
LICENSE="MIT"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
RESTRICT="strip"
BDEPEND=">=dev-lang/go-1.26"
src_compile() {
ego build -trimpath \
-ldflags "-X gitea.dev/tea/modules/version.Version=${PV} -s -w" \
-o bin/tea .
}
src_test() {
ego test ./...
}
src_install() {
dobin bin/tea
./bin/tea completion bash > tea.bash || die
dobashcomp tea.bash
./bin/tea completion zsh > _tea || die
dozshcomp _tea
./bin/tea completion fish > tea.fish || die
dofishcomp tea.fish
}