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

name              openvpn
version           1.6.0
revision          2
categories        net security
maintainers       nomaintainer
description       easy-to-use, robust, and highly configurable VPN
long_description  OpenVPN is an easy-to-use, robust, and highly \
                  configurable VPN (Virtual Private Network) daemon \
                  which can be used to securely link two or more \
                  private networks using an encrypted tunnel over \
                  the internet.
homepage          http://openvpn.sourceforge.net/
license           {GPL-2 OpenSSLException}
master_sites      sourceforge
platforms         darwin openbsd
depends_lib       port:lzo path:lib/libssl.dylib:openssl
configure.args    --mandir=${prefix}/share/man \
                  --with-lzo-headers=${prefix}/include \
                  --with-lzo-lib=${prefix}/lib

checksums         rmd160  ffcb1746590bdd4dab6777856a6caf8c129d57de \
                  sha256  22072a24bcaef8038a1e84363f3e209f65eb7c7ab37741752172a334acb31fb8

post-destroot {
    xinstall -d ${destroot}${prefix}/share/${name}
    copy ${worksrcpath}/easy-rsa ${destroot}${prefix}/share/${name}
}

variant no_lzo description { don't use lzo libs } {
    configure.args-append --disable-lzo
    depends_lib-delete port:lzo
}

notes "OpenVPN 1.6.0 has been released on 2004-05-09. You are strongly encouraged to use OpenVPN2 or other maintained alternatives.
"

livecheck.type      regex
livecheck.url       http://openvpn.net/index.php/download/58-open-source/downloads.html
livecheck.regex     "OpenVPN (1(?:\\.\\d+)*)"