summaryrefslogtreecommitdiff
path: root/sys-cluster/kind/kind-0.24.0.ebuild
blob: 437916b17bbd942d66aab209c4cef01994284c61 (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
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit go-module shell-completion

DESCRIPTION="Kubernetes IN Docker"
HOMEPAGE="https://github.com/kubernetes-sigs/kind/"
BDEPEND=">=dev-lang/go-1.17"
SRC_URI="https://github.com/kubernetes-sigs/kind/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://share.terinstock.com/${P}-vendor.tar.xz"

LICENSE="Apache-2.0"
LICENSE+=" MIT BSD BSD-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"

RESTRICT="!test? ( test )"
DEPEND="test? ( app-containers/docker )"

src_compile() {
	ego build .
	./kind completion bash > "${PN}.bash" || die
	./kind completion fish > "${PN}.fish" || die
	./kind completion zsh > "${PN}.zsh" || die
}

src_test() {
	ego test ./...
}

src_install() {
	dobin kind

	newbashcomp "${PN}.bash" "${PN}"
	dofishcomp "${PN}.fish"
	newzshcomp "${PN}.zsh" "_${PN}"
}