vpnc 0.5.3r550
Closes Homebrew/homebrew#42420. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
parent
0868fc5bf8
commit
8498037a18
1 changed files with 22 additions and 14 deletions
|
@ -1,23 +1,26 @@
|
|||
class Vpnc < Formula
|
||||
desc "Cisco VPN concentrator client"
|
||||
homepage "http://www.unix-ag.uni-kl.de/~massar/vpnc/"
|
||||
url "http://ftp.debian.org/debian/pool/main/v/vpnc/vpnc_0.5.3r512.orig.tar.gz"
|
||||
version "0.5.3r512"
|
||||
sha256 "d421ac20b6c65d22d2ee88066e487f740f4d367f9143b6045bcb8fa177b384fe"
|
||||
revision 2
|
||||
homepage "https://www.unix-ag.uni-kl.de/~massar/vpnc/"
|
||||
url "https://mirrors.ocf.berkeley.edu/debian/pool/main/v/vpnc/vpnc_0.5.3r550.orig.tar.gz"
|
||||
mirror "https://mirrors.kernel.org/debian/pool/main/v/vpnc/vpnc_0.5.3r550.orig.tar.gz"
|
||||
version "0.5.3r550"
|
||||
sha256 "a6afdd55db20e2c17b3e1ea9e3f017894111ec4ad94622644fc841c146942e71"
|
||||
|
||||
option "with-hybrid", "Use vpnc hybrid authentication"
|
||||
|
||||
deprecated_option "hybrid" => "with-hybrid"
|
||||
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "libgcrypt"
|
||||
depends_on "libgpg-error"
|
||||
depends_on "gnutls"
|
||||
depends_on :tuntap
|
||||
depends_on "openssl" if build.with? "hybrid"
|
||||
|
||||
fails_with :llvm do
|
||||
build 2334
|
||||
end
|
||||
|
||||
option "hybrid", "Use vpnc hybrid authentication"
|
||||
|
||||
# Patch from user @Imagesafari to enable compilation on Lion
|
||||
patch :DATA if MacOS.version >= :lion
|
||||
|
||||
|
@ -25,30 +28,35 @@ class Vpnc < Formula
|
|||
ENV.no_optimization
|
||||
ENV.deparallelize
|
||||
|
||||
(var/"run/vpnc").mkpath
|
||||
|
||||
inreplace ["vpnc-script", "vpnc-disconnect"] do |s|
|
||||
s.gsub! "/var/run/vpnc", (var + "run/vpnc")
|
||||
s.gsub! "/var/run/vpnc", "#{var}/run/vpnc"
|
||||
end
|
||||
|
||||
inreplace "vpnc.8.template" do |s|
|
||||
s.gsub! "/etc/vpnc", (etc + "vpnc")
|
||||
s.gsub! "/etc/vpnc", "#{etc}/vpnc"
|
||||
end
|
||||
|
||||
inreplace "Makefile" do |s|
|
||||
s.change_make_var! "PREFIX", prefix
|
||||
s.change_make_var! "ETCDIR", (etc + "vpnc")
|
||||
s.change_make_var! "ETCDIR", etc/"vpnc"
|
||||
|
||||
s.gsub! /^#OPENSSL/, "OPENSSL" if build.include? "hybrid"
|
||||
s.gsub! /^#OPENSSL/, "OPENSSL" if build.with? "hybrid"
|
||||
end
|
||||
|
||||
inreplace "config.c" do |s|
|
||||
s.gsub! "/etc/vpnc", (etc + "vpnc")
|
||||
s.gsub! "/var/run/vpnc", (var + "run/vpnc")
|
||||
s.gsub! "/etc/vpnc", "#{etc}/vpnc"
|
||||
s.gsub! "/var/run/vpnc", "#{var}/run/vpnc"
|
||||
end
|
||||
|
||||
system "make"
|
||||
(var + "run/vpnc").mkpath
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match /vpnc version/, shell_output("#{sbin}/vpnc --version")
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
|
|
Loading…
Reference in a new issue