2014-11-01 00:00:41 +00:00
|
|
|
require "formula"
|
2012-01-11 18:15:58 +00:00
|
|
|
|
|
|
|
class Ettercap < Formula
|
2014-11-01 00:00:41 +00:00
|
|
|
homepage "http://ettercap.github.io/ettercap/"
|
2014-03-19 03:19:34 +00:00
|
|
|
|
|
|
|
stable do
|
2014-11-01 00:00:41 +00:00
|
|
|
url "https://github.com/Ettercap/ettercap/archive/v0.8.1.tar.gz"
|
|
|
|
sha1 "66362ce69cd9b82b9eb8ea6a52048700704a7d9b"
|
2014-11-06 17:30:12 +00:00
|
|
|
|
|
|
|
# Upstream patch to fix Luajit compile on OS X
|
|
|
|
# Both of these patches are already in HEAD.
|
|
|
|
# https://github.com/Ettercap/ettercap/pull/618
|
|
|
|
# https://github.com/Homebrew/homebrew/issues/33902
|
|
|
|
patch do
|
|
|
|
url "https://github.com/Ettercap/ettercap/commit/190e4264e3.diff"
|
|
|
|
sha1 "4d8cadd8ca19956450e7e2d52f92dc649d393acf"
|
|
|
|
end
|
|
|
|
|
|
|
|
patch do
|
|
|
|
url "https://github.com/Ettercap/ettercap/commit/e505088db.diff"
|
|
|
|
sha1 "db0f121aeba34286c5f6a16e523ac675868b384c"
|
|
|
|
end
|
2014-03-19 03:19:34 +00:00
|
|
|
end
|
2014-03-08 07:55:57 +00:00
|
|
|
|
2014-11-06 17:40:32 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "b7d7bfc3d98015cea228473b239a0fe9ae41127d" => :yosemite
|
|
|
|
sha1 "15b7682fbba8687cfaa8effd00b7f6dd0ced8e91" => :mavericks
|
|
|
|
sha1 "d221416cc95911a965ea1821b1a218531b4ea349" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2014-03-08 07:55:57 +00:00
|
|
|
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"
|
2012-01-11 18:15:58 +00:00
|
|
|
|
2014-11-01 00:00:41 +00:00
|
|
|
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 "gtk+" => :optional
|
|
|
|
depends_on "luajit" => :optional
|
|
|
|
depends_on "openssl"
|
2012-01-11 18:15:58 +00:00
|
|
|
|
|
|
|
def install
|
2014-03-08 07:55:57 +00:00
|
|
|
args = std_cmake_args
|
2013-01-10 09:00:10 +00:00
|
|
|
|
2014-03-08 07:55:57 +00:00
|
|
|
# specify build type manually since std_cmake_args sets the build type to "None".
|
|
|
|
args << "-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
|
|
|
|
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"
|
2014-04-24 09:28:45 +00:00
|
|
|
args << "-DENABLE_PDF_DOCS=ON" if build.with? "ghostscript"
|
2014-03-08 07:55:57 +00:00
|
|
|
args << "-DENABLE_GTK=OFF" if build.without? "gtk+"
|
|
|
|
args << "-DENABLE_LUA=ON" if build.with? "luajit"
|
|
|
|
args << ".."
|
2013-01-10 09:00:10 +00:00
|
|
|
|
|
|
|
mkdir "build" do
|
|
|
|
system "cmake", *args
|
2014-11-06 17:30:12 +00:00
|
|
|
system "make", "install"
|
2013-01-10 09:00:10 +00:00
|
|
|
end
|
2012-01-11 18:15:58 +00:00
|
|
|
end
|
|
|
|
end
|