# $Id: Portfile 68558 2010-06-06 11:12:29Z aecollins1@macports.org $

PortSystem          1.0
PortGroup           python25 1.0

name                py25-gdata
version             2.0.10
categories-append   devel
maintainers         aecollins1
description         Google Data API Python Client Library
long_description \
    The Google Data Python Client Library provides a library that makes it \
    easy to access data through the Google Data APIs. Many Google services \
    (such as Google Calendar and Documents) support the Google Data API \
    protocol.
platforms           darwin
homepage            http://code.google.com/p/gdata-python-client/
master_sites        http://gdata-python-client.googlecode.com/files/
distname            gdata-${version}

checksums           md5     118611eef4e97f025dd351bbab01bee2 \
                    sha1    b3eb311f844c188a1f5f599b5cdc2e732d78c796 \
                    rmd160  8c5fdc3f369013f8b219f95e7a62f4805b6e635f

depends_lib         port:py25-distribute

livecheck.type      googlecode

post-destroot {

    eval reinplace \
        "s|/usr/local/svn/gdata-python-client/src|${prefix}/lib/python${python.branch}/site-packages|g" \
        [glob ${worksrcpath}/pydocs/*.html]

    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    eval file copy [glob ${worksrcpath}/pydocs/*.html] \
        ${destroot}${prefix}/share/doc/${name}

    eval reinplace "s|#!/usr/bin/python|#!${prefix}/bin/python${python.branch}|g" \
        [glob ${worksrcpath}/samples/*/*.py]
    file copy ${worksrcpath}/samples \
        ${destroot}${prefix}/share/doc/${name}/
        
}
