# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=sbc
pkgver=1.5
pkgrel=2
pkgdesc="Bluetooth Subband Codec (SBC) library"
url="https://git.kernel.org/pub/scm/bluetooth/sbc.git"
arch=(x86_64)
license=(GPL LGPL)
depends=(glibc)
makedepends=(git)
provides=(libsbc.so)
_commit=b2c20a3ecf5ed00f63c94077a9762b505935ede9  # tags/1.5^0
source=("git+$url#commit=$_commit")
sha512sums=('SKIP')

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

prepare() {
  cd $pkgname
  autoreconf -fvi
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --disable-static --disable-tester
  make
}

check() {
  cd $pkgname
  make check
}

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