1 # Note that this is NOT a relocatable package
5 # Set these to 1 if you want to ensure your package inclues support for them:
8 %global with_portaudio 0
10 # Set to 1 if you want GTK3 instead of GTK2:
13 # Set at most one of these two:
14 # Note that setcap requires rpmbuild 4.7.0 or later.
15 %global setuid_dumpcap 0
16 %global setcap_dumpcap 1
18 # Set to 1 if you want a group called 'wireshark' which users must be a member
19 # of in order to run dumpcap. Only used if setuid_dumpcap or setcap_dumpcap
21 %global use_wireshark_group 1
24 Summary: Network protocol analyzer
29 Group: Applications/Internet
30 Source: http://wireshark.org/download/src/%{name}-%{version}.tar.bz2
31 # Or this URL for automated builds:
32 #Source: http://wireshark.org/download/automated/src/%{name}-%{version}.tar.bz2
33 URL: http://www.wireshark.org/
34 BuildRoot: /tmp/wireshark-%{PACKAGE_VERSION}-root
35 Packager: Gerald Combs <gerald[AT]wireshark.org>
36 # Some distributions create a wireshark-devel package; get rid of it
37 Obsoletes: wireshark-devel
39 BuildRequires: autoconf >= @AC_MIN_VERSION@
40 BuildRequires: flex, bison
44 BuildRequires: glib2-devel >= @GLIB_MIN_VERSION@
45 Requires: glib2 >= @GLIB_MIN_VERSION@
46 BuildRequires: libpcap-devel
48 BuildRequires: zlib-devel
52 BuildRequires: adns-devel
56 BuildRequires: lua-devel
60 # Uncomment these if you want to be sure you get them...
61 #BuildRequires: krb5-devel
62 #BuildRequires: libsmi-devel
63 #BuildRequires: pcre-devel
64 #BuildRequires: libselinux
65 #BuildRequires: gnutls-devel
66 #BuildRequires: libcap-devel
67 #BuildRequires: c-ares-devel
70 %if %{use_wireshark_group}
71 Requires(pre): shadow-utils
73 Requires(post): desktop-file-utils
76 BuildRequires: rpm-build >= 4.7.0
81 Summary: Gnome desktop integration for wireshark
82 Group: Applications/Internet
84 Requires: gtk3 >= @GTK3_MIN_VERSION@
85 BuildRequires: gtk3-devel >= @GTK3_MIN_VERSION@
87 Requires: gtk2 >= @GTK2_MIN_VERSION@
88 BuildRequires: gtk2-devel >= @GTK2_MIN_VERSION@
90 Requires: wireshark = %{version}-%{release}
92 Requires: hicolor-icon-theme
93 BuildRequires: desktop-file-utils
95 BuildRequires: portaudio-devel
99 # Uncomment these if you want to be sure you get them...
100 #BuildRequires: GeoIP-devel
102 # Add this for more readable fonts on some distributions/versions
103 #Requires: dejavu-sans-mono-fonts
107 Wireshark is a free network protocol analyzer for Unix and Windows. It
108 allows you to examine data from a live network or from a capture file
109 on disk. You can interactively browse the capture data, viewing summary
110 and detail information for each packet. Wireshark has several powerful
111 features, including a rich display filter language and the ability to
112 view the reconstructed stream of a TCP session.
114 This package contains command-line utilities, plugins, and documentation for
115 Wireshark. A GTK+ graphical user interface is packaged separately.
118 Contains the Gnome (GTK+) Wireshark GUI and desktop integration files.
121 %setup -q -n %{name}-%{version}
123 # Don't specify the prefix here: %configure is a macro which expands to set
124 # the prefix and everything else too. If you need to change the prefix
125 # set _prefix (note the underscore) either in this file or on rpmbuild's
135 %if %{with_portaudio}
141 --disable-warnings-as-errors
146 rm -rf $RPM_BUILD_ROOT
147 make DESTDIR=$RPM_BUILD_ROOT install
148 make DESTDIR=$RPM_BUILD_ROOT install_desktop_files
149 # Fedora's packaging guidelines (https://fedoraproject.org/wiki/Packaging:Guidelines)
150 # require this (at least if desktop-file-install was not used to install it).
151 desktop-file-validate %{buildroot}/usr/share/applications/wireshark.desktop
154 rm -rf $RPM_BUILD_ROOT
156 %if %{use_wireshark_group}
158 getent group wireshark >/dev/null || groupadd -r wireshark
161 %post -p /sbin/ldconfig
163 %postun -p /sbin/ldconfig
166 update-desktop-database &> /dev/null ||:
167 update-mime-database %{_datadir}/mime &> /dev/null || :
168 touch --no-create %{_datadir}/icons/gnome &>/dev/null || :
169 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
172 update-desktop-database &> /dev/null ||:
173 update-mime-database /usr/share/mime &> /dev/null || :
174 if [ $1 -eq 0 ] ; then
175 touch --no-create /usr/share/icons/gnome &>/dev/null
176 gtk-update-icon-cache /usr/share/icons/gnome &>/dev/null || :
178 touch --no-create /usr/share/icons/hicolor &>/dev/null
179 gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :
182 # Is this really needed?
184 gtk-update-icon-cache /usr/share/icons/gnome &>/dev/null || :
185 gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :
189 %defattr(-,root,root)
190 %doc AUTHORS COPYING ChangeLog INSTALL INSTALL.configure NEWS README*
191 # Don't pick up the wireshark (GUI) binary here
192 %exclude %{_bindir}/wireshark
195 # This generates a warning because dumpcap is listed twice. That's
196 # probably preferable to listing each program (and keeping the list up to
197 # date)... Maybe if we can find a way to get the toplevel Makefile.am's
198 # bin_PROGRAMS in here?
199 %if %{use_wireshark_group} && %{setuid_dumpcap}
200 # Setuid but only executable by members of the 'wireshark' group
201 %attr(4750, root, wireshark) %{_bindir}/dumpcap
203 %if %{use_wireshark_group} && %{setcap_dumpcap}
204 # Setcap but only executable by members of the 'wireshark' group
205 %attr(0750, root, wireshark) %caps(cap_net_raw,cap_net_admin=eip) %{_bindir}/dumpcap
207 %if %{setuid_dumpcap}
208 # Setuid and executable by all
209 %attr(4755, root, root) %{_bindir}/dumpcap
211 %if %{setcap_dumpcap}
212 # Setcap and executable by all
213 %attr(0755, root, root) %caps(cap_net_raw,cap_net_admin=eip) %{_bindir}/dumpcap
215 # Executable by all but with no special permissions
216 %attr(0755, root, root) %{_bindir}/dumpcap
223 %exclude %{_libdir}/%{name}/plugins/%{version}/*.la
224 %exclude %{_libdir}/*.la
226 # Don't pick up the wireshark (GUI) man page
227 %exclude %{_mandir}/man1/wireshark.*
230 %{_datadir}/wireshark
233 %defattr(-,root,root)
234 /usr/share/applications/wireshark.desktop
235 /usr/share/icons/hicolor/*/apps/*
236 /usr/share/icons/gnome/*/mimetypes/*
237 /usr/share/mime/packages/wireshark.xml
239 %{_mandir}/man1/wireshark.*
242 * Mon Feb 6 2013 Jeff Morriss
243 - Overhaul to make this file more useful/up to date. Many changes are based
244 on Fedora's .spec file. Changes include:
245 - Create a separate wireshark-gnome package (like Redhat).
246 - Control some things with variables set at the top of the file.
247 - Allow the user to configure how dumpcap is installed.
248 - Allow the user to choose some options including GTK2 or GTK3.
249 - Greatly expand the BuildRequires entries; get the minimum versions of some
250 things from 'configure'.
251 - Install freedesktop files for better (free)desktop integration.
253 * Thu Aug 10 2006 Joerg Mayer
254 - Starting with X.org 7.x X11R6 is being phased out. Install wireshark
255 and manpage into the standard path.
257 * Mon Aug 01 2005 Gerald Combs
258 - Add a desktop file and icon for future use
260 - Take over the role of packager
262 - Update descriptions and source locations
264 * Thu Oct 28 2004 Joerg Mayer
265 - Add openssl requirement (heimdal and net-snmp are still automatic)
267 * Tue Jul 20 2004 Joerg Mayer
268 - Redo install and files section to actually work with normal builds
270 * Sat Feb 07 2004 Joerg Mayer
271 - in case there are shared libs: include them
273 * Tue Aug 24 1999 Gilbert Ramirez
274 - changed to ethereal.spec.in so that 'configure' can update
275 the version automatically
277 * Tue Aug 03 1999 Gilbert Ramirez <gram@xiexie.org>
278 - updated to 0.7.0 and changed gtk+ requirement
280 * Sun Jan 01 1999 Gerald Combs <gerald@zing.org>
283 * Fri Nov 20 1998 FastJack <fastjack@i-s-o.net>
286 * Sun Nov 15 1998 FastJack <fastjack@i-s-o.net>