# Template file for 'ffado'
pkgname=libffado
version=2.2.1
revision=1
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
 python-PyQt4-devel python-PyQt4-dbus python-dbus-devel"
pycompile_versions="2.7"
pycompile_module="ffado"
pycompile_dirs="usr/share/libffado/python"
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

do_build() {
	scons ${makejobs} \
		CUSTOM_ENV=True \
		CC="$CC" \
		CXX="$CXX" \
		CFLAGS="$CFLAGS" \
		CXXFLAGS="$CXXFLAGS" \
		LDFLAGS="$LDFLAGS" \
		PREFIX=/usr \
		MANDIR="/usr/share/man" \
		UDEVDIR="/usr/lib/udev/rules.d" \
		BUILD_TESTS=False \
		ENABLE_OPTIMIZATIONS=False
}

do_install() {
	scons PREFIX=${DESTDIR}/usr WILL_DEAL_WITH_XDG_MYSELF="True" 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-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
	}
}
