# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=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-libmemcached
version             0.13.1
revision            3
license             Apache-2
maintainers         akitada openmaintainer
description         python memcached client wrapped on libmemcached
long_description    python memcached client wrapped on libmemcached.
platforms           darwin
homepage            http://code.google.com/p/python-libmemcached/
master_sites        http://python-libmemcached.googlecode.com/files/ \
                    http://distfiles.macports.org/python/
distname            python-libmemcached-${version}
extract.suffix      .tgz
worksrcdir          python-libmemcached
checksums           md5 ee728adeb6a7de34fc9241bcd2b360be \
                    sha1 6c82deed9980cfb5efbce051c0f4f381c24151a3 \
                    rmd160 4047d121d48ff918851c404ec3f0bd8aebdfee6d

python.versions     25

if {${name} ne ${subport}} {
    depends_build       port:py${python.version}-setuptools
    depends_lib         port:libmemcached \
                        port:py${python.version}-pyrex
    patchfiles          patch-setup.py.diff

    configure {
        reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/setup.py
    }

    post-destroot {
        xinstall -m 644 -W ${worksrcpath} \
            AUTHORS COPYING ChangeLog benchmark.py readme \
             ${destroot}${prefix}/share/doc/${subport}
    }
}
