gentoo-overlay/sys-cluster/openshift-clients/openshift-clients-4.18.0_p202502040032.ebuild
Alexander Miroshnichenko 64289aa160
sys-cluster/openshift-clients: bump v4.18.0
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
2025-04-11 15:10:44 +03:00

41 lines
959 B
Bash

# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1 go-module
OS_VERSION=v${PV//_p/-}
BN=oc
DESCRIPTION="The OpenShift Command Line, part of OKD"
HOMEPAGE="https://www.okd.io/"
SRC_URI="https://github.com/openshift/oc/archive/refs/tags/${PN}-${OS_VERSION}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ~arm64"
IUSE="hardened"
BDEPEND=">=dev-lang/go-1.19
virtual/krb5
app-crypt/gpgme"
RESTRICT+=" test"
S="${WORKDIR}/${BN}-${PN}-${OS_VERSION}"
src_compile() {
CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')" \
emake OS_GIT_VERSION="${OS_VERSION}" OS_GIT_COMMIT='' OS_GIT_TREE_STATE=''
}
src_install() {
./${BN} completion bash > ${BN}.bash || die
./${BN} completion zsh > ${BN}.zsh || die
newbashcomp ${BN}.bash ${BN}
insinto /usr/share/zsh/site-functions
newins ${BN}.zsh _${BN}
./genman docs/generated oc
doman docs/generated/*
dobin ${BN}
}