homebrew-core/Formula/ettercap.rb

36 lines
948 B
Ruby
Raw Normal View History

require 'formula'
class Ettercap < Formula
2013-04-19 12:59:07 +00:00
homepage 'http://ettercap.github.io/ettercap/'
url 'https://downloads.sourceforge.net/project/ettercap/ettercap/0.7.6-Locard/ettercap-0.7.6.tar.gz'
sha1 '55818952a8c28beb1b650f3ccc9600a2d784a18f'
depends_on 'cmake' => :build
depends_on 'ghostscript' => :build
depends_on 'pcre'
depends_on 'libnet'
depends_on 'curl' # require libcurl >= 7.26.0
# 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
def install
2014-03-06 05:28:31 +00:00
libnet = Formula['libnet'].opt_lib
args = ['..'] + std_cmake_args + [
"-DINSTALL_SYSCONFDIR=#{etc}",
'-DENABLE_GTK=OFF',
2014-03-06 05:28:31 +00:00
"-DHAVE_LIBNET:FILEPATH=#{libnet}/libnet.dylib"
]
mkdir "build" do
system "cmake", *args
system "make install"
end
end
end