mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-09 01:04:38 +02:00
47 lines
1.4 KiB
Text
47 lines
1.4 KiB
Text
maintainer="Michał Polański <michal@polanski.me>"
|
|
pkgname=syft
|
|
pkgver=1.24.0
|
|
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 !ppc64le" # FTBFS on 32-bit arches, ppc64le
|
|
makedepends="go"
|
|
subpackages="
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
source="https://github.com/anchore/syft/archive/v$pkgver/syft-$pkgver.tar.gz"
|
|
options="!check" # tests need docker
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
go build -ldflags "
|
|
-X main.version=$pkgver
|
|
" \
|
|
-o bin/syft ./cmd/syft
|
|
|
|
bin/syft completion bash > $pkgname.bash
|
|
bin/syft completion fish > $pkgname.fish
|
|
bin/syft completion zsh > $pkgname.zsh
|
|
}
|
|
|
|
check() {
|
|
go test ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 bin/syft -t "$pkgdir"/usr/bin/
|
|
|
|
install -Dm644 $pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname
|
|
install -Dm644 $pkgname.fish "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish
|
|
install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname
|
|
}
|
|
|
|
sha512sums="
|
|
b7395ff5a86e5ec0d0db529a093f23fc990697d8b2b008ba90cc44fdba2c36c2215f2b8260bd54ec52ae53db0dfe067af9a4d9bba62c18d3682784be25b84994 syft-1.24.0.tar.gz
|
|
"
|