# -*- 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.5.2
go.package          rare
go.offline_build    no
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  8908fb174b4c3acda650f4ed35f2d95546675a62 \
                    sha256  4bab3448b7865f38793bfb12b49e883866ca4c32a1157c89d1452d69cf0833a5 \
                    size    2703190

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.-]+)}
