net-im/gajim-0.12.3: add
[otih-overlay.git] / net-im / gajim / gajim-0.12.3.ebuild
blob2c08821d0390c27bc33c36743a231289e352abc3
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-im/gajim/gajim-0.12.1.ebuild,v 1.4 2009/05/31 23:59:52 ranger Exp $
5 EAPI="2"
7 inherit multilib python eutils autotools
9 DESCRIPTION="Jabber client written in PyGTK"
10 HOMEPAGE="http://www.gajim.org/"
11 SRC_URI="http://www.gajim.org/downloads/${P}.tar.gz"
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
16 IUSE="avahi dbus gnome idle libnotify nls spell srv trayicon X xhtml"
18 DEPEND="|| (
19 ( <dev-lang/python-2.5 dev-python/pysqlite )
20 >=dev-lang/python-2.5[sqlite]
22 dev-python/pygtk
23 sys-devel/gettext
24 dev-util/intltool
25 dev-util/pkgconfig"
27 RDEPEND="gnome? ( dev-python/gnome-python-extras
28 dev-python/gnome-python-desktop
30 dbus? ( dev-python/dbus-python dev-libs/dbus-glib )
31 libnotify? ( x11-libs/libnotify )
32 xhtml? ( dev-python/docutils )
33 srv? ( net-dns/bind-tools )
34 idle? ( x11-libs/libXScrnSaver )
35 spell? ( app-text/gtkspell )
36 avahi? ( net-dns/avahi[dbus,gtk,python] )
37 dev-python/pyopenssl
38 dev-python/sexy-python
39 dev-python/pycrypto"
41 pkg_setup() {
42 if ! use dbus; then
43 if use libnotify; then
44 eerror "The dbus USE flag is required for libnotify support"
45 die "USE=\"dbus\" needed for libnotify support"
47 if use avahi; then
48 eerror "The dbus USE flag is required for avahi support"
49 die "USE=\"dbus\" needed for avahi support"
54 src_prepare() {
55 # not upstream:
56 epatch "${FILESDIR}/0.12.1_autotools_install_pyfiles_in_pkglibdir.patch"
57 # sound paths:
58 epatch "${FILESDIR}/0.12.1-sound-path-fix.patch"
59 # small fix from upstream
60 epatch "${FILESDIR}/0.12.1-roster_window.py_r10934.patch"
62 # fix datadir path (trunk use an env var for config this)
63 sed -i "s|'DATA',.*|'DATA', '/usr/share/gajim/data')|" \
64 "src/common/configpaths.py" || die 'sed failed'
66 eautoreconf
69 src_configure() {
70 local myconf
72 if ! use gnome; then
73 myconf="${myconf} $(use_enable trayicon)"
74 myconf="${myconf} $(use_enable idle)"
77 econf $(use_enable nls) \
78 $(use_enable spell gtkspell) \
79 $(use_enable dbus remote) \
80 $(use_with X x) \
81 --docdir="/usr/share/doc/${PF}" \
82 --libdir="$(python_get_sitedir)" \
83 ${myconf} || die "econf failed"
86 src_install() {
87 emake DESTDIR="${D}" install || die "emake install failed"
89 rm "${D}/usr/share/doc/${PF}/README.html"
90 dohtml README.html
93 pkg_postinst() {
94 python_mod_optimize $(python_get_sitedir)/gajim/
97 pkg_postrm() {
98 python_mod_cleanup $(python_get_sitedir)/gajim/