# $Id: Portfile 102584 2013-02-05 04:25:13Z larryv@macports.org $

PortSystem 1.0
PortGroup python 1.0

name			py-jabber
version			0.5-0
revision		1
categories-append	net
license			LGPL
maintainers		nomaintainer
platforms		darwin freebsd
supported_archs	noarch
description		python module for the jabber instant messaging protocol
long_description	jabber.py is a python module for the jabber instant \
				messaging protocol. jabber.py deals with the xml parsing and \
				socket code, leaving the programmer to concentrate on \
				developing quality jabber based applications with python.

homepage		http://jabberpy.sourceforge.net/
master_sites	sourceforge:jabberpy
distname		jabberpy-${version}
checksums		md5 cbb9a1126bdc39ff49af605fb55c282e

python.versions	24

if {$subport != $name} {
    patchfiles		patch-setup.py.diff

    post-patch	{
        reinplace "s|VERSION|${version}|g" ${worksrcpath}/setup.py
        file copy ${worksrcpath}/jabber/debug.py \
            ${worksrcpath}/jabber/jabber.py \
            ${worksrcpath}/jabber/xmlstream.py ${worksrcpath}
    }

    post-destroot   {
        xinstall -m 644 -W ${worksrcpath} README CREDITS \
            ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath}/examples README jrpc.py pending.xpm \
            mailchecker.py offline.xpm online.xpm pygtkjab.py pyqtjab.py \
            pypguijab.py test_client.py \
            ${destroot}${prefix}/share/doc/${subport}/examples
    }
}
