void-packages/srcpkgs/minikube/template
2021-04-13 16:48:16 -03:00

55 lines
1.7 KiB
Bash

# Template file for 'minikube'
pkgname=minikube
version=1.19.0
revision=1
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=89647d2bba64061154ffc15cf393df1834a9f860b618f699e84696992a1654b3
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
ppc64le*) vsed -i 's/amd64/ppc64le/g' Makefile;;
esac
}
pre_build() {
local storage_provisioner_tag= iso_version=
make pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go
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/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
}
}