# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit multilib python DESCRIPTION="GTK+ Bluetooth Manager, designed to be simple and intuitive for everyday bluetooth tasks." HOMEPAGE="http://blueman-project.org/" SRC_URI="http://download.tuxfamily.org/${PN}/${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="gnome network nls +policykit pulseaudio" CDEPEND="dev-libs/glib:2 >=x11-libs/gtk+-2.12:2 x11-libs/startup-notification >=dev-lang/python-2.5 dev-python/pygobject >=net-wireless/bluez-4.25" DEPEND="${CDEPEND} nls? ( dev-util/intltool sys-devel/gettext ) dev-util/pkgconfig >=dev-python/pyrex-0.9.8" RDEPEND="${CDEPEND} >=app-mobilephone/obex-data-server-0.4.4 || ( x11-misc/notification-daemon x11-misc/xfce4-notifyd ) sys-apps/dbus dev-python/pygtk dev-python/notify-python dev-python/dbus-python gnome? ( dev-python/gconf-python ) network? ( || ( net-dns/dnsmasq =net-misc/dhcp-3* ) ) policykit? ( gnome-extra/policykit-gnome ) pulseaudio? ( >=media-sound/pulseaudio-0.9.15 )" src_prepare() { # disable pyc compiling rm py-compile ln -s $(type -P true) py-compile # fix desktop file - Bug 274085 sed -i -e "/Encoding.*$/d" "${S}"/data/blueman{,-manager}.desktop.in || die "sed failed" } src_configure() { econf \ --with-no-runtime-deps-check \ $(use_enable nls) \ $(use_enable policykit polkit) } src_install() { emake DESTDIR="${D}" install || die "emake install failed" # remove useless cruft if not enabled use policykit || rm -rf "${D}"/usr/share/polkit-1 dodoc AUTHORS ChangeLog NEWS README if ! use gnome; then python_version rm "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/blueman/plugins/config/Gconf.py" fi if ! use pulseaudio ; then python_version rm "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/blueman/main/PulseAudioUtils.py" rm "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/blueman/plugins/applet/PulseAudio.py" fi python_need_rebuild } pkg_postinst() { python_version python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/blueman } pkg_postrm() { python_mod_cleanup }