summaryrefslogtreecommitdiff
path: root/net-im/centerim/files
blob: 214190eb7caf025e0c99062557d1df1f4ab2f4f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/var/paludis/repositories/gentoo/net-im/centerim/filesunder the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/gajim-0.11.4.ebuild,v 1.6 2008/01/24 20:23:28 angelos Exp $

inherit multilib python eutils mercurial autotools

DESCRIPTION="Jabber client written in PyGTK"
HOMEPAGE="http://www.gajim.org/"
SRC_URI=""

EHG_REPO_URI="http://hg.gajim.org/gajim"

S="${WORKDIR}/${PN}"


LICENSE="GPL-2"
SLOT=""
KEYWORDS=""
IUSE="avahi dbus gnome idle libnotify nls spell srv trayicon X xhtml"

DEPEND="|| (
		( <dev-lang/python-2.5 dev-python/pysqlite )
		>=dev-lang/python-2.5
	)
	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 )
	xhtml? ( dev-python/docutils )
	srv? ( net-dns/bind-tools )
	idle? ( x11-libs/libXScrnSaver )
	spell? ( app-text/gtkspell )
	avahi? ( net-dns/avahi )
	dev-python/pyopenssl"

pkg_setup() {
	if ! use dbus; then
		if use libnotify; then
			eerror "The dbus USE flag is required for libnotify support"
			die "USE=\"dbus\" needed for libnotify support"
		fi
		if use avahi; then
			eerror "The dbus USE flag is required for avahi support"
			die "USE=\"dbus\" needed for avahi support"
		fi
	else
		if has_version "<sys-apps/dbus-0.90" && ! built_with_use sys-apps/dbus python; then
				eerror "Please rebuild dbus with USE=\"python\""
				die "USE=\"python\" needed for dbus"
		fi
	fi

	if use avahi; then
		if ! built_with_use net-dns/avahi dbus gtk python; then
			eerror "The following USE flags are required for correct avahi"
			eerror "support: dbus gtk python"
			die "Please rebuild avahi with these use flags enabled."
		fi
	fi

	if has_version ">=dev-lang/python-2.5" && ! built_with_use dev-lang/python sqlite; then
		eerror "Please rebuild python with USE=\"sqlite\""
		die "USE=\"sqlite\" needed for python"
	fi
}

src_unpack() {
	mercurial_src_unpack
	#eautoreconf
	cd "${S}"
	./autogen.sh
	#epatch "${FILESDIR}/${P}-test_fix.patch"
}

src_compile() {
	local myconf

	if ! use gnome; then
		myconf="${myconf} $(use_enable trayicon)"
		myconf="${myconf} $(use_enable idle)"
	fi

	econf $(use_enable nls) \
		$(use_enable spell gtkspell) \
		$(use_enable dbus remote) \
		$(use_with X x) \
		--docdir="/usr/share/doc/${PF}" \
		--prefix="/usr" \
		--libdir="/usr/$(get_libdir)" \
		${myconf} || die "econf failed"

	emake || die "emake 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 /usr/share/gajim/
}

pkg_postrm() {
	python_mod_cleanup /usr/share/gajim/
}
}
mod_vroot.html doc/
fi

# Fix bug #218850
#epatch "${FILESDIR}/${P}-bug218850.patch"

# Fix bug #221275
# extract custom PR_ macros from aclocal.m4 to acinclude.m4
# and delete the provided aclocal.m4 before running autoreconf
elog "Extract custom m4 macros from aclocal.m4..."
cat aclocal.m4 | head -n188 > acinclude.m4
rm -f aclocal.m4

eautoreconf
}

src_compile() {
addpredict /etc/krb5.conf
local modules myconf

modules="mod_ratio:mod_readme"
use acl && modules="${modules}:mod_facl"
use ban && modules="${modules}:mod_ban"
use case && modules="${modules}:mod_case"
use clamav && modules="${modules}:mod_clamav"
use deflate && modules="${modules}:mod_deflate"
use pam && modules="${modules}:mod_auth_pam"
use radius && modules="${modules}:mod_radius"
use rewrite && modules="${modules}:mod_rewp