PKGBUILDs/extra/aom/PKGBUILD
2021-04-07 14:10:38 +00:00

47 lines
1.3 KiB
Bash

# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - cmake with -DAOM_TARGET_CPU=generic for !AArch64
pkgbase=aom
pkgname=(aom aom-docs)
pkgver=3.0.0
pkgrel=1
pkgdesc="Alliance for Open Media video codec"
url="https://aomedia.org/"
arch=(x86_64)
license=(BSD custom:PATENTS)
depends=(gcc-libs)
makedepends=(git cmake ninja doxygen yasm)
source=("$pkgbase-$pkgver.tar.gz::https://aomedia.googlesource.com/aom/+archive/v$pkgver.tar.gz")
b2sums=('572af4b99669f2aff52748446fe985373fdfabe9dedfcc484c8346937a6adb80c60e251126ca529c75f6ace24c6c9a9d71bbf7eede49f07a97fde57ee04494ad')
build() {
[[ $CARCH != "aarch64" ]] && CONFIG="-DAOM_TARGET_CPU=generic"
cmake -S . -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=1 \
-DENABLE_TESTS=0 $CONFIG
cmake --build build
}
package_aom() {
provides=(libaom.so)
DESTDIR="$pkgdir" cmake --install build
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE PATENTS
}
package_aom-docs() {
pkgdesc+=" (documentation)"
depends=()
mkdir -p "$pkgdir/usr/share/doc"
cp -r build/docs/html "$pkgdir/usr/share/doc/$pkgname"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE PATENTS
}
# vim:set et sw=2: