summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7eb7ee19efeef29f89bc04025aba242337fce804 (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
46
47
48
49
50
51
52
53
54
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=rav1e-git
pkgver=r658.4f93ef7
pkgrel=1
pkgdesc="The fastest and safest AV1 encoder"
arch=('i686' 'x86_64')
url="https://github.com/xiph/rav1e"
license=('custom' 'BSD')
depends=('gcc-libs')
makedepends=('git' 'cargo'
  # aom dependency
  'cmake' 'perl' 'nasm')
# aom dependency
checkdepends=('python')
provides=('rav1e')
conflicts=('rav1e')
source=("git+https://github.com/xiph/rav1e.git")
sha256sums=('SKIP')


prepare() {
  cd "rav1e"

  git submodule update --init #--depth 1
}

pkgver() {
  cd "rav1e"

  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "rav1e"

  cargo build --release
}

check() {
  cd "rav1e"

  cargo test --release
}

package() {
  cd "rav1e"

  install -Dm755 "target/release/rav1e" "$pkgdir/usr/bin/rav1e"

  install -Dm644 "README.md" "$pkgdir/usr/share/doc/rav1e/README.md"
  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/rav1e/LICENSE"
  install -Dm644 "PATENTS" "$pkgdir/usr/share/licenses/rav1e/PATENTS"
}