# $Id: PKGBUILD 150528 2012-02-18 12:08:44Z pierre $
# Maintainer: 
# Contributor Sarah Hay <sarahhay@mb.sympatico.ca>

pkgname=libcdaudio
pkgver=0.99.12
pkgrel=6
pkgdesc="Library for controlling Audio CDs and interacting with CDDB"
arch=('i686' 'x86_64')
url="http://libcdaudio.sourceforge.net/"
license=('GPL')
depends=('glibc')
options=('!libtool')
source=("http://downloads.sourceforge.net/sourceforge/libcdaudio/${pkgname}-${pkgver}.tar.gz"
        '01-cddb-bufferoverflow.patch'
        '02-cddb-bufferoverflow.patch')
md5sums=('63b49cf14d53eed31e7a87cca17a3963'
         'f78c881b92cd7d25472daa90af284e18'
         'e36755c125d2710dc8619bb401e37444')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np1 -i "${srcdir}/01-cddb-bufferoverflow.patch"
  patch -Np1 -i "${srcdir}/02-cddb-bufferoverflow.patch"
  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}