# -*- 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/aquasecurity/trivy 0.68.1 v
go.offline_build    no
revision            0

description         \
    A Simple and Comprehensive Vulnerability Scanner for Containers, Suitable \
    for CI

long_description    \
    {*}${description}. Trivy detects vulnerabilities of OS packages (Alpine, \
    RHEL, CentOS, etc.) and application dependencies (Bundler, Composer, npm, \
    yarn, etc.). Trivy is easy to use. Just install the binary and you're \
    ready to scan. All you need to do for scanning is to specify a target \
    such as an image name of the container.

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

fetch.type          git

depends_build-append \
                    port:goreleaser

build.cmd           goreleaser
build.args          build --single-target

platform darwin {
    build.args-append --id=build-macos
}

platform linux {
    build.args-append --id=build-linux
}

platform freebsd {
    build.args-append --id=build-bsd
}

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