Files
gentoo/sys-cluster/flux/flux-0.41.2.ebuild
Kenton Groombridge 0e1db6b14a sys-cluster/flux: fix QA warnings for 0.41.2
Signed-off-by: Kenton Groombridge <concord@gentoo.org>
2025-04-05 22:08:37 -04:00

37 lines
1.0 KiB
Bash

# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module shell-completion
DESCRIPTION="Flux is a tool for keeping Kubernetes clusters in sync"
HOMEPAGE="https://fluxcd.io https://github.com/fluxcd/flux2"
SRC_URI="https://github.com/fluxcd/flux2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://dev.gentoo.org/~concord/distfiles/flux2-${PV}-deps.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~concord/distfiles/flux2-${PV}-manifests.tar.xz"
S="${WORKDIR}/flux2-${PV}"
LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="hardened"
BDEPEND=">=dev-lang/go-1.19"
RESTRICT+=" test"
src_compile() {
mv "${WORKDIR}"/manifests cmd/"${PN}" || die
CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')" \
ego build -ldflags="-s -w -X main.VERSION=${PV}" -o ./bin/${PN} ./cmd/${PN}
}
src_install() {
dobin bin/${PN}
bin/${PN} completion bash > ${PN}.bash || die
bin/${PN} completion zsh > ${PN}.zsh || die
newbashcomp ${PN}.bash ${PN}
newzshcomp ${PN}.zsh _${PN}
}