PKGBUILDs/extra/dav1d/PKGBUILD
2021-08-08 16:27:45 -04:00

62 lines
2.3 KiB
Bash

# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable assembly on v5/v6
pkgbase=dav1d
pkgname=(dav1d dav1d-doc)
pkgver=0.9.1
pkgrel=1
pkgdesc='AV1 cross-platform decoder focused on speed and correctness'
url='https://code.videolan.org/videolan/dav1d/'
arch=('x86_64')
license=('BSD')
makedepends=('meson' 'ninja' 'nasm' 'doxygen' 'graphviz' '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=('672708b07c389f21968b3d91be4547483f8c0d3b5d41e916503798896ab88212bafa3ca8c229624cbbbe5fdcfcb4f26f19ed8ce9ce1c9f8a217174fe397b6a35'
'SKIP'
'e1e4f7c1731228526cda843a143e178e1174b565acd44cbd03e69451f750c9d2547d9e0da15cff190149e01208c1808bdc4af143fa51faa42c9c3d93c538b712')
b2sums=('41a8c4bf1b21432bd01b9ef2ea102e24c4c0a7cdf2070a665567ae861acfabb5242028ef758ea4bb420b6b0f9b3c9fd5bd056c766910864a6e24184747c2e27b'
'SKIP'
'89e3c725c29670395624835d890a0b008a867bdc72eacad1f3631d596253cf3bd0d3135abc729a67326ef03fa60b5bf231fd27753f9d6e0f37cecfddbe6e9b80')
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}
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && meson_options="-Dbuild_asm=false"
arch-meson -Dtestdata_tests=true $meson_options build
ninja -C build all doc/html
}
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: