# Template file for 'trivy'
pkgname=trivy
version=0.70.0
revision=1
build_style=go
go_import_path="github.com/aquasecurity/trivy"
go_package="${go_import_path}/cmd/trivy"
go_ldflags="-X ${go_import_path}/pkg/version/app.ver=$version"
short_desc="Comprehensive vulnerability scanner for containers"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://github.com/aquasecurity/trivy"
changelog="https://raw.githubusercontent.com/aquasecurity/trivy/refs/heads/main/CHANGELOG.md"
distfiles="https://github.com/aquasecurity/trivy/archive/refs/tags/v${version}.tar.gz"
checksum=ff9ac06468aab89802388f16d1d179f4680db714afbf6a8132a417d288aa008e

# those tests are wrong and expect `dev` instead of the version.
make_check_args="-run !(^(Test_showVersion|TestPrintVersion)$)"

# fix: collect2: fatal error: cannot find 'ld'
export GOEXPERIMENT=jsonv2
export LDFLAGS="-fuse-ld=bfd" # aarch64*: collect2: fatal error: cannot find 'ld'
