aboutsummaryrefslogtreecommitdiffstats
path: root/testing/b3sum/APKBUILD
blob: b3c391931000f4658faba7d0b38f8e3ed186b83d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=b3sum
pkgver=0.1.4
pkgrel=0
pkgdesc="Command line implementation of the BLAKE3 hash function"
url="https://blake3.io"
arch="all !s390x !armhf" # armhf: 'vaddq_u32': target specific option mismatch
license="CC0-1.0 OR Apache-2.0"
makedepends="cargo"
source="b3sum-$pkgver.tar.gz::https://crates.io/api/v1/crates/b3sum/$pkgver/download"

case "$CARCH" in
	arm*) _features="c_neon rayon" ;;
	x86_64) _features="c_avx512 rayon" ;;
	*) _features="rayon" ;;
esac

build() {
	cargo build --release --locked --no-default-features --features="$_features"
}

check() {
	cargo test --release --locked --no-default-features --features="$_features"
}

package() {
	cargo install --path . --root="$pkgdir/usr" --no-default-features --features "$_features"
	rm "$pkgdir"/usr/.crates.toml
}

sha512sums="4993f74cba0b7496397225184092c386b03ed32cf10cbe9c30e67e8b5a08978c33940f6f6b24490ad9b1b1d967663e4e46cda6b5acb34a962812f09e1c4205d6  b3sum-0.1.4.tar.gz"