# -*- 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/patriceckhart/hrdx 0.0.33 v
go.offline_build    no
go.toolchain_min    1.25.0
revision            0

homepage            https://hrdx.dev

description         Minimal terminal multiplexer built for the agent era

long_description    ${name} is an experimental, minimal and lightweight \
                    terminal multiplexer: your projects are workspaces in a \
                    sidebar, with tabs per workspace and real PTY panes \
                    running coding agent CLIs or plain shells side by side. \
                    Sidebar spinners show which agents are still working, \
                    sessions survive quitting and relaunching, and any agent \
                    CLI can be registered as a custom harness. A JSON socket \
                    API lets scripts and editors drive panes from outside.

categories          sysutils
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  a73d3107549e245742724654295df01e862fcc88 \
                    sha256  17214536621ea5c3e918d22d8fe57ff75e66291e43c4521a4dcefc1997ae0ab9 \
                    size    266716

build.env-append    CGO_ENABLED=0
build.args-append   -trimpath \
                    -ldflags \"-s -w -X main.version=${version}\" \
                    -o ${name}
build.post_args-append \
                    ./cmd/${name}

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

    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}/themes
    xinstall -m 0644 -W ${worksrcpath} LICENSE README.md ${destroot}${docdir}
    xinstall -m 0644 ${worksrcpath}/examples/themes/vercel.json \
        ${destroot}${docdir}/themes
}

notes "
hrdx drives agent CLIs such as codex, claude, pi or zot; install at least one
of them, or use plain shell panes.

Do not run \"hrdx update\": it replaces the binary in place, outside of
MacPorts. Use \"port upgrade hrdx\" instead.
"
