# -*- 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.0 v
set git-commit      7a84606a8f2ff7b6ff544cb74f024c97a1a01562
# 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  6520b7807ead733b1cfd8daa793ec48ad2011b80 \
                    sha256  dce5f0fe15a6de590f44b6c2d09e282300e30cb52eaff3e44c6643c960203cee \
                    size    2781461

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 'main.version=${version}' \
                              -X 'main.commit=${git-commit}' \
                              -X 'main.buildDate=${time}'"


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