# -*- 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/kubetail-org/kubetail 0.12.0 cli/v
github.tarball_from releases
revision            0

distname            kubetail-${version}-vendored

supported_archs     arm64 x86_64

categories          devel
license             Apache-2
maintainers         {kubetail.com:andres @amorey} openmaintainer

description         Real-time logging tool for Kubernetes
long_description    Kubetail is a general-purpose logging tool for Kubernetes, optimized \
                    for tailing logs across multi-container workloads in real-time. With \
                    Kubetail, you can view logs from all the containers in a workload \
                    merged into a single, chronological timeline, in a browser or a \
                    terminal.

checksums           ${distname}${extract.suffix} \
                    rmd160  3697a1e569ce9aa64697c8aefc7026961071e1db \
                    sha256  d81ff1a6972a2c802d88615e5eaf18ddfe16d9db4eee4d62b22dcfb1ea3d5831 \
                    size    21250925

build.env-append GO111MODULE=on \
                 GOWORK=off \
                 CGO_ENABLED=0
build.dir ${worksrcpath}/modules/cli
build.args-append \
    -mod=vendor \
    -ldflags \"-s -w -X ${go.package}/modules/cli/cmd.version=${version}\" \
    -o ../../bin/kubetail

destroot {
    xinstall -m 0755 ${worksrcpath}/bin/kubetail ${destroot}${prefix}/bin/kubetail

    xinstall -d ${destroot}${prefix}/share/doc/${name}
    if {[file exists ${worksrcpath}/LICENSE]} {
        xinstall -m 0644 ${worksrcpath}/LICENSE ${destroot}${prefix}/share/doc/${name}/
    }
}
