# -*- 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.10.1 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  5e02aff80aef29ef9b0f7adc7d877d8bc9451cf2 \
                    sha256  e6ea584bdd1fa20f35059bf97ffce8c42998e70d905b5660991090c2a52e9b8f \
                    size    21426066

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}/
    }
}
