blob: c370ec6a0c30f63d77d042573616681857d06bae (
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
 | class Ettercap < Formula
  homepage "https://ettercap.github.io/ettercap/"
  url "https://github.com/Ettercap/ettercap/archive/v0.8.2.tar.gz"
  sha256 "f38514f35bea58bfe6ef1902bfd4761de0379942a9aa3e175fc9348f4eef2c81"
  bottle do
    sha256 "1c6bc00b1f7dc226fb6378669c4704de9a190439ba1edef083fb9178d09faac0" => :yosemite
    sha256 "b51137d64a04f49737a639f097dc725e2ffc36ec7dd52295bdafd7db9ea4dff7" => :mavericks
    sha256 "4a2f65a3d3606b465f0bab5cb1c27a5599815a23bb59a4ba126f8ed9fdf60a9f" => :mountain_lion
  end
  head "https://github.com/Ettercap/ettercap.git"
  option "without-curses", "Install without curses interface"
  option "without-plugins", "Install without plugins support"
  option "with-ipv6", "Install with IPv6 support"
  depends_on "cmake" => :build
  depends_on "ghostscript" => [:build, :optional]
  depends_on "pcre"
  depends_on "libnet"
  depends_on "curl" # require libcurl >= 7.26.0
  depends_on "openssl"
  depends_on "gtk+" => :optional
  depends_on "luajit" => :optional
  def install
    args = std_cmake_args
    args << "-DINSTALL_SYSCONFDIR=#{etc}"
    args << "-DENABLE_CURSES=OFF" if build.without? "curses"
    args << "-DENABLE_PLUGINS=OFF" if build.without? "plugins"
    args << "-DENABLE_IPV6=ON" if build.with? "ipv6"
    args << "-DENABLE_PDF_DOCS=ON" if build.with? "ghostscript"
    args << "-DENABLE_GTK=OFF" if build.without? "gtk+"
    args << "-DENABLE_LUA=ON" if build.with? "luajit"
    args << ".."
    mkdir "build" do
      system "cmake", *args
      system "make", "install"
    end
  end
  test do
    system bin/"ettercap", "--version"
  end
end
 |