# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: PelPix <kylebloss@pelpix.info>
# Contributor: DrZaius <lou[at]fakeoutdoorsman[dot]com>

pkgname=libfdk-aac
pkgver=2.0.3
pkgrel=1.1
pkgdesc='Fraunhofer FDK AAC codec library'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url=https://sourceforge.net/projects/opencore-amr/
license=(custom)
depends=(glibc)
makedepends=(git)
provides=(libfdk-aac.so)
_tag=716f4394641d53f0d79c9ddac3fa93b03a49f278
source=(git+https://github.com/mstorsjo/fdk-aac.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd fdk-aac
  git describe --tags | sed 's/^v//'
}

prepare() {
  cd fdk-aac
  ./autogen.sh
}

build() {
  cd fdk-aac
  ./configure \
    --prefix=/usr \
    --disable-static
  make
}

package () {
  cd fdk-aac
  make DESTDIR="${pkgdir}" install
  install -Dm 644 NOTICE -t "${pkgdir}"/usr/share/licenses/libfdk-aac/
}

# vim: ts=2 sw=2 et:
