# -*- 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.18.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  cc3f268d315646c067349f63bb5d1938ed4dc2e1 \
                    sha256  d75eb044f98b8a3f507d7b08eda109f07346662e7e9f6dfa77a71aa39d4513b5 \
                    size    21369238

build.env-append GO111MODULE=on \
                 GOWORK=off
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}/
    }
}
