# -*- 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.33.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  8c711166606c233b20fc9847cbaae21b42ef28f7 \
                    sha256  0dd1a190b35669d28bd6ec8f78497ab4a418911a648bc71d2ed9de98e742bcd9 \
                    size    39183016

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.]+)}
