# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=libogg
pkgver=1.3.5
pkgrel=2
pkgdesc='Ogg bitstream and framing library'
arch=(x86_64)
url=https://www.xiph.org/ogg/
license=(BSD)
depends=(glibc)
makedepends=(
  cmake
  git
  ninja
)
provides=(libogg.so)
source=(git+https://github.com/xiph/ogg.git?signed#tag=v${pkgver})
sha256sums=('8ecebc1f247ef0da4d9913e41c5e217fad5e3b311cc74a09469194356cc22d30')

prepare() {
  cd ogg
}

build() {
  cmake -S ogg -B build -G Ninja \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_SHARED_LIBS=ON
  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
  install -Dm 644 ogg/COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}/
  install -Dm 644 ogg/ogg.m4 -t "${pkgdir}"/usr/share/aclocal/
}

# vim: ts=2 sw=2 et:
