archrelease: copy trunk to extra-x86_64
[arch-packages.git] / aom / repos / extra-x86_64 / PKGBUILD
blob750419583ec3aa240828eda7e0d27e11f0b9bc67
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>
4 pkgbase=aom
5 pkgname=(
6   aom
7   aom-docs
9 pkgver=3.6.1
10 pkgrel=1
11 pkgdesc="Alliance for Open Media video codec"
12 url="https://aomedia.org/"
13 arch=(x86_64)
14 license=(
15   BSD
16   custom:PATENTS
18 depends=(
19   gcc-libs
21 makedepends=(
22   cmake
23   doxygen
24   ninja
25   yasm
27 source=(
28   https://storage.googleapis.com/aom-releases/libaom-$pkgver.tar.gz{,.asc}
30 b2sums=('c47b748e3dc43e39ecb55c4d61ea3d2d4a889bb8c6c399e29e14269757d271cd759a553f5da765bcdf7cd19546b408fce060d5ed3fb13e3aba4f8d22d612bf29'
31         'SKIP')
32 validpgpkeys=(
33   B002F08B74A148DAA01F7123A48E86DB0B830498 # AOMedia release signing key <av1-discuss@aomedia.org>
36 prepare() {
37   cd libaom-$pkgver
40 build() {
41   local cmake_options=(
42     -DCMAKE_INSTALL_PREFIX=/usr
43     -DCMAKE_BUILD_TYPE=None
44     -DBUILD_SHARED_LIBS=1
45     -DENABLE_TESTS=0
46   )
48   # Upstream would like -O3
49   CFLAGS="${CFLAGS/-O2/-O3}"
50   CXXFLAGS="${CXXFLAGS/-O2/-O3}"
52   cmake -S libaom-$pkgver -B build -G Ninja "${cmake_options[@]}"
53   cmake --build build
56 package_aom() {
57   provides=(libaom.so)
59   DESTDIR="$pkgdir" cmake --install build
61   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libaom-$pkgver/{LICENSE,PATENTS}
64 package_aom-docs() {
65   pkgdesc+=" (documentation)"
66   depends=()
68   mkdir -p "$pkgdir/usr/share/doc"
69   cp -r build/docs/html "$pkgdir/usr/share/doc/$pkgbase"
71   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libaom-$pkgver/{LICENSE,PATENTS}
74 # vim:set sw=2 sts=-1 et: