void-packages/srcpkgs/minikube/template

52 lines
1.7 KiB
Bash

# Template file for 'minikube'
pkgname=minikube
version=1.24.0
revision=1
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/cmd/minikube k8s.io/minikube/cmd/drivers/kvm"
hostmakedepends="go-bindata python pkg-config git"
makedepends="libvirt-devel"
depends="kubectl"
short_desc="Tool to make it easy to run Kubernetes locally"
maintainer="Daniel Santana <daniel@santana.tech>"
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=df8e273468163341ff28721c8774a380df9b9d5a8e45eb3cbbcb485552d1a1c2
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
}
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
}
}