summaryrefslogtreecommitdiff
blob: fe8b5d9ef1ba534c215b3ae1404d409b808d98ac (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/pymsn-t/pymsn-t-0.9.5-r1.ebuild,v 1.1 2005/09/14 21:59:42 humpback Exp $

inherit eutils python

MY_PN="PyMSNt"
S=${WORKDIR}/${MY_PN}-${PV}
DESCRIPTION="MSN transport for Jabber"
HOMEPAGE="http://msn-transport.jabberstudio.org/"
SRC_URI="http://msn-transport.jabberstudio.org/tarballs/${MY_PN}-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

DEPEND=">=net-im/jabber-base-0.0
		>=dev-lang/python-2.3"
RDEPEND="virtual/jabber-server
		>=dev-python/twisted-2
		dev-python/twisted-words
		dev-python/twisted-xish
		dev-python/twisted-web"
IUSE=""

src_unpack()
{
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${PN}-0.9.5-arguments.patch
	rm -rf src/CVS
	rm -rf src/baseproto/CVS
	rm -rf src/legacy/CVS
	rm -rf src/tlib/CVS
	rm -rf src/tlib/jabber/CVS
}

src_install()
{
	python_version
	#Dont like this, have to find way to do recursive copy with doins
	dodir /usr/lib/python${PYVER}/site-packages/${PN}/src
	cp -r src/* ${D}/usr/lib/python${PYVER}/site-packages/${PN}/src


	exeinto /usr/lib/python${PYVER}/site-packages/
	doexe PyMSNt
	sed -i \
		-e "s/.*<spooldir>.*/<spooldir>\/var\/spool\/jabber\/<\/spooldir>/"\
		-e "s/.*<pid>.*/<pid>\/var\/run\/jabber\/pymsn-t.pid<\/pid>/"\
		-e "s/.*<debugLog>.*/<debugLog>\/var\/log\/jabber\/${PN}-debug.log<\/debugLog>/"\
			config-example.xml
	insinto /etc/jabber
	newins config-example.xml pymsn-t.xml

	exeinto /etc/init.d
	newexe ${FILESDIR}/pymsn-t.initd pymsn-t
	sed -i -e "s/PATH/python${PYVER}/" ${D}/etc/init.d/pymsn-t
}

pkg_postinst() {
	einfo "A sample configuration file has been installed in /etc/jabber/pymsn-t.xml."
	einfo "Please edit it, and the configuration of you Jabber server to match."
	einfo "You also need to create a directory msn.yourdomain.com in"
	einfo "/var/spool/jabber/ and chown it to jabber:jabber."
}