# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                py-graphy
set real_name       graphy
version             1.0
platforms           {darwin any}
supported_archs     noarch
license             Apache-2
maintainers         nomaintainer

description         Simple Python library for generating charts
long_description    Graphy is a simple Python library for generating \
                    charts. It tries to get out of the way and let you \
                    just work with your data. At the moment, it \
                    produces charts using the Google Chart API.
homepage            https://code.google.com/p/graphy/

master_sites        googlecode:${real_name}
distname            ${real_name}_${version}
use_bzip2           yes
checksums           md5     cbf392db1866f3158608f6de97488de1 \
                    sha1    b3206c349357bad02750b25ad58547ffc9fcae06 \
                    rmd160  69c986a9b41f6de6e5f6cd5a61071308f4f608b0

python.versions     27

if {${name} ne ${subport}} {
    post-extract {
        fs-traverse -ignoreErrors d ${worksrcpath} {
            if {[file tail ${d}] eq {.svn}} {
                delete ${d}
            }
        }
    }
    
    build {}
    
    destroot {
        set docdir ${destroot}${prefix}/share/doc/${subport}
        xinstall -d ${docdir}/examples ${destroot}${python.pkgd}

        move ${worksrcpath}/${real_name} ${destroot}${python.pkgd}/${real_name}
        xinstall ${worksrcpath}/README ${docdir}
        xinstall {*}[glob ${worksrcpath}/examples/*.py] ${docdir}/examples
    }
}
