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:
9 %global with_portaudio
0
11 # Set to 1 if you want GTK3 instead of GTK2:
13 # Set to 1 if you want the Qt GUI too
16 # Set at most one of these two:
17 # Note that setcap requires rpmbuild 4.7.0 or later.
18 %global setuid_dumpcap
0
19 %global setcap_dumpcap
1
21 # Set to 1 if you want a group called 'wireshark' which users must be a member
22 # of in order to run dumpcap. Only used if setuid_dumpcap or setcap_dumpcap
24 %global use_wireshark_group
1
27 Summary: Network protocol analyzer
32 Group: Applications
/Internet
33 Source: http
://wireshark.org
/download
/src
/%{name}-%{version}.tar.bz2
34 # Or this URL for automated builds:
35 #Source: http://wireshark.org/download/automated/src/%{name}-%{version}.tar.bz2
36 URL: http
://www.wireshark.org
/
37 BuildRoot: /tmp
/wireshark
-%{PACKAGE_VERSION}-root
38 Packager: Gerald Combs
<gerald
[AT
]wireshark.org
>
39 # Some distributions create a wireshark-devel package; get rid of it
40 Obsoletes
: wireshark
-devel
42 BuildRequires
: autoconf
>= @AC_MIN_VERSION@
43 BuildRequires
: automake
44 BuildRequires
: libtool
51 BuildRequires
: glib2
-devel
>= @GLIB_MIN_VERSION@
52 Requires: glib2
>= @GLIB_MIN_VERSION@
53 BuildRequires
: libpcap
-devel
55 BuildRequires
: zlib
-devel
60 # SuSE uses these package names (yes 2!):
61 BuildRequires
: libcares
-devel
64 # ... while Redhat uses this one:
65 # (What other RPM-based distros do will have to be determined...)
66 BuildRequires
: c
-ares
-devel
71 BuildRequires
: adns
-devel
75 BuildRequires
: lua
-devel
79 # Uncomment these if you want to be sure you get them...
80 #BuildRequires: krb5-devel
81 #BuildRequires: libsmi-devel
82 #BuildRequires: pcre-devel
83 #BuildRequires: libselinux
84 #BuildRequires: gnutls-devel
85 #BuildRequires: libcap-devel
87 %if %{use_wireshark_group}
89 # SuSE's groupadd is in this package:
90 Requires(pre
): pwdutils
92 # ... while Redhat's is in this one:
93 Requires(pre
): shadow
-utils
98 # Actually we require rpmbuild (the program) >= 4.7.0 but the package name
99 # where we can find it varies. So we check the 'rpm' version because either
100 # rpmbuild is in that package (e.g., in older distros) or it's in the
101 # 'rpm-build' package which generally requires a matching version of 'rpm'.
103 # All of this is to save users the trouble of getting through an full compile
104 # only to have rpmbuild barf because it doesn't understand capabilities.
105 BuildRequires
: rpm
>= 4.7.0
109 Wireshark is a free network protocol analyzer
for Unix and Windows. It
110 allows you to examine data from a live network or from a capture file
111 on disk. You can interactively browse the capture data
, viewing summary
112 and detail information
for each packet. Wireshark has several powerful
113 features
, including a rich display filter language and the ability to
114 view the reconstructed stream of a TCP session.
116 This package contains
command-line utilities
, plugins
, and documentation
for
117 Wireshark. A GTK
+ and a Qt graphical user interface are packaged separately.
120 Summary: Gnome desktop integration
for Wireshark
121 Group: Applications
/Internet
123 Requires: gtk3
>= @GTK3_MIN_VERSION@
124 BuildRequires
: gtk3
-devel
>= @GTK3_MIN_VERSION@
126 Requires: gtk2
>= @GTK2_MIN_VERSION@
127 BuildRequires
: gtk2
-devel
>= @GTK2_MIN_VERSION@
129 Requires: %{name} = %{version}-%{release}
131 Requires: hicolor
-icon
-theme
132 BuildRequires
: desktop
-file
-utils
133 Requires(post
): desktop
-file
-utils
134 Requires(post
): %{_sbindir}/update
-alternatives
135 Requires(postun
): %{_sbindir}/update
-alternatives
136 %if 0%{?suse_version}
137 # Need this for SuSE's suse_update_desktop_file macro
138 BuildRequires
: update
-desktop
-files
140 %if %{with_portaudio}
141 BuildRequires
: portaudio
-devel
145 # Uncomment these if you want to be sure you get them...
146 #BuildRequires: GeoIP-devel
148 # Add this for more readable fonts on some distributions/versions
149 #Requires: dejavu-sans-mono-fonts
152 Contains the Gnome
(GTK
+) Wireshark GUI and desktop integration files.
156 Summary: Qt GUI
for Wireshark
157 Group: Applications
/Internet
158 Requires: qt
>= @QT_MIN_VERSION@
159 BuildRequires
: qt
-devel
>= @QT_MIN_VERSION@
160 Requires: %{name} = %{version}-%{release}
162 Requires: hicolor
-icon
-theme
163 BuildRequires
: desktop
-file
-utils
164 Requires(post
): desktop
-file
-utils
165 Requires(post
): %{_sbindir}/update
-alternatives
166 Requires(postun
): %{_sbindir}/update
-alternatives
167 BuildRequires
: gcc
-c
++
168 %if 0%{?suse_version}
169 # Need this for SuSE's suse_update_desktop_file macro
170 BuildRequires
: update
-desktop
-files
174 Contains the Qt Wireshark GUI and desktop integration files.
179 %setup -q
-n
%{name}-%{version}
181 # Don't specify the prefix here: configure is a macro which expands to set
182 # the prefix and everything else too. If you need to change the prefix
183 # set _prefix (note the underscore) either in this file or on rpmbuild's
196 %if %{with_portaudio}
207 --disable
-warnings
-as
-errors
209 # Suggestion: put this in your ~/.rpmmacros (without the hash sign, of course):
210 # %_smp_mflags -j %(grep -c processor /proc/cpuinfo)
214 rm -rf $RPM_BUILD_ROOT
215 make DESTDIR
=$RPM_BUILD_ROOT
install
216 # Change the program name for 'alternatives'
217 mv
%{buildroot}%{_bindir}/wireshark %{buildroot}%{_bindir}/wireshark
-gtk
218 # Create the 'alternative' file
219 touch
%{buildroot}%{_bindir}/wireshark
220 make DESTDIR
=$RPM_BUILD_ROOT install_desktop_files
221 %if 0%{?suse_version}
222 # SuSE's packaging conventions
223 # (http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25suse_update_desktop_file)
225 %suse_update_desktop_file %{name}
227 # Fedora's packaging guidelines (https://fedoraproject.org/wiki/Packaging:Guidelines)
228 # require this (at least if desktop-file-install was not used to install it).
229 desktop
-file
-validate
%{buildroot}/usr
/share
/applications
/wireshark.desktop
233 rm -rf $RPM_BUILD_ROOT
235 %if %{use_wireshark_group}
237 getent group wireshark
>/dev
/null || groupadd
-r wireshark
240 %post -p
/sbin
/ldconfig
242 %postun -p
/sbin
/ldconfig
245 update
-desktop
-database
&> /dev
/null ||
:
246 update
-mime
-database
/usr
/share
/mime
&> /dev
/null ||
:
247 touch
--no
-create
/usr
/share
/icons
/hicolor
&>/dev
/null ||
:
248 %{_sbindir}/update-alternatives --install %{_bindir}/wireshark \
249 %{name} %{_bindir}/wireshark
-gtk
50
252 update
-desktop
-database
&> /dev
/null ||
:
253 update
-mime
-database
/usr
/share
/mime
&> /dev
/null ||
:
254 if [ $
1 -eq
0 ] ; then
255 touch
--no
-create
/usr
/share
/icons
/hicolor
&>/dev
/null ||
:
256 gtk
-update
-icon
-cache
/usr
/share
/icons
/hicolor
&>/dev
/null ||
:
257 %{_sbindir}/update-alternatives --remove %{name} %{_bindir}/wireshark
-gtk
262 update
-desktop
-database
&> /dev
/null ||
:
263 update
-mime
-database
/usr
/share
/mime
&> /dev
/null ||
:
264 touch
--no
-create
/usr
/share
/icons
/hicolor
&>/dev
/null ||
:
265 %{_sbindir}/update-alternatives --install %{_bindir}/wireshark \
266 %{name} %{_bindir}/wireshark
-qt
10
269 update
-desktop
-database
&> /dev
/null ||
:
270 update
-mime
-database
/usr
/share
/mime
&> /dev
/null ||
:
271 if [ $
1 -eq
0 ] ; then
272 touch
--no
-create
/usr
/share
/icons
/hicolor
&>/dev
/null ||
:
273 gtk
-update
-icon
-cache
/usr
/share
/icons
/hicolor
&>/dev
/null ||
:
274 %{_sbindir}/update-alternatives --remove %{name} %{_bindir}/wireshark
-qt
278 # Is this really needed?
280 gtk
-update
-icon
-cache
/usr
/share
/icons
/hicolor
&>/dev
/null ||
:
284 %defattr(-,root
,root
)
285 %doc AUTHORS COPYING ChangeLog INSTALL INSTALL.configure NEWS README
*
286 # Don't pick up the wireshark (GUI) binary here
287 %exclude %{_bindir}/wireshark
288 %exclude %{_bindir}/wireshark
-gtk
289 %exclude %{_bindir}/wireshark
-qt
292 # This generates a warning because dumpcap is listed twice. That's
293 # probably preferable to listing each program (and keeping the list up to
294 # date)... Maybe if we can find a way to get the toplevel Makefile.am's
295 # bin_PROGRAMS in here?
296 %if %{use_wireshark_group} && %{setuid_dumpcap}
297 # Setuid but only executable by members of the 'wireshark' group
298 %attr(4750, root
, wireshark
) %{_bindir}/dumpcap
300 %if %{use_wireshark_group} && %{setcap_dumpcap}
301 # Setcap but only executable by members of the 'wireshark' group
302 %attr(0750, root
, wireshark
) %caps(cap_net_raw
,cap_net_admin
=eip
) %{_bindir}/dumpcap
304 %if %{setuid_dumpcap}
305 # Setuid and executable by all
306 %attr(4755, root
, root
) %{_bindir}/dumpcap
308 %if %{setcap_dumpcap}
309 # Setcap and executable by all
310 %attr(0755, root
, root
) %caps(cap_net_raw
,cap_net_admin
=eip
) %{_bindir}/dumpcap
312 # Executable by all but with no special permissions
313 %attr(0755, root
, root
) %{_bindir}/dumpcap
320 %exclude %{_libdir}/%{name}/plugins/%{version}/*.la
321 %exclude %{_libdir}/*.la
323 # Don't pick up the wireshark (GUI) man page
324 %exclude %{_mandir}/man1
/wireshark.
*
327 %{_datadir}/wireshark
330 %defattr(-,root
,root
)
331 /usr
/share
/applications
/wireshark.desktop
332 /usr
/share
/icons
/hicolor
/*/apps
/*
333 /usr
/share
/icons
/hicolor
/*/mimetypes
/*
334 /usr
/share
/mime
/packages
/wireshark.xml
335 %{_bindir}/wireshark
-gtk
336 %{_mandir}/man1
/wireshark.
*
337 %ghost %{_bindir}/wireshark
341 %defattr(-,root
,root
)
342 /usr
/share
/applications
/wireshark.desktop
343 /usr
/share
/icons
/hicolor
/*/apps
/*
344 /usr
/share
/icons
/hicolor
/*/mimetypes
/*
345 /usr
/share
/mime
/packages
/wireshark.xml
346 %{_bindir}/wireshark
-qt
347 %{_mandir}/man1
/wireshark.
*
348 %ghost %{_bindir}/wireshark
352 * Tue Nov
12 2013 Jeff Morriss
353 - Add q qt package using 'alternatives' to allow the administrator to choose
354 which one they actually use.
356 * Fri Sep
20 2013 Jeff Morriss
357 - If we're not using gtk3 add
--with
-gtk2
(since Wireshark now defaults to gtk3
)
359 * Thu Mar
28 2013 Jeff Morriss
360 - Simplify check
for rpmbuild's version.
362 * Fri Mar
8 2013 Jeff Morriss
363 - Put all icons
in hicolor
364 - Use SuSE's desktop
-update macro.
365 - Actually update MIME database when Wireshark's prefix is not
/usr .
367 * Thu Mar
6 2013 Jeff Morriss
368 - List more build dependencies.
369 - Update to work on SuSE too
: some of their package names are different.
371 * Thu Mar
6 2013 Gerald Combs
372 - Enable c
-ares by default
374 * Mon Feb
6 2013 Jeff Morriss
375 - Overhaul to
make this file more useful
/up to date. Many changes are based
376 on Fedora's .spec file. Changes include
:
377 - Create a separate wireshark
-gnome package
(like Redhat
).
378 - Control some things with variables
set at the top of the file.
379 - Allow the user to configure how dumpcap is installed.
380 - Allow the user to choose some options including GTK2 or GTK3.
381 - Greatly expand the BuildRequires entries
; get the minimum versions of some
382 things from 'configure'.
383 - Install freedesktop files
for better
(free
)desktop integration.
385 * Thu Aug
10 2006 Joerg Mayer
386 - Starting with X.org
7.x X11R6 is being phased out. Install wireshark
387 and manpage into the standard path.
389 * Mon Aug
01 2005 Gerald Combs
390 - Add a desktop file and icon
for future use
392 - Take over the role of packager
394 - Update descriptions and
source locations
396 * Thu Oct
28 2004 Joerg Mayer
397 - Add openssl requirement
(heimdal and net
-snmp are still automatic
)
399 * Tue Jul
20 2004 Joerg Mayer
400 - Redo
install and files section to actually work with normal builds
402 * Sat Feb
07 2004 Joerg Mayer
403 - in case there are shared libs
: include them
405 * Tue Aug
24 1999 Gilbert Ramirez
406 - changed to ethereal.spec.
in so that 'configure' can update
407 the version automatically
409 * Tue Aug
03 1999 Gilbert Ramirez
<gram@xiexie.org
>
410 - updated to
0.7.0 and changed gtk
+ requirement
412 * Sun Jan
01 1999 Gerald Combs
<gerald@zing.org
>
415 * Fri Nov
20 1998 FastJack
<fastjack@i
-s
-o.net
>
418 * Sun Nov
15 1998 FastJack
<fastjack@i
-s
-o.net
>