gentoo/dev-util/datree/datree-1.9.19-r1.ebuild
Maciej Barć c9139258ac
dev-util/datree: do not strip during build
Closes: https://bugs.gentoo.org/960111
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
2025-07-17 17:24:06 +02:00

53 lines
1.0 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edo go-module shell-completion
DESCRIPTION="Tool to ensure K8s manifests and Helm charts follow best practices"
HOMEPAGE="https://hub.datree.io/
https://github.com/datreeio/datree/"
SRC_URI="
https://github.com/datreeio/${PN}/archive/${PV}.tar.gz
-> ${P}.tar.gz
https://dev.gentoo.org/~xgqt/distfiles/deps/${P}-deps.tar.xz
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ~x86"
DOCS=( README.md examples )
src_compile() {
local go_ldflags="
-X github.com/datreeio/datree/cmd.CliVersion=${PV}
"
local -a go_buildargs=(
-ldflags "${go_ldflags}"
)
ego build "${go_buildargs[@]}"
local -a shell_types=(
bash
fish
zsh
)
local shell_type
for shell_type in ${shell_types[@]} ; do
edo ./datree completion ${shell_type} > ${PN}.${shell_type}
done
}
src_install() {
exeinto /usr/bin
doexe ${PN}
dofishcomp ${PN}.fish
newbashcomp ${PN}.bash ${PN}
newzshcomp ${PN}.zsh _${PN}
einstalldocs
}