archrelease: copy trunk to extra-x86_64
[arch-packages.git] / rav1e / trunk / PKGBUILD
blob251251cadfea4e590e8576c1afd6ae19ef6363b6
1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Daniel Bermond <dbermond@archlinux.org>
3 # Contributor: Chocobo1 <chocobo1@archlinux.net>
5 pkgname=rav1e
6 pkgver=0.6.3
7 pkgrel=1
8 pkgdesc='An AV1 encoder focused on speed and safety'
9 arch=(x86_64)
10 url=https://github.com/xiph/rav1e/
11 license=(BSD)
12 depends=(
13   gcc-libs
14   glibc
15   libgit2.so
17 makedepends=(
18   cargo-c
19   git
20   nasm
21   rust
23 provides=(librav1e.so)
24 _tag=bc155a5801a0d402b16cd42ca1392168d299b70b
25 source=(
26   git+https://github.com/xiph/rav1e.git#tag=${_tag}
27   Cargo-rav1e-${pkgver}.lock::https://github.com/xiph/rav1e/releases/download/v${pkgver}/Cargo.lock
29 b2sums=('SKIP'
30         '8a4c208534dcc2b6f272eb154aad5b01767b6d09c82735109646173efdda5cf4ed2d4775d437af5aa70cbc3e937d4f5c55eac4738c52441c3fdec7ee7e65ac38')
32 pkgver() {
33   cd rav1e
34   git describe --tags | sed 's/^v//'
37 prepare() {
38   cp -f Cargo-rav1e-${pkgver}.lock rav1e/Cargo.lock
39   cargo fetch \
40     --locked \
41     --manifest-path rav1e/Cargo.toml
44 build() {
45   export LDFLAGS+=' -lgit2'
46   cargo build \
47     --release \
48     --frozen \
49     --manifest-path rav1e/Cargo.toml
50   cargo cbuild \
51     --release \
52     --frozen \
53     --prefix=/usr \
54     --manifest-path rav1e/Cargo.toml
57 check() {
58   cargo test \
59     --release \
60     --frozen \
61     --manifest-path rav1e/Cargo.toml
64 package() {
65   cd rav1e
66   cargo install \
67     --frozen \
68     --offline \
69     --no-track \
70     --path . \
71     --root "${pkgdir}"/usr
72   cargo cinstall \
73     --release \
74     --frozen \
75     --prefix /usr \
76     --destdir "${pkgdir}"
77   install -Dm 644 LICENSE PATENTS -t "${pkgdir}"/usr/share/licenses/rav1e/
80 # vim: ts=2 sw=2 et: