aports/testing/syft/APKBUILD
2022-05-16 17:37:00 +02:00

36 lines
978 B
Plaintext

# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=syft
pkgver=0.46.1
pkgrel=0
pkgdesc="Generate a Software Bill of Materials (SBOM) from container images and filesystems"
url="https://github.com/anchore/syft"
license="Apache-2.0"
arch="all !armhf !armv7 !x86" # FTBFS on 32-bit arches
makedepends="go"
source="https://github.com/anchore/syft/archive/v$pkgver/syft-$pkgver.tar.gz"
options="!check" # tests need docker
export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
export GOPATH="$srcdir"
export CGO_ENABLED=0
build() {
go build -ldflags "-s -w
-X github.com/anchore/syft/internal/version.version=$pkgver
" \
-o bin/syft ./cmd/syft
}
check() {
go test ./...
}
package() {
install -Dm755 bin/syft "$pkgdir"/usr/bin/syft
}
sha512sums="
14fb04aff7e2785fb1ac020272a8e55af380ee2bb3ba960eeed901b652d1d7b29f4e2a4da4d985fc197d1a7b1e0732dbb33839eaef6e77e7b07fa82444e4fcd5 syft-0.46.1.tar.gz
"