# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           golang 1.0

go.setup            github.com/kubernetes/minikube 1.38.1 v
go.package          k8s.io/minikube
go.offline_build    no
revision            0

homepage            https://minikube.sigs.k8s.io

description         Run Kubernetes locally

long_description    \
    Minikube runs a single-node Kubernetes cluster inside a VM on your laptop \
    for users looking to try out Kubernetes or develop with it day-to-day.

categories          sysutils
installs_libs       no
license             Apache-2
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer
supported_archs     arm64 x86_64

checksums           rmd160  8ef709cce683c38d2241df77a75ae959291878d5 \
                    sha256  f3401ff708235441d12ee47f5e8b5e7f55e7944585ae2a9bdb4b8cb629838f7c \
                    size    69059579

depends_build-append \
                    port:go-bindata

depends_run-append  path:${prefix}/bin/kubectl:kubectl-1.31

# Minikube needs the hyperkit driver on Darwin x86_64 platforms
platform i386 {
    default_variants +hyperkit
}

if {${build_arch} ne "arm64"} {
    default_variants +hyperkit
}

build.cmd           make
build.target        ${name}-${goos}-${goarch}

variant hyperkit description {Install Hyperkit driver} {
    build.target-append \
                    docker-machine-driver-hyperkit
}

destroot {
    xinstall ${worksrcpath}/out/${name}-${goos}-${goarch} \
             ${destroot}${prefix}/bin/${name}
    if {[variant_isset hyperkit]} {
        xinstall -m 4755 \
            ${worksrcpath}/out/docker-machine-driver-hyperkit \
            ${destroot}${prefix}/bin/
    }
}

github.livecheck.regex  {([\d\.]+)}
