# $Id$

PortSystem 1.0

name            serf0
version         0.7.2
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/svn/src_releases
dist_subdir     serf
distname        serf-${version}
use_bzip2       yes
checksums       md5 66ed12163b14b704888e628ee38e9581 \
                sha1 132fbb13d50c4f849231eee79dcada8cde3ecad2 \
                rmd160 6b586ced49b7195e80595d3d1eb29af08d1afc32

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-(0\\.7\\.\\d+)