# -*- 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/stern/stern 1.28.0 v
maintainers         {breun.nl:nils @breun} openmaintainer
platforms           darwin
categories          sysutils
license             Apache-2

description         Multi pod and container log tailing for Kubernetes

long_description    Stern allows you to tail multiple pods on Kubernetes and \
                    multiple containers within the pod. Each result is color \
                    coded for quicker debugging.

checksums           rmd160  ee38124a99f6f26fe091b96243403c056b25459c \
                    sha256  a329f48d0e9708ac10b60f942ba6bfdbf4b8a6c5a04b00bc16beb97579d4cad0 \
                    size    57321

set go_ldflags      "-s -w -X ${go.package}/cmd.version=${version}"
build.args          -ldflags \"${go_ldflags}\" -o bin/${name}

# FIXME: This port currently can't be built without allowing go mod to fetch
# dependencies during the build phase. See
# https://trac.macports.org/ticket/61192
go.offline_build no

destroot {
    xinstall -m 755 ${worksrcpath}/bin/${name} ${destroot}${prefix}/bin/${name}
}
