blob: 2355667127b0abaf224c6d1abe755c4231f2c0cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  | 
require "formula"
class Openconnect < Formula
  homepage "http://www.infradead.org/openconnect.html"
  url "ftp://ftp.infradead.org/pub/openconnect/openconnect-5.99.tar.gz"
  sha1 "3ac20e50f2700ff58d1635f210fc263d29cf7768"
  revision 1
  bottle do
    sha1 "71ff1c7e9f70a0a797d8774cc76261fb231c9e4b" => :mavericks
    sha1 "a9a1b80896f27a630484ac82174e7c5a8fecf173" => :mountain_lion
    sha1 "59e10238371deab8efa073bcfefa5dd0381e11f2" => :lion
  end
  head do
    url "git://git.infradead.org/users/dwmw2/openconnect.git", :shallow => false
    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end
  option "with-gnutls", "Use GnuTLS instead of OpenSSL"
  depends_on "pkg-config" => :build
  depends_on "gettext"
  depends_on "openssl" if build.without? "gnutls"
  depends_on "gnutls" => :optional
  resource "vpnc-script" do
    url "http://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/d2c5a77f3f0ea6ad80fc59158127d63ede81a6cb:/vpnc-script"
    sha1 "9915539c34393c1f8d7de9c3fc2c7396476bd998"
  end
  def install
    etc.install resource("vpnc-script")
    chmod 0755, "#{etc}/vpnc-script"
    if build.head?
      ENV["GIT_DIR"] = cached_download/".git"
      ENV["LIBTOOLIZE"] = "glibtoolize"
      system "./autogen.sh"
    end
    args = %W[
      --prefix=#{prefix}
      --sbindir=#{bin}
      --localstatedir=#{var}
      --with-vpnc-script=#{etc}/vpnc-script
    ]
    system "./configure", *args
    system "make install"
  end
  def caveats; <<-EOS.undent
    OpenConnect requires the use of a TUN/TAP driver.
    You can download one at http://tuntaposx.sourceforge.net/
    and install it prior to running OpenConnect.
    EOS
  end
end
  |