aboutsummaryrefslogtreecommitdiffstats
path: root/testing/b3sum/APKBUILD
blob: ac86e08a76609754fb7bfa56a67f5577acb0da08 (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.3
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="1c98efe8e1f792d3aa70151da80e933a8068dee09ffaa9c9eb62e4e760ad4b78f5b245bcdb6d624587f7fd376e749ee460a8e1584052575724bc17457238f9b5  b3sum-0.1.3.tar.gz"