aboutsummaryrefslogtreecommitdiffstats
path: root/testing/asuran-cli/APKBUILD
blob: 746981fb0111dc1094ab1e8144f1d0c78b840294 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=asuran-cli
pkgver=0.1.6
pkgrel=3
pkgdesc="Asuran is a new archive format and rust implementation"
url="https://gitlab.com/asuran-rs/asuran"
arch="all !s390x !riscv64"
license="BSD-2-Clause-Patent"
makedepends="cargo openssl-dev"
source="https://gitlab.com/asuran-rs/asuran/-/archive/v$pkgver/asuran-v$pkgver.tar.gz
	openssl3.patch
	"
builddir="$srcdir/asuran-v$pkgver"

build() {
	local _rf=
	local _f=
	case "$CARCH" in
		x86_64)	  _rf="-C target-feature=+aes $_rf" ;;
		aarch64*) _rf="-C target-feature=+aes $_rf"
			  _f="--features blake3-neon" ;;
	esac

	export RUSTFLAGS=$_rf

	cd asuran-cli
	cargo build --release --locked $_f
}

check() {
	cargo test all --release --locked
}

package() {
	cd asuran-cli
	cargo install --locked --path . --root="$pkgdir/usr"
	rm "$pkgdir"/usr/.crates.toml
	rm "$pkgdir"/usr/.crates2.json
}

sha512sums="
2345b9ad0daedc4b21707bcdae72f7678f8e8d7adb470f78088ceb88f8ca18d1661bc5126d6199d5e904b528c7b5b50e9f8c3d770b28b72fcad64c17e9b87add  asuran-v0.1.6.tar.gz
d2a9d1415bf7caf95448d3068298d162359c76b27faf5ea2c62c7da9854f536bdcc7f0a3eabe95474a5f11926109978ba47a2b1aaf2dfa5d8d529c8e535457e0  openssl3.patch
"