# -*- 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 4.0.11 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  40e010378c29d29a21767883474eefdcd153948b \
                    sha256  6e42077f7c5981da93322e6caef4a67cdb483ccdce1df11a94ce5536437b7653 \
                    size    11796056

# Allow Go to fetch dependencies at build time
go.offline_build no
go.toolchain_min    1.26.0
build.pre_args-append -ldflags \" \
    -X main.version=v${version} \
    -X main.commit=d7539c2264560a8685f59e89a731d6de833258a6 \
    -X main.date=20260508 \
    \"
build.cmd           "${go.bin} mod tidy && ${go.bin} build"

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