# -*- 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.7.5 v
go.package          github.com/influxdata/influx-cli/v2
go.offline_build    no
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  68bde64adf020452c829783523c25a564b3bdfbd \
                    sha256  2741105c0fa7bf0f728643807aa21e9a8e356b17a681e92f06c4ff680e6944ac \
                    size    443950

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