# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-im/gajim/gajim-0.12.1.ebuild,v 1.5 2009/07/21 11:31:41 ssuominen Exp $ EAPI="2" inherit multilib python eutils autotools DESCRIPTION="Jabber client written in PyGTK" HOMEPAGE="http://www.gajim.org/" SRC_URI="http://www.gajim.org/downloads/${PV/_*/}/${PN}-${PV/_/-}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~x86" IUSE="avahi dbus gnome idle libnotify notify-osd nls spell srv trayicon X xhtml" DEPEND=">=dev-lang/python-2.5[sqlite,xml] dev-python/pygtk sys-devel/gettext dev-util/intltool dev-util/pkgconfig" RDEPEND="gnome? ( dev-python/gnome-python-extras dev-python/gnome-python-desktop ) dbus? ( dev-python/dbus-python dev-libs/dbus-glib ) libnotify? ( x11-libs/libnotify ) notify-osd? ( x11-misc/notify-osd ) xhtml? ( dev-python/docutils ) srv? ( || ( dev-python/libasyncns-python net-dns/bind-tools ) ) idle? ( x11-libs/libXScrnSaver ) spell? ( app-text/gtkspell ) avahi? ( net-dns/avahi[dbus,gtk,python] ) >=dev-lang/python-2.5[sqlite,xml] dev-python/pygtk dev-python/pyopenssl dev-python/sexy-python dev-python/pycrypto sys-devel/gettext" src_prepare() { #non-upstream fix epatch "${FILESDIR}/${P}-autotools-install-pyfiles-in-pkglibdir.patch" # Fix sound paths sed -i "s|@DATADIR@|@DATADIR@/gajim|" \ "data/defs.py.in" || die 'sed failed' # fix datadir path (trunk use an env var for config this) sed -i "s|'DATA',.*|'DATA', '/usr/share/gajim/data')|" \ "src/common/configpaths.py" || die 'sed failed' eautoreconf } src_configure() { local myconf if ! use gnome; then myconf="${myconf} $(use_enable trayicon)" fi econf $(use_enable nls) \ $(use_with X x) \ --docdir="/usr/share/doc/${PF}" \ --libdir="$(python_get_sitedir)" \ ${myconf} || die "econf failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" rm "${D}/usr/share/doc/${PF}/README.html" dohtml README.html } pkg_postinst() { python_mod_optimize $(python_get_sitedir)/gajim/ } pkg_postrm() { python_mod_cleanup $(python_get_sitedir)/gajim/ }