# -*- 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/pranshuparmar/witr 0.3.4 v
set git-commit      7e46fa68151fd7c59fb7a0cf4247a9a0ac0fbb6e
# This line is for displaying commit in CLI only
revision            0
categories          sysutils
license             Apache-2
maintainers         {i0ntempest @i0ntempest} openmaintainer

description         Why is this running?
long_description    ${name} exists to answer a single question: {*}${description}\
                    It explains where a running thing came from, how it was started,\
                    and what chain of systems is responsible for it existing right now,\
                    in a single, human-readable output or an interactive TUI dashboard.

checksums           rmd160  cb2e1bed6e8ce1c32e1043f844b5d5122b4baf4a \
                    sha256  5f5d275b39054c7e879749e5d411bb4cf7ac50e023fd4f8890d69ce7085bc83f \
                    size    3261604

go.offline_build    no
go.toolchain_min    1.25

set time [clock format [clock seconds] -gmt true -format "%Y-%m-%dT%H:%M:%SZ"]
build.args          -o ./${name}
build.post_args     -ldflags="-s -w \
                              -X '${go.package}/internal/version.Version=${github.tag_prefix}${version}' \
                              -X '${go.package}/internal/version.Commit=${git-commit}' \
                              -X '${go.package}/internal/version.BuildDate=${time}'"

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