# $Id: Portfile 78743 2011-05-21 04:32:31Z aecollins1@macports.org $

PortSystem          1.0
PortGroup           python26 1.0

name                py26-gdata
version             2.0.14
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     29cf394b4f75aa4fae8c1b59079f2a02 \
                    sha1    5eed0e01ab931e3f706ec544fc8f06ecac384e91 \
                    rmd160  9a0f2b7ba5bfc0cd813ac7ef54068acfae0992b6

depends_lib         port:py26-distribute

livecheck.type      googlecode

set python.prefix   ${frameworks_dir}/Python.framework/Versions/${python.branch}

post-destroot {

    eval reinplace \
        "s|/usr/local/svn/gdata-python-client/src|${python.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}/
        
}
