# Template file for 'libsamplerate'
pkgname=libsamplerate
version=0.2.2
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="libsndfile-devel fftw-devel"
short_desc="Sample Rate Converter for audio"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="http://www.mega-nerd.com/SRC"
homepage="https://libsndfile.github.io/libsamplerate/"
license="BSD-2-Clause"
distfiles="http://www.mega-nerd.com/SRC/$pkgname-$version.tar.gz"
distfiles="https://github.com/libsndfile/libsamplerate/releases/download/${version}/libsamplerate-${version}.tar.xz"
checksum=3258da280511d24b49d6b08615bbe824d0cacc9842b0e4caf11c52cf2b043893

CFLAGS="-fPIC"

post_install() {
	rm -f ${DESTDIR}/usr/lib/*.la
	vlicense COPYING
}

libsamplerate-devel_package() {
	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
		vmove usr/share/doc
	}
}
