# -*- 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/tektoncd/cli 0.46.0 v
go.toolchain_min    1.26.5
name                tektoncd-cli
revision            0

description         A CLI for interacting with Tekton

long_description    \
    The Tekton Pipelines cli project provides a CLI for interacting with \
    Tekton. Tekton is a powerful yet flexible framework for building CI/CD \
    systems on Kubernetes. It lets you build, test, and deploy across \
    multiple cloud providers or on-premises systems by abstracting away the \
    underlying implementation details.

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

checksums           rmd160  570517c186409e49160c521077475a7709277a62 \
                    sha256  26ac3109a265de8917a023e9111e34b59e5f2a0d9d7e6b5b0c543b771b9bcbc4 \
                    size    14304416

patch {
    # Comment out build commands for Linux and Windows.
    reinplace -E "s/(GOOS=(linux|windows) GOARCH=.*)/# \\1/g" \
        ${worksrcpath}/Makefile
}

build.env-delete    GO111MODULE=off

build.cmd           make
build.pre_args      RELEASE_VERSION=${version}
build.args          ${goarch}

destroot {
    xinstall -m 0755 \
        ${worksrcpath}/bin/tkn-darwin-${goarch} ${destroot}${prefix}/bin/tkn

    copy \
        {*}[glob ${worksrcpath}/docs/man/man1/*] \
        ${destroot}${prefix}/share/man/man1/
}
