2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-06 22:54:52 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Wireshark < Formula
|
2012-02-18 18:00:39 +00:00
|
|
|
homepage 'http://www.wireshark.org'
|
2012-04-07 18:12:46 +00:00
|
|
|
url 'http://wiresharkdownloads.riverbed.com/wireshark/src/all-versions/wireshark-1.6.7.tar.bz2'
|
|
|
|
sha1 '392c4f35cd8d16287ba9eba3afec226fcadd9746'
|
2009-06-06 22:54:52 +00:00
|
|
|
|
2012-01-31 02:08:07 +00:00
|
|
|
devel do
|
2012-04-07 18:13:01 +00:00
|
|
|
url 'http://wiresharkdownloads.riverbed.com/wireshark/src/all-versions/wireshark-1.7.1.tar.bz2'
|
|
|
|
sha1 '8f49b60c971ffd4857cb05afa82e22152261645f'
|
2012-01-31 02:08:07 +00:00
|
|
|
end
|
|
|
|
|
2012-02-18 18:00:39 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-04-27 15:32:57 +00:00
|
|
|
depends_on 'gnutls' => :optional
|
2012-02-18 18:00:39 +00:00
|
|
|
depends_on 'c-ares' => :optional
|
2010-04-27 15:32:57 +00:00
|
|
|
depends_on 'pcre' => :optional
|
2010-01-13 13:50:24 +00:00
|
|
|
depends_on 'glib'
|
2012-02-18 18:00:39 +00:00
|
|
|
depends_on 'gtk+' if ARGV.include? '--with-x'
|
2010-11-03 06:16:44 +00:00
|
|
|
|
|
|
|
def options
|
2012-02-18 18:00:39 +00:00
|
|
|
[
|
|
|
|
['--with-x', 'Include X11 support'],
|
|
|
|
['--with-python', 'Enable experimental python bindings']
|
|
|
|
]
|
2010-11-03 06:16:44 +00:00
|
|
|
end
|
2010-11-04 04:32:25 +00:00
|
|
|
|
2009-06-06 22:54:52 +00:00
|
|
|
def install
|
2010-11-03 06:16:44 +00:00
|
|
|
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
|
|
|
|
|
2012-02-18 18:00:39 +00:00
|
|
|
# Optionally enable experimental python bindings; is known to cause
|
|
|
|
# some runtime issues, e.g.
|
|
|
|
# "dlsym(0x8fe467fc, py_create_dissector_handle): symbol not found"
|
|
|
|
args << '--without-python' unless ARGV.include? '--with-python'
|
2011-12-02 23:16:03 +00:00
|
|
|
|
2010-11-03 06:16:44 +00:00
|
|
|
# actually just disables the GTK GUI
|
2012-02-18 18:00:39 +00:00
|
|
|
args << '--disable-wireshark' unless ARGV.include? '--with-x'
|
2010-11-03 06:16:44 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2010-04-27 15:32:57 +00:00
|
|
|
system "make"
|
2012-02-18 18:00:39 +00:00
|
|
|
ENV.deparallelize # parallel install fails
|
2009-06-06 22:54:52 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2011-03-03 02:23:35 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
If your list of available capture interfaces is empty
|
|
|
|
(default OS X behavior), try the following commands:
|
|
|
|
|
|
|
|
wget https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -O ChmodBPF.tar.gz
|
|
|
|
tar zxvf ChmodBPF.tar.gz
|
|
|
|
open ChmodBPF/Install\\ ChmodBPF.app
|
|
|
|
|
|
|
|
This adds a launch daemon that changes the permissions of your BPF
|
|
|
|
devices so that all users in the 'admin' group - all users with
|
|
|
|
'Allow user to administer this computer' turned on - have both read
|
|
|
|
and write access to those devices.
|
|
|
|
|
|
|
|
See bug report:
|
|
|
|
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3760
|
|
|
|
EOS
|
|
|
|
end
|
2009-06-06 22:54:52 +00:00
|
|
|
end
|
2010-11-03 06:16:44 +00:00
|
|
|
|