# -*- 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/bcicen/ctop 0.7.6
# Delete this on next update to use golang PortGroup's default ('archive')
github.tarball_from tarball
revision            1

categories          sysutils devel
license             MIT
maintainers         {judaew @judaew} openmaintainer

description         Top-like interface for container metrics
long_description    \
    ctop provides a concise and condensed overview of real-time metrics for \
    multiple containers.\nctop comes with built-in support for Docker and \
    runC\; connectors for other container and cluster systems are planned for \
    future releases.
homepage            https://ctop.sh

checksums           rmd160  918d9e1dff8e57aaf7226b4fd0af0af6df425707 \
                    sha256  9ef8c582c0a24ed2a89fe0a03745b709e03bb67bb371de364f54a38d24a43ce6 \
                    size    1437218

# Suppress build date for reproducible builds
# Switch to SOURCE_DATE_EPOCH approach in the future
# See https://trac.macports.org/ticket/59672
set build_date      SUPPRESSED

# FIXME: This port currently can't be built without allowing go mod to fetch
go.offline_build no

build.cmd           make
build.pre_args      VERSION=${version} BUILD=${build_date}
build.args          build

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