NAME="libaom"
DESC="Library used for encoding and decoding AVIF files"
VERSION="3.6.1"
FILES=("https://storage.googleapis.com/aom-releases/libaom-$VERSION.tar.gz")
HASHES=("e5b1843484eb9873666b878e03d8160b")
DEPENDS=()

PACKAGE() {
  tar xf $NAME-$VERSION.tar.gz
  cd $NAME-$VERSION

  mkdir aom-build
  cd    aom-build

  cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release    \
      -DBUILD_SHARED_LIBS=1         \
      -DENABLE_DOCS=no              \
      -G Ninja ..
  ninja && DESTDIR="$ROOTDIR" ninja install
  rm -v "$ROOTDIR/usr/lib/libaom.a"

  cd ../.. && rm -r $NAME-$VERSION
}
