# $Id: Portfile 106016 2013-05-13 13:00:34Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-tesser
version             0.0.1
license             Apache-2
platforms           darwin
supported_archs     noarch
maintainers         nomaintainer
description         Optical Character Recognition module for Python
long_description    pytesser is an ${description}
homepage            http://code.google.com/p/pytesser/
master_sites        googlecode:pytesser
distname            pytesser_v${version}
use_zip             yes
extract.mkdir       yes

checksums           md5     54681d38db45332ad5fa38fdba7ddd79 \
                    sha1    3eec1dced4d484dd34464e8a329b7b3c7b40d7b0 \
                    rmd160  4aeb1cf41978671524bb1c4be4b11e25bda6c1ae

python.versions     26

if {$subport != $name} {
    depends_lib         port:py${python.version}-pil bin:tesseract:tesseract
    build               {}
    destroot {
        set instdir ${destroot}${python.pkgd}/tesseract
        xinstall -d ${instdir}
        xinstall -m 644 ${worksrcpath}/pytesser.py ${instdir}/__init__.py
        xinstall -m 644 -W ${worksrcpath} \
            util.py errors.py \
            ${instdir}
        set docdir ${destroot}${prefix}/share/doc/${subport}
        xinstall -d ${docdir}
        xinstall -m 644 -W ${worksrcpath} \
            AUTHORS ChangeLog LICENSE NOTICE README \
            ${docdir}
    }
}
