# -*- 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.8.0 v
go.package          github.com/influxdata/influx-cli/v2
go.offline_build    no
go.toolchain_min    1.25
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  8ecc9d23896856a4ca6f84374fc8782b71feaeb0 \
                    sha256  a507a4d0a0f4858d575f5a5c343c0f80e00151715c381d8be402c8bb6c9b8769 \
                    size    445820

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