aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rav1e/APKBUILD
blob: 242da35bfa8b3e58d3b893e74f63ce8250bb99c0 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=rav1e
pkgver=0.3.3
pkgrel=0
pkgdesc="The fastest and safest AV1 encoder"
url="https://github.com/xiph/rav1e"
arch="all !s390x !mips !mips64" # no cargo for s390x
arch="$arch !x86 !armv7" # tests fail on these archies
license="BSD-2-Clause custom"
makedepends="cargo cargo-c nasm openssl-dev"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/xiph/rav1e/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --locked
}

build() {
	cargo build --release --frozen
	cargo cbuild --release --frozen --prefix /usr
}

check() {
	cargo test --release --frozen
}

package() {
	cargo install \
		--locked \
		--path . \
		--root "$pkgdir/usr"

	cargo-cinstall cinstall \
		--release \
		--frozen \
		--prefix /usr \
		--destdir "$pkgdir"

	install -Dm0644 README.md PATENTS -t "$pkgdir/usr/share/doc/rav1e"

	rm "$pkgdir"/usr/.crates.toml
	rm "$pkgdir"/usr/.crates2.json
}

sha512sums="08d12924441d1276f106ae2103932a926f4ffa3bebea390a987766ef5646e4b2211d4473c62133d0307e7f345a341027db27934b8081852a84fc1bc9ec3911c9  rav1e-0.3.3.tar.gz"