openvpn devel 2.3-rc1

Closes Homebrew/homebrew#16027.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Fotos Georgiadis 2012-11-13 18:54:52 +02:00 committed by Adam Vandenberg
parent 1692173222
commit 26153d98e3

View file

@ -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