# -*- 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.2
revision            0
categories          www benchmarks
maintainers         nomaintainer
license             GPL-3
installs_libs       no

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  cd76ff20490aced9e3ed03cf465cb6793cf1632d \
                    sha256  c0d5bfac11086aeb3828888a71bf276ed54c9fa0f0af2ead981d2b2fa242141b \
                    size    545150

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}
