PKGBUILDs/extra/aom/PKGBUILD
2023-12-07 13:51:13 +00:00

79 lines
1.7 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.8.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=(
cmake
doxygen
ninja
yasm
)
source=(
https://storage.googleapis.com/aom-releases/libaom-$pkgver.tar.gz{,.asc}
)
b2sums=('276e50c134a5a5925591cbc5c76a11383d288854bc5f4db79d97f1e4e41e74f5739ee916df127112cb678673f09aeb5dfa91f1d8696b0894923837cea991bd73'
'SKIP')
validpgpkeys=(
B002F08B74A148DAA01F7123A48E86DB0B830498 # AOMedia release signing key <av1-discuss@aomedia.org>
)
prepare() {
cd libaom-$pkgver
}
build() {
[[ $CARCH != "aarch64" ]] && CONFIG="-DAOM_TARGET_CPU=generic"
local cmake_options=(
-D CMAKE_INSTALL_PREFIX=/usr
-D CMAKE_BUILD_TYPE=None
-D BUILD_SHARED_LIBS=1
-D ENABLE_TESTS=0
$CONFIG
)
# Upstream would like -O3
CFLAGS="${CFLAGS/-O2/-O3}"
CXXFLAGS="${CXXFLAGS/-O2/-O3}"
cmake -S libaom-$pkgver -B build -G Ninja "${cmake_options[@]}"
cmake --build build
}
package_aom() {
provides=(libaom.so)
DESTDIR="$pkgdir" cmake --install build
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libaom-$pkgver/{LICENSE,PATENTS}
}
package_aom-docs() {
pkgdesc+=" (documentation)"
depends=()
mkdir -p "$pkgdir/usr/share/doc"
cp -r build/docs/html "$pkgdir/usr/share/doc/$pkgbase"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libaom-$pkgver/{LICENSE,PATENTS}
}
# vim:set sw=2 sts=-1 et: