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

PortSystem          1.0

name                sslh
epoch               1
version             1.18
categories          net security www
platforms           darwin
maintainers         madlon-kay.com:aaron+macports openmaintainer
license             GPL-2+

description         ssl/ssh multiplexer

long_description    sslh lets one accept both HTTPS and SSH connections \
                    on the same port. It makes it possible to connect \
                    to an SSH server on port 443 (e.g. from inside a \
                    corporate firewall) while still serving HTTPS on \
                    that port.

homepage            http://rutschle.net/tech/sslh.shtml
master_sites        http://rutschle.net/tech/sslh/

distname            ${name}-v${version}

checksums           rmd160  f85a96817d127106f06afabc70a3d5036e503d08 \
                    sha256  1601a5b377dcafc6b47d2fbb8d4d25cceb83053a4adcc5874d501a2d5a7745ad

depends_lib         port:libconfig-hr

use_configure       no
use_parallel_build  no

variant universal {}

build.args          CC="${configure.cc} [get_canonical_archflags cc]" \
                    LIBS="${configure.ldflags} -lconfig"

destroot {
    xinstall -W ${worksrcpath} sslh-fork sslh-select ${destroot}${prefix}/sbin/
    ln -s sslh-fork ${destroot}${prefix}/sbin/sslh
    
    xinstall -m 0644 ${worksrcpath}/sslh.8.gz ${destroot}${prefix}/share/man/man8/
    
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} ChangeLog README.md README.MacOSX example.cfg ${destroot}${docdir}
}

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