# Contributor:
# Maintainer:
pkgname=libresample
pkgver=0.1.3
pkgrel=1
pkgdesc="real-time library for sampling rate conversion"
url="https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html"
arch="all"
license="GPL"
depends=
makedepends="wget"
install=
subpackages=
source="https://ccrma.stanford.edu/~jos/gz/libresample-$pkgver.tgz"

# append extra dependencies to -dev subpackage
# remove if not used.
# depends_dev="somepackage-dev"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	# apply patches here
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	install -d "$pkgdir"/usr/include "$pkgdir"/usr/lib
	install -m644 include/libresample.h "$pkgdir"/usr/include/
	install -m644 libresample.a "$pkgdir"/usr/lib/

}

sha512sums="c8247a4e86351f61a4f55e66a97bdcb9f21267be97d87748216eec6c3908ebc0c577cd6ee4b86e546062961811039c5aca1e101702bbeb560710045015659ac2  libresample-0.1.3.tgz"