git » dav1d.git » main » tree

[main] / PKGBUILD

# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgbase=dav1d
pkgname=(dav1d 
#dav1d-doc
)
pkgver=1.4.1
pkgrel=1
pkgdesc='AV1 cross-platform decoder focused on speed and correctness'
url='https://code.videolan.org/videolan/dav1d/'
arch=('armv7h' 'aarch64')
license=('BSD')
makedepends=('meson' 'ninja' 'xxhash')
source=(https://downloads.videolan.org/pub/videolan/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz{,.asc}
        https://code.videolan.org/videolan/dav1d-test-data/-/archive/${pkgver}/dav1d-test-data-${pkgver}.tar.gz)
sha512sums=('51d893d5128eb3bd5c563bee82a1a450296e596763f64c10cea631aeaf655572b72dcab78be2f1e0d998010d7d22eb376b64603e5f568efe16d75eb5efaeac35'
            'SKIP'
            '61d60a5004e12ac104de0ce24f6ae823180c16fbf1ff90576075f9c853055e4d48db46fd7370182487b27c9e85d194a45734a3200848ac85b181778e0fc12a65')
b2sums=('6d8ddd4ef25055b8de33aa7608085e6569cb9e47ed312c9f57119c8961fd532d786e12722aa550b5f4584a9cca95022ac138b714e2a22b05547713465e43ed56'
        'SKIP'
        '0ae3e99b19d5819c82000c3c045db0ba55fc27f4e4807aef87564c2ce0894bed5aae8ce896a941a7e9629c1ae1fc42408a5807b1862912a3f9cb7dd402197339')
validpgpkeys=('65F7C6B4206BD057A7EB73787180713BE58D1ADC') # VideoLAN Release Signing Key

prepare() {
  cd ${pkgbase}-${pkgver}
  ln -s "${srcdir}/dav1d-test-data-${pkgver}" tests/dav1d-test-data
}

build() {
  cd ${pkgbase}-${pkgver}
  arch-meson \
    -Dtestdata_tests=true \
    -Denable_docs=false \
    build
  ninja -C build all
}

check() {
  cd ${pkgbase}-${pkgver}/build
  meson test
}

package_dav1d() {
  depends=('glibc')
  provides=('libdav1d.so')
#  optdepends=('dav1d-doc: HTML documentation')

  cd ${pkgbase}-${pkgver}
  DESTDIR="${pkgdir}" ninja -C build install
  install -Dm 644 README.md CONTRIBUTING.md NEWS -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

#package_dav1d-doc() {
#  pkgdesc+=" (documentation)"

#  cd ${pkgbase}-${pkgver}
#  install -d "${pkgdir}/usr/share/doc/${pkgbase}"
#  cp -r build/doc/html -t "${pkgdir}/usr/share/doc/${pkgbase}"
#  install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
#}

# vim: ts=2 sw=2 et: