# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 NEED_PYTHON=2.6 inherit multilib python DESCRIPTION="Plugins for the music player Quod Libet" HOMEPAGE="http://code.google.com/p/quodlibet/" SRC_URI="http://quodlibet.googlecode.com/files/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha amd64 ~ppc ~ppc64 ~sparc x86" IUSE="aniosd audioscrobbler burn cddb detectmount lastfmsync musicbrainz nautilus" RDEPEND=">=media-sound/quodlibet-2.2 aniosd? ( dev-python/pycairo dev-python/pygobject ) audioscrobbler? ( dev-python/jsonpickle ) burn? ( || ( app-cdr/brasero app-cdr/k3b ) ) cddb? ( dev-python/cddb-py ) detectmount? ( dev-python/gnome-vfs-python ) lastfmsync? ( dev-python/jsonpickle dev-python/simplejson ) musicbrainz? ( dev-python/python-musicbrainz ) nautilus? ( dev-python/libbonobo-python )" pkg_setup() { python_version dest=/usr/$(get_libdir)/python${PYVER}/site-packages/quodlibet/plugins } src_prepare() { # How to install, not needed. rm "${S}/README" if ! use aniosd; then rm "${S}/events/animosd.py" fi if ! use audioscrobbler; then rm "${S}/events/qlscrobbler.py" fi if ! use burn; then rm "${S}/songsmenu/k3b.py" fi if ! use cddb; then rm "${S}/songsmenu/cddb.py" fi if ! use detectmount; then rm "${S}/events/automask.py" fi if ! use lastfmsync; then rm "${S}/songsmenu/lastfmsync.py" fi if ! use musicbrainz; then rm "${S}/songsmenu/brainz.py" fi if ! use nautilus; then rm "${S}/songsmenu/nautilus.py" fi # Old, deps not in portage, qlscrobbler offers the same features. rm "${S}/events/lastfmsubmit.py" } src_install() { insinto "${dest}/editing" doins ${S}/editing/*.py || die "Install failed!" insinto "${dest}/events" doins ${S}/events/*.py || die "Install failed!" insinto "${dest}/playorder" doins ${S}/playorder/*.py || die "Install failed!" insinto "${dest}/songsmenu" doins ${S}/songsmenu/*.py || die "Install failed!" } pkg_postinst() { python_mod_compile ${dest}/editing/* python_mod_compile ${dest}/events/* python_mod_compile ${dest}/playorder/* python_mod_compile ${dest}/songsmenu/* } pkg_postrm() { python_mod_cleanup ${dest}/editing/* python_mod_cleanup ${dest}/events/* python_mod_cleanup ${dest}/playorder/* python_mod_cleanup ${dest}/songsmenu/* }