PageRenderTime 40ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/Library/Formula/snort.rb

https://github.com/aaroncm/homebrew
Ruby | 52 lines | 45 code | 7 blank | 0 comment | 3 complexity | 907f3815833999048f9d5486cbf502d4 MD5 | raw file
  1. require 'formula'
  2. class Snort < Formula
  3. homepage 'http://www.snort.org'
  4. url 'http://www.snort.org/dl/snort-current/snort-2.9.3.tar.gz'
  5. md5 'e128f5d5d14dad335dc0c549c7fe2e98'
  6. depends_on 'daq'
  7. depends_on 'libdnet'
  8. depends_on 'pcre'
  9. def options
  10. [['--enable-debug', "Compile Snort with --enable-debug and --enable-debug-msgs"]]
  11. end
  12. def install
  13. args = %W[--prefix=#{prefix}
  14. --disable-dependency-tracking
  15. --enable-ipv6
  16. --enable-gre
  17. --enable-mpls
  18. --enable-targetbased
  19. --enable-decoder-preprocessor-rules
  20. --enable-ppm
  21. --enable-perfprofiling
  22. --enable-zlib
  23. --enable-active-response
  24. --enable-normalizer
  25. --enable-reload
  26. --enable-react
  27. --enable-flexresp3]
  28. if ARGV.include?('--enable-debug')
  29. args << "--enable-debug"
  30. args << "--enable-debug-msgs"
  31. else
  32. args << "--disable-debug"
  33. end
  34. system "./configure", *args
  35. system "make install"
  36. end
  37. def caveats
  38. <<-EOS.undent
  39. For snort to be functional, you need to update the permissions for /dev/bpf*
  40. so that they can be read by non-root users. This can be done manually using:
  41. sudo chmod 644 /dev/bpf*
  42. or you could create a startup item to do this for you.
  43. EOS
  44. end
  45. end