# -*- 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/zix99/rare 0.4.2
go.offline_build    no
github.tarball_from archive
revision            0

homepage            https://rare.zdyn.net

description         Realtime regex-extraction and aggregation into common \
                    formats such as histograms, bar graphs, numerical \
                    summaries, tables, and more!

long_description    {*}${description}

categories          textproc
installs_libs       no
license             GPL-3
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  986c66e1866190db66064639dbda04ed5b014c13 \
                    sha256  a4324104f938493fd08f8787a30e484b0c84bced01671d62372694e46c531971 \
                    size    2587174

build.pre_args-append \
    -ldflags    \" -X main.version=${version} \" \
    -tags       urfave_cli_no_docs,rare_no_pprof

post-build {
    # Generate man page
    system -W ${worksrcpath} "${go.bin} run . _gendoc --man > ${name}.1"
}

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/${name}

    xinstall -d ${destroot}${prefix}/share/man/man1
    xinstall -m 0644 \
        ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1/
}

github.livecheck.regex \
                    {([0-9.-]+)}
