# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="2" inherit autotools multilib eutils DESCRIPTION="Bluetooth Tools and System Daemons for Linux" HOMEPAGE="http://bluez.sourceforge.net/" SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.gz" LICENSE="GPL-2 LGPL-2.1" SLOT="0" KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sh ~sparc ~x86" IUSE="alsa cups debug doc gstreamer test-programs usb" CDEPEND="alsa? ( media-libs/alsa-lib ) gstreamer? ( >=media-libs/gstreamer-0.10 >=media-libs/gst-plugins-base-0.10 ) usb? ( dev-libs/libusb ) cups? ( net-print/cups ) sys-fs/udev dev-libs/glib sys-apps/dbus media-libs/libsndfile >=dev-libs/libnl-1.1 !net-wireless/bluez-libs !net-wireless/bluez-utils" DEPEND="sys-devel/flex >=dev-util/pkgconfig-0.20 doc? ( dev-util/gtk-doc ) ${CDEPEND}" RDEPEND="${CDEPEND}" src_configure() { econf \ $(use_enable doc gtk-doc) \ $(use_enable gstreamer) \ $(use_enable alsa) \ $(use_enable usb) \ --enable-netlink \ --enable-tools \ --enable-bccmd \ --enable-hid2hci \ --enable-dfutool \ $(use_enable cups) \ $(use_enable test-programs test) \ --enable-manpages \ --enable-configfiles \ $(use_enable debug) \ --localstatedir=/var } src_install() { emake DESTDIR="${D}" install || die "make install failed" dodoc AUTHORS ChangeLog README || die if use test-programs ; then cd "${S}/test" dobin simple-agent simple-service monitor-bluetooth newbin list-devices list-bluetooth-devices for b in apitest hsmicro hsplay test-* ; do newbin "${b}" "bluez-${b}" done insinto /usr/share/doc/${PF}/test-services doins service-* cd "${S}" fi insinto /etc/bluetooth doins \ input/input.conf \ audio/audio.conf \ network/network.conf } pkg_postinst() { udevadm control --reload_rules && udevadm trigger }