# $Id: Portfile 90993 2012-03-20 23:48:47Z blair@macports.org $

PortSystem 1.0

name                    serf1
version                 1.0.3
categories              www
maintainers             blair
license                 Apache-2
description             C-based HTTP client library

long_description        The serf library is a C-based HTTP client library \
                        built upon the Apache Portable Runtime (APR) \
                        library.  It multiplexes connections, running the \
                        read/write communication asynchronously.  Memory \
                        copies and transformations are kept to a minimum to \
                        provide high performance operation.

homepage                http://code.google.com/p/serf/
master_sites            http://serf.googlecode.com/files/
dist_subdir             serf
distname                serf-${version}
use_bzip2               yes
use_parallel_build      yes
checksums               md5 d612ef59c89c19957e5c2a16c68fd4d3 \
                        sha1 117fb820fd3541e899ad9a1b3f1b273266493a68 \
                        rmd160 3118c6e5b07a72d38cc1bf3a6df03e3f9b0192b6

platforms               darwin

depends_lib             port:apr port:apr-util port:openssl

configure.args          --with-apr=${prefix}/bin/apr-1-config \
                        --with-apr-util=${prefix}/bin/apu-1-config

configure.ccache        no

test.run                yes
test.target             check

post-destroot {
        set sharedir ${destroot}${prefix}/share
        set docdir ${sharedir}/doc/${name}

        xinstall -m 755 -d ${docdir}

        foreach f {CHANGES LICENSE NOTICE README} {
                file copy ${worksrcpath}/${f} ${docdir}
        }
}

livecheck.url   http://code.google.com/p/serf/downloads/list
livecheck.type  regex
livecheck.regex serf-(\\d+(?:\\.\\d+)*)
