# -*- 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
distname openvpn-${version}
license {GPL-2 OpenSSLException}
description easy-to-use, robust, and highly configurable VPN
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 https://openvpn.net
master_sites https://swupdate.openvpn.net/community/releases/
checksums rmd160 9fb17a39b70d96ecc3075a78011496b239e741d6 \
sha256 4f6434fa541cc9e363434ea71a16a62cf2615fb2f16af5b38f43ab5939998c26 \
depends_build port:pkgconfig
path:lib/libssl.dylib:openssl
configure.args --program-suffix=2 \
--docdir=${prefix}/share/doc/${name}
set docdir ${destroot}${prefix}/share/doc/${name}
set exdir ${destroot}${prefix}/share/examples/${name}
xinstall -m 755 -d ${docdir}
xinstall -m 755 -d ${exdir}
foreach dir "sample/sample-config-files \
file copy ${worksrcpath}/${dir} ${exdir}/
file copy ${worksrcpath}/contrib ${docdir}/
xinstall -m 644 -W ${worksrcpath} AUTHORS ${docdir}/
reinplace "s|;user nobody|user nobody|;s|;group nobody|group nobody|;" \
${destroot}${prefix}/share/examples/${name}/sample-config-files/server.conf \
${destroot}${prefix}/share/examples/${name}/sample-config-files/client.conf \
${destroot}${prefix}/share/examples/${name}/sample-config-files/static-home.conf \
${destroot}${prefix}/share/examples/${name}/sample-config-files/static-office.conf \
${destroot}${prefix}/share/examples/${name}/sample-config-files/tls-home.conf \
${destroot}${prefix}/share/examples/${name}/sample-config-files/tls-office.conf
if {![file exists ${prefix}/etc/${name}]} {
xinstall -d ${prefix}/etc/${name}
foreach f { server.conf client.conf } {
if {![file exists ${prefix}/etc/${name}/${f}]} {