homebrew-cask/Casks/wireshark.rb

41 lines
1.5 KiB
Ruby
Raw Normal View History

2013-08-15 01:03:43 +08:00
class Wireshark < Cask
url 'http://wiresharkdownloads.riverbed.com/wireshark/osx/Wireshark%201.10.7%20Intel%2064.dmg'
2013-08-15 01:03:43 +08:00
homepage 'http://www.wireshark.org'
2014-05-03 00:06:18 +08:00
version '1.10.7'
sha256 'df89621fdca8bd09aa633b2af6fa3e193872797a1cdf3feaf86f2183d68e2a5a'
install 'Wireshark 1.10.7 Intel 64.pkg'
after_install do
if Process.euid == 0 then
ohai "Note:"
puts <<-EOS.undent
You executed 'brew cask' as the superuser.
You must manually add users to group 'access_bpf' in order to use Wireshark
EOS
else
system '/usr/bin/sudo', '-E', '--',
'/usr/sbin/dseditgroup', '-o', 'edit', '-a', Etc.getpwuid(Process.euid).name, '-t', 'user', '--', 'access_bpf'
end
end
uninstall :script => {
:executable => '/usr/sbin/dseditgroup',
:args => ['-o', 'delete', 'access_bpf'],
},
:pkgutil => 'org.wireshark.*',
:files => [
'/usr/local/bin/capinfos',
'/usr/local/bin/dftest',
'/usr/local/bin/dumpcap',
'/usr/local/bin/editcap',
'/usr/local/bin/mergecap',
'/usr/local/bin/randpkt',
'/usr/local/bin/rawshark',
'/usr/local/bin/text2pcap',
'/usr/local/bin/tshark',
'/usr/local/bin/wireshark',
]
2013-08-15 01:03:43 +08:00
end