# -*- 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            codeberg.org/gpanders/ijq 1.4.0 v
go.offline_build    no
go.toolchain_min    1.26
revision            0

description         Interactive jq tool. Like jqplay for the commandline.

long_description    {*}${description}

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

checksums           rmd160  471cec1513562f46ec0f27a61c2d6a33c9d3b9c4 \
                    sha256  3bc925a05755f621926ac21051a257220f924bb7fa6dd85dc1367cd508b391cb \
                    size    3356451

depends_build-append \
                    port:scdoc

depends_run         port:jq

build.args-append   -ldflags \"-s -w -X main.Version=${version}\" \
                    -o ${name}

post-build {
    system -W ${worksrcpath} "scdoc < ${name}.1.scd > ${name}.1"
}

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