# $Id: Portfile 106686 2013-06-05 02:44:36Z blair@macports.org $

PortSystem 1.0

name            serf1
version         1.2.1
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
checksums       sha1 f65fbbd72926c8e7cf0dbd4ada03b0d226f461fd \
                sha256 6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700

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+)*)
