Ticket #43239: patch-openvpn2-Portfile.diff
File patch-openvpn2-Portfile.diff, 4.4 KB (added by jul_bsd@…, 11 years ago) |
---|
-
net/openvpn2/Portfile
old new 1 1 # -*- 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 2 # $Id: Portfile 11 9080 2014-04-16 19:05:15Z macsforever2000@macports.org $2 # $Id: Portfile 114325 2013-12-05 09:20:31Z ryandesign@macports.org $ 3 3 4 4 PortSystem 1.0 5 5 6 6 name openvpn2 7 version 2.3. 37 version 2.3.4 8 8 distname openvpn-${version} 9 9 categories net security 10 10 platforms darwin 11 maintainers nomaintainer11 maintainers yahoo.fr:jul_bsd openmaintainer 12 12 license {GPL-2 OpenSSLException} 13 13 14 14 description easy-to-use, robust, and highly configurable VPN … … 20 20 homepage http://www.openvpn.net 21 21 master_sites http://swupdate.openvpn.net/community/releases/ 22 22 23 checksums rmd160 583119bd19749a5e4a1afef531d67f895ef535f7\24 sha256 f025d14631105a66e501ca897830cd4d26a1438530cd9174dc6169536ae4b11323 checksums rmd160 8b0cc785a8e025b5b77aabc3546e4295b96ea85a \ 24 sha256 af506d5f48568fa8d2f2435cb3fad35f9a9a8f263999ea6df3ba296960cec85a 25 25 26 26 depends_build port:pkgconfig 27 27 depends_lib port:lzo2 \ … … 32 32 33 33 post-destroot { 34 34 set docdir ${destroot}${prefix}/share/doc/${name} 35 set exdir ${destroot}${prefix}/share/examples/${name} 35 36 xinstall -m 755 -d ${docdir} 37 xinstall -m 755 -d ${exdir} 36 38 foreach dir "sample/sample-config-files \ 37 39 sample/sample-keys \ 38 40 sample/sample-plugins \ 39 sample/sample-scripts \ 40 contrib" { 41 file copy ${worksrcpath}/${dir} ${docdir} 41 sample/sample-scripts" { 42 file copy ${worksrcpath}/${dir} ${exdir}/ 42 43 } 43 xinstall -m 644 -W ${worksrcpath} AUTHORS ${docdir} 44 file copy ${worksrcpath}/contrib ${docdir}/ 45 xinstall -m 644 -W ${worksrcpath} AUTHORS ${docdir}/ 46 reinplace "s|;user nobody|user nobody|;s|;group nobody|group nobody|;" \ 47 ${destroot}${prefix}/share/examples/${name}/sample-config-files/server.conf \ 48 ${destroot}${prefix}/share/examples/${name}/sample-config-files/client.conf \ 49 ${destroot}${prefix}/share/examples/${name}/sample-config-files/static-home.conf \ 50 ${destroot}${prefix}/share/examples/${name}/sample-config-files/static-office.conf \ 51 ${destroot}${prefix}/share/examples/${name}/sample-config-files/tls-home.conf \ 52 ${destroot}${prefix}/share/examples/${name}/sample-config-files/tls-office.conf 44 53 } 45 54 46 if {${os.platform} eq "darwin" && ${os.major} <= 9} { 55 post-activate { 56 if {![file exists ${prefix}/etc/${name}]} { 57 xinstall -d ${prefix}/etc/${name} 58 } 59 foreach f { server.conf client.conf } { 60 if {![file exists ${prefix}/etc/${name}/${f}]} { 61 xinstall ${prefix}/share/examples/${name}/sample-config-files/${f} ${prefix}/etc/${name}/ 62 } 63 } 64 } 65 66 notes " 67 If not existing, a default server.conf has been created in ${prefix}/etc/${name}/ 68 Startup launch script is set to start with it. 69 Please adjust to your need, especially passphrase or certificates 70 71 For minimal configuration, you need to follow these steps 72 73 A) With a shared secret 74 $ sudo openvpn --genkey --secret ${prefix}/etc/openvpn2/static.key 75 Use 'secret static.key' in your config file 76 77 B) With self-signed certificates, follow 78 https://openvpn.net/index.php/open-source/documentation/howto.html#pki 79 80 Alternate GUI: https://code.google.com/p/tunnelblick/ 81 82 Openvpn uses a tun device to create its network interface. It could either be: 83 - utun device built into OSX 10.7+ 84 - tun device from port tuntaposx 85 " 86 87 if {${os.platform} == "darwin" && ${os.major} <= 9} { 47 88 post-patch { 48 89 reinplace "s|security/pam_appl.h|pam/pam_appl.h|g" ${worksrcpath}/src/plugins/auth-pam/auth-pam.c 49 90 } 50 91 } 51 92 52 livecheck.url ${homepage}/download.html 53 livecheck.regex openvpn-(\[0-9.\]*).tar.gz 93 startupitem.create yes 94 startupitem.executable "${prefix}/bin/openvpn2 --config ${prefix}/etc/${name}/server.conf" 95 96 livecheck.type regex 97 livecheck.url ${homepage}/index.php/open-source/downloads.html 98 livecheck.regex "/openvpn-(\\d+(?:\\.\\d+)*).tar.gz\">" 99