From 26153d98e3c738c2a76ca526d7ef84cdb657a0b0 Mon Sep 17 00:00:00 2001 From: Fotos Georgiadis Date: Tue, 13 Nov 2012 18:54:52 +0200 Subject: [PATCH] openvpn devel 2.3-rc1 Closes Homebrew/homebrew#16027. Signed-off-by: Adam Vandenberg --- Formula/openvpn.rb | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/Formula/openvpn.rb b/Formula/openvpn.rb index 54f231a535..20b20807b9 100644 --- a/Formula/openvpn.rb +++ b/Formula/openvpn.rb @@ -6,13 +6,21 @@ class Openvpn < Formula mirror 'http://swupdate.openvpn.org/community/releases/openvpn-2.2.2.tar.gz' sha256 '54ca8b260e2ea3b26e84c2282ccb5f8cb149edcfd424b686d5fb22b8dbbeac00' + devel do + version '2.3-rc1' + + url 'http://build.openvpn.net/downloads/releases/openvpn-2.3_rc1.tar.gz' + mirror 'http://swupdate.openvpn.org/community/releases/openvpn-2.3_rc1.tar.gz' + sha256 '5628423b18a0a05bff2169630e030bc4a440d0e92b820a1b78bc16357d5306e8' + end + depends_on 'lzo' # This patch fixes compilation on Lion # There is a long history of confusion between these two consts: # http://www.google.com/search?q=SOL_IP+IPPROTO_IP def patches - DATA + DATA unless build.devel? end def install @@ -21,14 +29,25 @@ class Openvpn < Formula system "make install" # Adjust sample file paths - inreplace ["sample-config-files/openvpn-startup.sh", "sample-scripts/openvpn.init"] do |s| - s.gsub! "/etc/openvpn", etc+'openvpn' - s.gsub! "/var/run/openvpn", var+'run/openvpn' - end + if build.devel? + inreplace ["sample/sample-config-files/openvpn-startup.sh"] do |s| + s.gsub! "/etc/openvpn", etc+'openvpn' + end - # Install sample files - Dir['sample-*'].each do |d| - (share + 'doc/openvpn' + d).install Dir[d+'/*'] + # Install sample files + Dir['sample/sample-*'].each do |d| + (share + 'doc/openvpn' + d).install Dir[d+'/*'] + end + else + inreplace ["sample-config-files/openvpn-startup.sh", "sample-scripts/openvpn.init"] do |s| + s.gsub! "/etc/openvpn", etc+'openvpn' + s.gsub! "/var/run/openvpn", var+'run/openvpn' + end + + # Install sample files + Dir['sample-*'].each do |d| + (share + 'doc/openvpn' + d).install Dir[d+'/*'] + end end # Create etc & var paths