PKGBUILDs/extra/aom/PKGBUILD

49 lines
1.2 KiB
Bash
Raw Normal View History

2020-12-11 01:00:36 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2018-10-03 12:50:16 +00:00
# Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - cmake with -DAOM_TARGET_CPU=generic for !AArch64
pkgname=aom
2021-02-11 23:31:29 +00:00
pkgver=2.0.2
2018-10-03 12:50:16 +00:00
pkgrel=1
pkgdesc="Alliance for Open Media video codec"
url="https://aomedia.org/"
arch=(x86_64)
license=(BSD custom:PATENTS)
depends=(gcc-libs)
2020-02-22 02:38:07 +00:00
makedepends=(git cmake ninja doxygen yasm)
provides=(libaom.so)
2021-02-11 23:31:29 +00:00
_commit=cb1d48da8da2061e72018761788a18b8fa8013bb # tags/v2.0.2^0
2018-10-03 12:50:16 +00:00
source=("git+https://aomedia.googlesource.com/aom#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
cd $pkgname
2019-07-25 13:50:46 +00:00
git describe --tags | sed 's/^v//;s/-errata/.errata/;s/-/+/g'
2018-10-03 12:50:16 +00:00
}
prepare() {
cd $pkgname
}
build() {
[[ $CARCH != "aarch64" ]] && CONFIG="-DAOM_TARGET_CPU=generic"
2020-12-11 01:00:36 +00:00
cmake -S $pkgname -B build -G Ninja \
2018-10-03 12:50:16 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=1 \
-DENABLE_TESTS=0 $CONFIG
2020-02-22 02:38:07 +00:00
cmake --build build
2018-10-03 12:50:16 +00:00
}
package() {
2020-12-11 01:00:36 +00:00
DESTDIR="$pkgdir" cmake --install build
2018-10-03 12:50:16 +00:00
mkdir -p "$pkgdir/usr/share/doc"
cp -r build/docs/html "$pkgdir/usr/share/doc/$pkgname"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgname/{LICENSE,PATENTS}
}
# vim:set et sw=2: