# -*- 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

PortSystem          1.0
PortGroup           openssl 1.0
PortGroup           legacysupport 1.1

# strnlen
legacysupport.newest_darwin_requires_legacy 10

name                siege
version             4.2.0
revision            0
categories          www benchmarks
maintainers         nomaintainer
license             GPL-3

description         HTTP/HTTPS regression testing and benchmarking utility

long_description    Siege is an HTTP/HTTPS regression testing and benchmarking \
                    utility. It was designed to let web developers measure the \
                    performance of their code under duress, to see how it will \
                    stand up to load on the internet. It lets the user hit a \
                    web server with a configurable number of concurrent \
                    simulated users.

homepage            https://www.joedog.org/siege
master_sites        https://download.joedog.org/${name}/

checksums           rmd160  0924be325284fdf42084cb9d89f2fd08dcc65fbd \
                    sha256  78af482fc655f1cf7270fdbc3171581ed4cb3163009f7f4f056fc2b7e2d24453 \
                    size    543450

depends_lib-append  port:zlib

patchfiles          patch-doc-Makefile.in.diff
patchfiles-append   uuid.diff

configure.args      --with-ssl=[openssl::install_area] \
                    --with-zlib=${prefix}

set docdir ${prefix}/share/doc/${name}

post-destroot {
    # copy an example siegerc to ${prefix}/share/doc so an updater can see
    # possible changes to siegerc:
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 ${worksrcpath}/doc/siegerc ${destroot}${docdir}
}

notes "
To use siege you have to run 'siege.config'. This generates a default\
configuration file.
If you are updating have a look at a possible new '.siegerc' file in\
${docdir}/siegerc.
"

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
