summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 80cd2a7ce00d12c0a11a28ed48df3929ccb36e15 (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
55
56
57
58
59
60
# Maintainer : Jeremy Lee Shields <jeremy.shields@orange.fr>
# Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=aom-vmaf-git
pkgver=r31096.g962b35e8eb
pkgrel=1
pkgdesc="An open, royalty-free video coding format designed for video transmissions over the Internet with support for vmaf"
arch=('i686' 'x86_64')
url="https://aomedia.org/"
license=('BSD' 'custom:PATENTS')
depends=('gcc-libs')
makedepends=('git' 'cmake' 'perl' 'yasm' 'doxygen' 'graphviz')
checkdepends=('python' 'vmaf')
provides=('aom')
conflicts=('aom')
source=("git+https://aomedia.googlesource.com/aom")
sha256sums=('SKIP')


pkgver() {
  cd "aom"

  _rev=$(git rev-list --count --all)
  _hash=$(git rev-parse --short HEAD)
  printf "r%s.g%s" "$_rev" "$_hash"
}

build() {
  cd "aom"

  #curl -L "https://aomedia-review.googlesource.com/changes/aom~116821/revisions/4/patch?download" | base64 -d | patch -p1
  mkdir -p "_build" && cd "_build"
  sed -i 's/libvmaf.a//' ../CMakeLists.txt
  cmake \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCONFIG_TUNE_VMAF=1 \
    -DBUILD_SHARED_LIBS=1 \
    ../
  make
}

check() {
  cd "aom/_build"

  #make runtests
}

package() {
  cd "aom/_build"

  make DESTDIR="$pkgdir" install

  install -d "$pkgdir/usr/share/doc/$pkgname"
  cp -R "docs/." "$pkgdir/usr/share/doc/$pkgname"

  install -Dm644 "$srcdir/aom/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 "$srcdir/aom/PATENTS" "$pkgdir/usr/share/licenses/$pkgname/PATENTS"
}