# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=libsndfile
pkgver=1.0.28+170+g22c2fa64
pkgrel=1
pkgdesc="A C library for reading and writing files containing sampled sound"
arch=('x86_64')
url="http://www.mega-nerd.com/libsndfile"
license=('LGPL')
makedepends=('git' 'python' 'autogen')
depends=('alsa-lib' 'flac' 'libvorbis' 'opus')
source=("${pkgname}::git+https://github.com/erikd/libsndfile.git")
sha256sums=('SKIP')
validpgpkeys=('73571E85C19F4281D8C97AA86CA41A7743B8D6C8'
              '6A91A5CF22C24C99A35E013FCFDCF91FB242ACED')

pkgver() {
  cd "${pkgname}"
  git describe --long --tags | sed 's|-|+|g'
}

build() {
  cd "${pkgname}"
  ./autogen.sh
  ./configure --prefix=/usr --disable-sqlite
  make
}

check() {
  cd "${pkgname}"
  make check
}

package() {
  cd "${pkgname}"
  make DESTDIR="${pkgdir}" install
}