# -*- 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
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
build.env-delete    GOPROXY=off GO111MODULE=off

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

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