homebrew-core/Formula/ettercap.rb

51 lines
1.5 KiB
Ruby

class Ettercap < Formula
desc "Multipurpose sniffer/interceptor/logger for switched LAN"
homepage "https://ettercap.github.io/ettercap/"
url "https://github.com/Ettercap/ettercap/archive/v0.8.3.tar.gz"
sha256 "d561a554562e447f4d7387a9878ba745e1aa8c4690cc4e9faaa779cfdaa61fbb"
revision 2
head "https://github.com/Ettercap/ettercap.git"
bottle do
sha256 "b4a9470528f89b21eeec6c8d4a5b36043e0277780f780a28bcd512e167b7345a" => :catalina
sha256 "899edd3a4fc1994b43e40c4b3b8627c2782a7dff27510a9e9cda829743714548" => :mojave
sha256 "c125a9e33ad530738bc63e3558991f7aabec1135708db08913afa9453dd01c07" => :high_sierra
end
depends_on "cmake" => :build
depends_on "geoip"
depends_on "gtk+3"
depends_on "libnet"
depends_on "ncurses" if DevelopmentTools.clang_build_version >= 1000
depends_on "openssl@1.1"
depends_on "pcre"
def install
# Work around a CMake bug affecting harfbuzz headers and pango
# https://gitlab.kitware.com/cmake/cmake/issues/19531
ENV.append_to_cflags "-I#{Formula["harfbuzz"].opt_include}/harfbuzz"
args = std_cmake_args + %W[
-DBUNDLED_LIBS=OFF
-DENABLE_CURSES=ON
-DENABLE_GTK=ON
-DENABLE_IPV6=ON
-DENABLE_LUA=OFF
-DENABLE_PDF_DOCS=OFF
-DENABLE_PLUGINS=ON
-DGTK_BUILD_TYPE=GTK3
-DINSTALL_DESKTOP=ON
-DINSTALL_SYSCONFDIR=#{etc}
]
mkdir "build" do
system "cmake", "..", *args
system "make", "install"
end
end
test do
assert_match version.to_s, shell_output("#{bin}/ettercap --version")
end
end