# -*- 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
# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-logilab-constraint
version             0.5.0
revision            0
categories-append   devel
platforms           darwin
license             GPL-2+
supported_archs     noarch

python.versions     25 26 27

maintainers         stromnov openmaintainer

description         python module for solving constraint satisfaction problems

long_description    The constraint package is a constraint satisfaction \
                    problem solver written in 100% pure Python, using \
                    constraint propagation algorithms. So far, facilities \
                    are provided to work with finite domains only.

homepage            http://www.logilab.org/projects/constraint/
master_sites        http://ftp.logilab.org/pub/constraint

distname            logilab-constraint-${version}

checksums           rmd160  5b01c775449b32ea9d3b54813dc5a7cf3a48095f \
                    sha256  ba291c988dcc5d4457cd3414994bddfe1f19b7e20b735e179ba0095294d8f511

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-logilab-common

    post-destroot   {
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 755 -d ${destroot}${prefix}/share/examples/${subport}

        xinstall -m 644 -W ${worksrcpath} \
            doc/CONTRIBUTORS doc/documentation.html doc/documentation.xml \
            README COPYING ChangeLog \
            ${destroot}${prefix}/share/doc/${subport}
        eval xinstall -m 644 [glob ${worksrcpath}/examples/*] \
            ${destroot}${prefix}/share/examples/${subport}

        file delete ${destroot}${python.pkgd}/logilab/__init__.py
    }

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       http://ftp.logilab.org/pub/constraint/
    livecheck.regex     {logilab-constraint-(\d+(?:\.\d+)*)\.[tz]}
}
