aports/testing/trivy/APKBUILD

32 lines
945 B
Text

# Contributor: TBK <alpine@jjtc.eu>
maintainer="fossdd <fossdd@pwned.life>"
pkgname=trivy
pkgver=0.61.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="
cd8ce2ba6dd41e79fd7634d84065ad1e80875a47bc4e84e1ad66bd45f30fc69de62364405ab0abaf132fe905c18dc13107e211dbe5263dca082eff9b8be0df75 trivy-0.61.0.tar.gz
"