# -*- 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.35.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  12b0a258abb7084774c6cf0e4c89a03065423777 \
                    sha256  deed90394c3955bca86a068bc52c38a71764e4502eee7ff21c335f01ac8a8a5d \
                    size    38790188

depends_run-append  port:kubectl-1.35

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