void-packages/srcpkgs/minikube/template

54 lines
1.7 KiB
Bash

# Template file for 'minikube'
pkgname=minikube
version=1.27.0
revision=3
archs="x86_64* i686* aarch64*"
build_style=go
build_helper=qemu
go_ldflags="-X k8s.io/minikube/pkg/version.version=$version"
go_import_path="k8s.io/minikube"
go_package="./cmd/minikube ./cmd/drivers/kvm"
hostmakedepends="go-bindata pkg-config"
makedepends="libvirt-devel"
depends="kubectl"
short_desc="Tool to make it easy to run Kubernetes locally"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://github.com/kubernetes/minikube"
changelog="https://raw.githubusercontent.com/kubernetes/minikube/master/CHANGELOG.md"
distfiles="https://github.com/kubernetes/minikube/archive/v$version.tar.gz"
checksum=8978a27cff9bf1450c0cd56e28306e8272150f599a017ba31c2bad57fd9248d2
pre_build() {
local storage_provisioner_tag= iso_version=
storage_provisioner_tag=$(sed -n '/^STORAGE_PROVISIONER_TAG/s/.*=\W*//p' Makefile)
iso_version=$(sed -n '/^ISO_VERSION/s/.*=\W*//p' Makefile)
go_ldflags+="
-X k8s.io/minikube/pkg/drivers/kvm.version=${version}
-X k8s.io/minikube/pkg/version.version=${version}
-X k8s.io/minikube/pkg/version.isoVersion=${iso_version}
-X k8s.io/minikube/pkg/version.storageProvisionerVersion=${storage_provisioner_tag}
"
}
do_install() {
vbin $GOPATH/bin/minikube
vbin $GOPATH/bin/kvm docker-machine-driver-kvm2
for shell in bash zsh fish; do
vtargetrun $GOPATH/bin/minikube completion $shell > completion.$shell
vcompletion completion.$shell $shell
done
vdoc "${FILESDIR}/README.voidlinux"
}
docker-machine-driver-kvm2_package() {
short_desc="Minikube-maintained KVM driver for docker-machine"
depends="libvirt"
pkg_install() {
vmove usr/bin/docker-machine-driver-kvm2
}
}