# -*- 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.2 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  4887c28ef6433557c1b6148145ec3a0712f77ee2 \
                    sha256  1c19df50facbf5374fbd6fc04edb20437e2605c712b592a8fb5dfed033fead5c \
                    size    3356627

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