# -*- 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.1 v
set git-commit      c3a4eba5f06ce88a2260d33a909b81f5eb756cd2
# 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  e1171868ee44fd66146b1f961aa84bc876e4de60 \
                    sha256  3e28aa5082b7e83e35e2e8d2b0be30732ac454ac261eb8f315ae8eb30810e6a5 \
                    size    2791402

go.offline_build    no

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
}
