Revision: 120653 https://trac.macports.org/changeset/120653 Author: mf2k@macports.org Date: 2014-06-04 12:22:31 -0700 (Wed, 04 Jun 2014) Log Message: ----------- openvpn2: Update to version 2.3.4. Add maintainer. (#43239) Modified Paths: -------------- trunk/dports/net/openvpn2/Portfile Modified: trunk/dports/net/openvpn2/Portfile =================================================================== --- trunk/dports/net/openvpn2/Portfile 2014-06-04 18:28:08 UTC (rev 120652) +++ trunk/dports/net/openvpn2/Portfile 2014-06-04 19:22:31 UTC (rev 120653) @@ -4,11 +4,11 @@ PortSystem 1.0 name openvpn2 -version 2.3.3 +version 2.3.4 distname openvpn-${version} categories net security platforms darwin -maintainers nomaintainer +maintainers yahoo.fr:jul_bsd openmaintainer license {GPL-2 OpenSSLException} description easy-to-use, robust, and highly configurable VPN @@ -20,8 +20,8 @@ homepage http://www.openvpn.net master_sites http://swupdate.openvpn.net/community/releases/ -checksums rmd160 583119bd19749a5e4a1afef531d67f895ef535f7 \ - sha256 f025d14631105a66e501ca897830cd4d26a1438530cd9174dc6169536ae4b113 +checksums rmd160 8b0cc785a8e025b5b77aabc3546e4295b96ea85a \ + sha256 af506d5f48568fa8d2f2435cb3fad35f9a9a8f263999ea6df3ba296960cec85a depends_build port:pkgconfig depends_lib port:lzo2 \ @@ -32,22 +32,68 @@ post-destroot { 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 \ sample/sample-keys \ sample/sample-plugins \ - sample/sample-scripts \ - contrib" { - file copy ${worksrcpath}/${dir} ${docdir} + sample/sample-scripts" { + file copy ${worksrcpath}/${dir} ${exdir}/ } - xinstall -m 644 -W ${worksrcpath} AUTHORS ${docdir} + 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 {${os.platform} eq "darwin" && ${os.major} <= 9} { +post-activate { + if {![file exists ${prefix}/etc/${name}]} { + xinstall -d ${prefix}/etc/${name} + } + foreach f { server.conf client.conf } { + if {![file exists ${prefix}/etc/${name}/${f}]} { + xinstall ${prefix}/share/examples/${name}/sample-config-files/${f} ${prefix}/etc/${name}/ + } + } +} + +notes " +If not existing, a default server.conf has been created in ${prefix}/etc/${name}/ +Startup launch script is set to start with it. +Please adjust to your need, especially passphrase or certificates + +For minimal configuration, you need to follow these steps + +A) With a shared secret + $ sudo openvpn --genkey --secret ${prefix}/etc/openvpn2/static.key + Use 'secret static.key' in your config file + +B) With self-signed certificates, follow + https://openvpn.net/index.php/open-source/documentation/howto.html#pki + +Alternate GUI: https://code.google.com/p/tunnelblick/ + +Openvpn uses a tun device to create its network interface. It could either be: +- utun device built into OSX 10.7+ +- tun device from port tuntaposx +" + +if {${os.platform} == "darwin" && ${os.major} <= 9} { post-patch { reinplace "s|security/pam_appl.h|pam/pam_appl.h|g" ${worksrcpath}/src/plugins/auth-pam/auth-pam.c } } -livecheck.url ${homepage}/download.html -livecheck.regex openvpn-(\[0-9.\]*).tar.gz +startupitem.create yes +startupitem.executable "${prefix}/bin/openvpn2 --config ${prefix}/etc/${name}/server.conf" + +livecheck.type regex +livecheck.url ${homepage}/index.php/open-source/downloads.html +livecheck.regex "/openvpn-(\\d+(?:\\.\\d+)*).tar.gz\">" +
participants (1)
-
mf2k@macports.org