# -*- 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/anchore/grype 0.86.0 v
go.offline_build    no
revision            0

description         \
    A vulnerability scanner for container images and filesystems

long_description    \
    A vulnerability scanner for container images and filesystems. Works with \
    Syft, the powerful SBOM (software bill of materials) tool for container \
    images and filesystems.

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

fetch.type          git

depends_build-append \
                    port:goreleaser


build {
    system -W ${worksrcpath} \
        {
            goreleaser build    --single-target \
                                --id=darwin-build \
                                --skip=post-hooks \
                                --skip=validate
        }
}

destroot {
    xinstall -m 0755 \
        {*}[glob ${worksrcpath}/dist/*darwin*/${name}] \
        ${destroot}${prefix}/bin/
}
