Building MacPorts vpnc with OpenSSL enabled

By , 2009-12-06 17:29

run a sudo port install vpnc

then cd to /opt/local/var/macports/distfiles/vpnc
tar xzvf vpnc-0.5.3.tar.gz

then cd to vpnc-0.5.3 and edit the Makefile. find and uncomment the lines pertaining to OpenSSL GPL violation:

# Some distributions like Suse and Fedora seem to think otherwise.
 
# Comment this in to obtain a binary with certificate support which is
# GPL incompliant though.
OPENSSL_GPL_VIOLATION = -DOPENSSL_GPL_VIOLATION
OPENSSLLIBS = -lcrypto

[email protected]:/opt/local/var/macports/distfiles/vpnc$ sudo mv vpnc-0.5.3.tar.gz vpnc-0.5.3-GPl.tar.gz
[email protected]:/opt/local/var/macports/distfiles/vpnc$ sudo tar czvf vpnc-0.5.3.tar.gz vpnc-0.5.3

sudo port uninstall vpnc
sudo port clean vpnc

Now, you’d think you can build vpnc using macports. however, running sudo port install vpnc gives:

$ sudo port install vpnc
—>  Computing dependencies for vpnc
—>  Fetching vpnc
—>  Verifying checksum(s) for vpnc
Error: Checksum (sha1) mismatch for vpnc-0.5.3.tar.gz
Error: Checksum (rmd160) mismatch for vpnc-0.5.3.tar.gz
Error: Target org.macports.checksum returned: Unable to verify file checksums
Error: Status 1 encountered during processing.

Macports checks the checksum of the tar.gz to ensure that your download isn’t corrupted. So open up a new Terminal window.

$ cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/net/vpnc/

$ sudo nano Portfile

Find the current checksums:

checksums           sha1 321527194e937371c83b5e7c38e46fca4f109304 \
                    rmd160 6f3926901e75dc98762f6ef45782930f2fb76a2f

Back in your other Terminal window,
[email protected]:/opt/local/var/macports/distfiles/vpnc$ shasum vpnc-0.5.3.tar.gz
22feb011388d0d7d1ef2c81ff2f1fb22039c475a  vpnc-0.5.3.tar.gz

Replace the sha1 checksum with the one you found using the shasum command. Then delete the \ and the whole rmd160 line.

Now run sudo port install vpnc. it should now build with OpenSSL support!

Now only one thing left, install the TunTap driver from http://tuntaposx.sourceforge.net/.

And vpnc works! edit your config file in /opt/local/etc/vpnc.

3 Responses to “Building MacPorts vpnc with OpenSSL enabled”

  1. Jason Fesler says:
    Safari 5.1 Safari 5.1 Mac OS X  10.7 Mac OS X 10.7
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3

    Thank you! Works great.

  2. rvt says:
    Safari 5.1 Safari 5.1 Mac OS X  10.7.1 Mac OS X 10.7.1
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3

    Amen… works great!

  3. Daniel Larsson says:
    Safari 5.1 Safari 5.1 Mac OS X  10.6.8 Mac OS X 10.6.8
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50

    There is now an easier way:

    port install vpnc +hybrid_cert

Leave a Reply to rvt

 

Custom theme by me. Based on Panorama by Themocracy