# Maintainer: SpepS <dreamspepser at yahoo dot it>
pkgname=rtaudio
pkgver=4.0.10
pkgrel=2
pkgdesc="A set of C++ classes that provide a common API for realtime audio input/output."
arch=(i686 x86_64)
url="http://www.music.mcgill.ca/~gary/rtaudio/"
license=('GPL')
depends=('jack')
makedepends=('python2-distribute')
optdepends=('python2: python bindings')
source=("${url}release/${pkgname}-${pkgver}.tar.gz")
md5sums=('68fc7fead74762e5fa3e8aa69ae1c10d')
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr --with-alsa --with-oss --with-jack && make
cd tests && make
# python bindings
cd ../contrib/python/pyrtaudio
CFLAGS="$CFLAGS -I../../../include" \
python2 setup.py build
}
package() {
cd "$srcdir/$pkgname-$pkgver"
# lib
install -Dm755 librtaudio.so "$pkgdir/usr/lib/librtaudio.so"
# configuration utility
install -Dm755 rtaudio-config "$pkgdir/usr/bin/rtaudio-config"
# docs
install -d "$pkgdir"/usr/{include,share/doc}/$pkgname
cp -a doc/{html,images,release.txt} "$pkgdir/usr/share/doc/$pkgname"
# headers
install *.h include/* "$pkgdir/usr/include/$pkgname"
# utilities and tests
for _ex in `find tests -maxdepth 1 -perm 755 -type f`; do
install -Dm755 $_ex "$pkgdir/usr/bin/$pkgname-${_ex/*\//}"
done
# python bindings
cd contrib/python/pyrtaudio && python2 setup.py install --root="$pkgdir/"
# python sample
install -Dm644 PyRtAudioTest.py "$pkgdir/usr/share/doc/$pkgname/"
# gcc 4.6 header fix
sed -i "/inline/s/;$//" "$pkgdir/usr/include/$pkgname/RtAudio.h"
}
# vim:set ts=2 sw=2 et: