2014-10-16 22:46:05 +00:00
|
|
|
require "formula"
|
2011-06-22 05:45:27 +00:00
|
|
|
|
|
|
|
class Snort < Formula
|
2014-10-16 22:46:05 +00:00
|
|
|
homepage "https://www.snort.org"
|
|
|
|
revision 1
|
2014-08-19 22:14:02 +00:00
|
|
|
|
|
|
|
stable do
|
2014-10-16 22:46:05 +00:00
|
|
|
url "https://www.snort.org/downloads/snort/snort-2.9.6.2.tar.gz"
|
|
|
|
sha1 "09068bc88dbb3fe47b2bff5803a7b3ef0c98395b"
|
2014-08-19 22:14:02 +00:00
|
|
|
fails_with :clang
|
|
|
|
end
|
2011-06-22 05:45:27 +00:00
|
|
|
|
2014-07-22 20:09:38 +00:00
|
|
|
devel do
|
2014-10-16 22:46:05 +00:00
|
|
|
url "https://www.snort.org/downloads/snortdev/snort-2.9.7.0_rc.tar.gz"
|
|
|
|
sha1 "945090c3a1a726f9e05c4538903492928dba901f"
|
|
|
|
|
|
|
|
depends_on "luajit"
|
2014-07-22 20:09:38 +00:00
|
|
|
end
|
|
|
|
|
2014-10-16 22:46:05 +00:00
|
|
|
depends_on "daq"
|
|
|
|
depends_on "libdnet"
|
|
|
|
depends_on "pcre"
|
|
|
|
depends_on "openssl"
|
2011-06-22 05:45:27 +00:00
|
|
|
|
2014-10-16 22:46:05 +00:00
|
|
|
option "enable-debug", "Compile Snort with --enable-debug and --enable-debug-msgs"
|
2012-05-15 03:18:46 +00:00
|
|
|
|
2011-06-22 05:45:27 +00:00
|
|
|
def install
|
2014-10-16 22:46:05 +00:00
|
|
|
openssl = Formula["openssl"]
|
|
|
|
|
2012-05-15 03:18:46 +00:00
|
|
|
args = %W[--prefix=#{prefix}
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--enable-gre
|
|
|
|
--enable-mpls
|
|
|
|
--enable-targetbased
|
|
|
|
--enable-ppm
|
|
|
|
--enable-perfprofiling
|
|
|
|
--enable-zlib
|
2014-10-16 22:46:05 +00:00
|
|
|
--with-openssl-includes=#{openssl.opt_include}
|
|
|
|
--with-openssl-libraries=#{openssl.opt_lib}
|
2012-05-15 03:18:46 +00:00
|
|
|
--enable-active-response
|
|
|
|
--enable-normalizer
|
|
|
|
--enable-reload
|
|
|
|
--enable-react
|
|
|
|
--enable-flexresp3]
|
|
|
|
|
2014-10-16 22:46:05 +00:00
|
|
|
if build.include? "enable-debug"
|
2012-05-15 03:18:46 +00:00
|
|
|
args << "--enable-debug"
|
|
|
|
args << "--enable-debug-msgs"
|
|
|
|
else
|
|
|
|
args << "--disable-debug"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2014-10-16 22:46:05 +00:00
|
|
|
system "make", "install"
|
2011-06-22 05:45:27 +00:00
|
|
|
end
|
|
|
|
|
2012-08-22 16:06:01 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2011-06-22 05:45:27 +00:00
|
|
|
For snort to be functional, you need to update the permissions for /dev/bpf*
|
|
|
|
so that they can be read by non-root users. This can be done manually using:
|
|
|
|
sudo chmod 644 /dev/bpf*
|
|
|
|
or you could create a startup item to do this for you.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|