# -*- 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.12 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  dd36e7f54032acd668803296738dfa46aead3267 \
                    sha256  fff670f6c3bd532b91ab98621bba199861d3baa43a114eb76861a58c0cce1618 \
                    size    12113515

# 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=469969f6bebf46bef5e808b91a4bb46fb2bbf4ed \
    -X main.date=20260812 \
    \"
build.cmd           "${go.bin} mod tidy && ${go.bin} build"

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