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

name                balance
version             3.57
revision            0

homepage            https://balance.inlab.net

description         Simple but powerful generic TCP proxy

long_description    Balance is a simple but powerful generic TCP proxy with \
                    round-robin load balancing and failover mechanisms. Its \
                    behaviour can be controlled at runtime using a simple \
                    command line syntax.

categories          net
installs_libs       no
license             GPL-2
maintainers         nomaintainer

master_sites        https://download.inlab.net/Balance/${version}/
use_tar             yes

checksums           rmd160  32a8450d140cf59863b271c97ecdf62fa000abfa \
                    sha256  3a7e460e4368fdd91425531e273b54faae5408e6b3c6cf266b70893d2e073fcf \
                    size    102400

build.pre_args-append \
    CFLAGS="-O2 -DBalanceBSD" \
    CC=${configure.cc}

destroot {
    xinstall -m 0755 -d ${destroot}${prefix}/bin \
        ${destroot}${prefix}/share/man/man1

    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin

    xinstall -m 0644 \
        ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1
}
