2012-01-11 18:15:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ettercap < Formula
|
2013-04-19 12:59:07 +00:00
|
|
|
homepage 'http://ettercap.github.io/ettercap/'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/ettercap/ettercap/0.7.6-Locard/ettercap-0.7.6.tar.gz'
|
2013-03-27 05:52:33 +00:00
|
|
|
sha1 '55818952a8c28beb1b650f3ccc9600a2d784a18f'
|
2012-01-11 18:15:58 +00:00
|
|
|
|
2013-01-10 09:00:10 +00:00
|
|
|
depends_on 'cmake' => :build
|
|
|
|
depends_on 'ghostscript' => :build
|
2012-01-11 18:15:58 +00:00
|
|
|
depends_on 'pcre'
|
|
|
|
depends_on 'libnet'
|
2013-01-10 09:00:10 +00:00
|
|
|
depends_on 'curl' # require libcurl >= 7.26.0
|
2012-01-11 18:15:58 +00:00
|
|
|
|
2013-04-19 19:57:54 +00:00
|
|
|
# fixes absence of strndup function on 10.6 and lower; merged upstream
|
|
|
|
def patches
|
2014-02-25 05:29:03 +00:00
|
|
|
if MacOS.version < :lion
|
|
|
|
"https://github.com/Ettercap/ettercap/commit/1692218693ed419465466299c8c76da41c37c945.patch"
|
|
|
|
end
|
|
|
|
end
|
2013-04-19 19:57:54 +00:00
|
|
|
|
2012-01-11 18:15:58 +00:00
|
|
|
def install
|
2014-03-06 05:28:31 +00:00
|
|
|
libnet = Formula['libnet'].opt_lib
|
2013-01-10 09:00:10 +00:00
|
|
|
|
|
|
|
args = ['..'] + std_cmake_args + [
|
|
|
|
"-DINSTALL_SYSCONFDIR=#{etc}",
|
|
|
|
'-DENABLE_GTK=OFF',
|
2014-03-06 05:28:31 +00:00
|
|
|
"-DHAVE_LIBNET:FILEPATH=#{libnet}/libnet.dylib"
|
2013-01-10 09:00:10 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
mkdir "build" do
|
|
|
|
system "cmake", *args
|
|
|
|
system "make install"
|
|
|
|
end
|
2012-01-11 18:15:58 +00:00
|
|
|
end
|
|
|
|
end
|