# -*- 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/kops 1.34.1 v
go.offline_build    no
revision            0
go.package          k8s.io/kops

description         Kubernetes Operations (kops)
long_description    Production Grade K8s Installation, Upgrades, and Management

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

checksums           rmd160  6adbf6d590509f31a8772a35d8c89aab201767e2 \
                    sha256  f6b61d7be1aeafc4f320b289c5d63bd405ef2f8abbc0ced57f7c1c10e42b51ac \
                    size    38864917

depends_run-append  port:kubectl-1.32

build.cmd           make
build.target        kops

# Do not build on macOS 10.11 and earlier
if {${os.platform} eq "darwin" && ${os.major} < 16} {
    known_fail yes

    pre-fetch {
        ui_error "${name} does not build on macOS 10.11 and earlier"
        return -code error "unsupported platform version"
    }
}

destroot {
    xinstall -m 0755 \
        {*}[glob ${worksrcpath}/.build/dist/${goos}/${goarch}/kops] \
        ${destroot}${prefix}/bin
}

github.livecheck.regex  {([0-9.]+)}
