# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=4 inherit distutils gnome2-utils PYTHON_DEPEND="2" # If you add these lines, /usr/bin/autokey-*- are installed... # SUPPORT_PYTHON_ABIS="1" # RESTRICT_PYTHON_ABIS="3.*" DESCRIPTION="A programm for automating tasks in Linux" HOMEPAGE="http://code.google.com/p/autokey/" SRC_URI="http://autokey.googlecode.com/files/autokey-${PV}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="doc gtk qt4 gnome" REQUIRED_USE="gnome? ( gtk )" DEPEND="" RDEPEND="${DEPEND} dev-python/pyinotify dev-python/python-xlib dev-python/simplejson x11-misc/wmctrl gtk? ( dev-libs/libappindicator dev-python/dbus-python dev-python/pyatspi dev-python/pygobject:3 dev-python/pygtksourceview gnome-extra/zenity x11-libs/gtk+:3[introspection] x11-libs/gtksourceview:3.0[introspection] x11-libs/libnotify[introspection] x11-libs/pango[introspection] ) qt4? ( kde-base/pykde4 dev-python/PyQt4[X,dbus] dev-python/qscintilla-python dev-python/notify-python )" S="${WORKDIR}/autokey-${PV}" src_install(){ distutils_src_install if use doc; then dohtml -r doc/scripting fi if ! use gtk; then rm "${D}/usr/bin/autokey-gtk" rm "${D}/usr/share/applications/autokey-gtk.desktop" rm "${D}/usr/share/man/man1/autokey-gtk.1" fi if ! use qt4; then rm "${D}/usr/bin/autokey-qt" rm "${D}/usr/share/applications/autokey-qt.desktop" rm "${D}/usr/share/man/man1/autokey-qt.1" rm -r "${D}/usr/share/kde4/" fi } pkg_preinst() { if use gnome; then gnome2_icon_savelist fi } pkg_postinst() { if use gnome; then gnome2_icon_cache_update fi einfo "You should now run /etc/init.d/dbus restart" } pkg_postrm() { if use gnome; then gnome2_icon_cache_update fi }