# Template file for 'ffado'
pkgname=libffado
version=2.2.1
revision=2
build_style=scons
make_build_args="PREFIX=/usr MANDIR=/usr/share/man UDEVDIR=/usr/lib/udev/rules.d CUSTOM_ENV=1 BUILD_TESTS=0 ENABLE_OPTIMIZATIONS=0 WILL_DEAL_WITH_XDG_MYSELF=1"
make_install_args="${make_build_args}"
hostmakedepends="scons pkg-config"
makedepends="libxml++-devel libdbus-c++-devel libsigc++-devel libconfig++-devel
 jack-devel libavc1394-devel libiec61883-devel libraw1394-devel alsa-lib-devel"
short_desc="Library for accessing BeBoB IEEE1394 devices"
maintainer="Duncaen <mail@duncano.de>"
license="GPL-3"
homepage="http://www.ffado.org"
distfiles="http://www.ffado.org/files/libffado-${version}.tgz"
checksum=9f299b8ecd9885338aeae8c7f2fc10af9afb85ca4384256d485b010a128b35f6

subpackages="libffado-devel"

if [ -z "$CROSS_BUILD" ]; then
	makedepends+=" python-PyQt4-devel python-PyQt4-dbus python-dbus-devel"
	subpackages+=" libffado-python"
fi

post_install() {
	vinstall support/xdg/ffado.org-ffadomixer.desktop 644 usr/share/applications ffadomixer.desktop
	vinstall support/xdg/hi64-apps-ffado.png 644 usr/share/pixmaps ffado.png
}

libffado-python_package() {
	depends="python-dbus python-PyQt4-dbus"
	short_desc+=" - python bindings"
	pycompile_module="ffado"
	pycompile_dirs="usr/share/libffado/python"
	pkg_install() {
		vmove usr/share/libffado/python
		vmove usr/lib/python2.7
	}
}
libffado-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
	}
}
