# -*- 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.1 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  581c27f1914759d838acc628ee682954f5ccd5b5 \
                    sha256  5a4397999a6dd7f3c31e6f907de7137ee9a1fa24e7a425718ce50f035b262036 \
                    size    3356626

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