# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-hypy
version             0.8.3
categories-append   textproc
license             LGPL-2.1
maintainers         nomaintainer
description         Fulltext search interface for Python applications
long_description \
   Hypy is a fulltext search interface for Python applications. Use it to \
   index and search your documents from Python code.

platforms           darwin

homepage            http://goonmill.org/hypy/
master_sites        http://pypi.python.org/packages/source/H/Hypy/
distname            Hypy-${version}

checksums           md5     3603657417b0ad7fc199f6b2e37f10e8 \
                    sha1    0dcae455fbc993b4663beb66e32423679fade4cf \
                    rmd160  5f247d4f410aa0d2dbff0fc6268724865955d9a4

python.versions     25 26

if {${name} ne ${subport}} {
    depends_build       port:py${python.version}-setuptools
    depends_lib-append  port:hyperestraier

    patchfiles          patch-setup.py.diff
    post-patch {
       reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.py
       reinplace "s|VERSION_NOT_FOUND|${version}|" ${worksrcpath}/setup.py
    }

    post-destroot {
       xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
       xinstall -m 644 -W ${worksrcpath} README.txt \
          ${destroot}${prefix}/share/doc/${subport}
    }
    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     {Hypy-([0-9.]+)\.tar\.gz}
}
