blob: 42ef20d269ab4b4a294d15f48c2f99808726f579 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1 go-module optfeature
# git rev-parse HEAD
MY_GIT_COMMIT="e8e638edc22587ec7be2cc3d983b61763e33f973"
MY_PN="kubevirt"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Control virtual machine related operations on your kubernetes cluster"
HOMEPAGE="https://kubevirt.io https://github.com/kubevirt/kubevirt"
SRC_URI="https://github.com/kubevirt/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
SRC_URI+=" https://dev.gentoo.org/~concord/distfiles/${MY_P}-deps.tar.xz"
S="${WORKDIR}/${MY_P}"
LICENSE="Apache-2.0 BSD-2 BSD ISC MIT"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="test"
src_compile() {
ego build -o ./bin/virtctl -ldflags "
-X kubevirt.io/client-go/version.buildDate=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
-X kubevirt.io/client-go/version.gitCommit=${MY_GIT_COMMIT}
-X kubevirt.io/client-go/version.gitTreeState=clean
-X kubevirt.io/client-go/version.gitVersion=v${PV}
" ./cmd/virtctl
}
src_install() {
dobin bin/virtctl
bin/virtctl completion bash >./virtctl.bash || die "Failed generating bash completions"
newbashcomp ./virtctl.bash virtctl
bin/virtctl completion zsh >./virtctl.zsh || die "Failed generating zsh completions"
insinto /usr/share/zsh/site-functions
newins ./virtctl.zsh _virtctl
}
pkg_postinst() {
optfeature "graphical console for use with VNC connections" app-emulation/virt-viewer
}
|