forked from Homebrew/legacy-homebrew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wireshark.rb
77 lines (60 loc) · 2.23 KB
/
wireshark.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
require 'formula'
class Wireshark < Formula
homepage 'https://www.wireshark.org'
url 'https://wiresharkdownloads.riverbed.com/wireshark/src/wireshark-1.10.0.tar.bz2'
mirror 'https://www.wireshark.org/download/src/wireshark-1.10.0.tar.bz2'
sha1 'c78a5d5e589edc8ebc702eb00a284ccbca7721bc'
head 'https://anonsvn.wireshark.org/wireshark/trunk/', :using => :svn
if build.head?
# These are required on the HEAD build because the configure
# script doesn't live on the subversion repository.
depends_on :autoconf
depends_on :automake
depends_on :libtool
end
option 'with-x', 'Include X11 support'
option 'with-qt', 'Use QT for GUI instead of GTK+'
depends_on 'pkg-config' => :build
depends_on 'glib'
depends_on 'gnutls'
depends_on 'libgcrypt'
depends_on 'geoip' => :recommended
depends_on 'c-ares' => :optional
depends_on 'lua' => :optional
depends_on 'pcre' => :optional
depends_on 'portaudio' => :optional
depends_on 'qt' => :optional
if build.with? 'x'
depends_on :x11
depends_on 'gtk+'
end
def install
system "./autogen.sh" if build.head?
args = ["--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-gnutls",
"--with-ssl"]
args << "--disable-warnings-as-errors" if build.head?
args << "--disable-wireshark" unless build.with? "x" or build.with? "qt"
args << "--disable-gtktest" unless build.with? "x"
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