Created
May 15, 2013 13:30
-
-
Save michaelklishin/5583991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Wireshark < Formula | |
homepage 'http://www.wireshark.org' | |
url 'http://www.wireshark.org/download/src/wireshark-1.8.6.tar.bz2' | |
sha1 '0f51ed901b5e07cceb1373f3368f739be8f1e827' | |
option 'with-x', 'Include X11 support' | |
option 'with-qt', 'Use QT for GUI instead of GTK+' | |
option 'with-ssl', 'Enable SSL support' | |
option 'with-python', 'Enable experimental Python bindings' | |
depends_on 'pkg-config' => :build | |
depends_on 'c-ares' => :optional | |
depends_on 'pcre' => :optional | |
depends_on 'glib' | |
if build.with? 'x' | |
depends_on :x11 | |
depends_on 'gtk+' | |
end | |
if build.with? 'ssl' | |
depends_on 'gnutls2' | |
depends_on 'libgcrypt' | |
end | |
depends_on 'qt' => :optional | |
def install | |
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"] | |
# 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 build.with? 'python' | |
# actually just disables the GTK GUI | |
args << '--disable-wireshark' unless build.with? 'x' | |
args << '--disable-gtktest' if build.with? 'x' | |
if build.with? 'ssl' | |
args << '--with-gnutls' | |
args << '--with-ssl' | |
end | |
args << '--with-qt' if build.with? 'qt' | |
system "./configure", *args | |
system "make" | |
ENV.deparallelize # parallel install fails | |
system "make install" | |
end | |
def caveats; <<-EOS.undent | |
If your list of available capture interfaces is empty | |
(default OS X behavior), try the following commands: | |
curl 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 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment