# -*- 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/kubescape/kubescape 3.0.42 v
revision            0

description         Tool for testing if Kubernetes is deployed securely as \
                    defined in Kubernetes Hardening Guidance by NSA and CISA

long_description    {*}${description}

categories          sysutils security
installs_libs       no
license             Apache-2
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  55cef26067bdbd9fe6c5531649a3e3df6ecdc481 \
                    sha256  6430de50ffecd5396273dd00941f995ace76533cfe5937630c716e27209dd4be \
                    size    9748553

# Allow Go to fetch dependencies at build time
go.offline_build no
build.pre_args-append -ldflags \" \
    -X ${go.package}/v3/core/cautils.BuildNumber=v${version} \
    -X ${go.package}/v3/core/cautils.Client=release \
    \"
build.cmd           "${go.bin} mod tidy && ${go.bin} build"

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