aports/testing/trivy/APKBUILD

32 lines
945 B
Text

# Contributor: TBK <alpine@jjtc.eu>
maintainer="fossdd <fossdd@pwned.life>"
pkgname=trivy
pkgver=0.63.0
pkgrel=0
pkgdesc="Simple and comprehensive vulnerability scanner for containers"
url="https://github.com/aquasecurity/trivy"
arch="all"
license="Apache-2.0"
makedepends="btrfs-progs-dev go linux-headers lvm2-dev"
source="https://github.com/aquasecurity/trivy/archive/v$pkgver/trivy-$pkgver.tar.gz"
options="net !check" # needs tinygo to turn go into wasm for tests
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
go build -o trivy -ldflags "-X main.version=$pkgver" cmd/trivy/main.go
}
check() {
go test ./...
}
package() {
install -Dm755 trivy -t "$pkgdir"/usr/bin/
}
sha512sums="
8207595955bd1e4722456c8eb12df032ff5684c44fd934ba0fff1738981a41db176730aa2b9d66e6ef33b90b9bf50786449213d3bdbfde4e57d89ba4be389ccf trivy-0.63.0.tar.gz
"