# -*- 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/influxdata/influx-cli 2.9.1 v
go.package          github.com/influxdata/influx-cli/v2
go.offline_build    no
go.toolchain_min    1.27.0
revision            0

description         CLI for managing resources in InfluxDB v2
long_description    {*}${description}

categories          sysutils
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  b6d4ae988b2d7fc60f52e87428219064c35f78e5 \
                    sha256  5a16c3866640518339a31fe03a25c341f6f9ae5c2fbd149c5bc47e95e6e9e8b9 \
                    size    446402

# All gopath/bin to PATH
build.env-append    PATH=$env(PATH):${gopath}/bin

build.cmd           make
build.pre_args-append \
                    VERSION=${version}
build.args          influx

destroot {
    xinstall -m 0755 \
        {*}[glob ${worksrcpath}/bin/${goos}/*/influx] \
        ${destroot}${prefix}/bin/
}
