2 # - use policykit to gain root
3 # - use %caps when rpm supports it: %attr(750,root,wireshark) %caps(cap_net_raw,cap_net_admin=eip) %{_sbindir}/dumpcap
6 %bcond_without kerberos5 # Kerberos V support
7 %bcond_without snmp # SNMP support
8 %bcond_without gui # any GUI
9 %bcond_without gtk # GTK+ (2 or 3) GUI
10 %bcond_with gtk2 # GTK+ GUI based on GTK+ 2 instead of GTK+ 3
11 %bcond_without qt # Qt GUI
18 Summary: Network traffic and protocol analyzer
19 Summary(es.UTF-8): Analizador de tráfico de red
20 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych
21 Summary(pt_BR.UTF-8): Analisador de tráfego de rede
22 Summary(ru.UTF-8): Анализатор сетевого траффика
23 Summary(uk.UTF-8): Аналізатор мережевого трафіку
28 Group: Networking/Utilities
29 Source0: https://www.wireshark.org/download/src/%{name}-%{version}.tar.xz
30 # Source0-md5: 8aa7b8c8ce0b6ce4256a081493819d6f
31 Patch0: %{name}-Werror.patch
32 Patch1: %{name}-ac.patch
33 Patch2: %{name}-desktop.patch
35 URL: https://www.wireshark.org/
36 BuildRequires: GeoIP-devel
37 BuildRequires: asciidoc
38 BuildRequires: autoconf >= 2.64
39 BuildRequires: automake >= 1:1.11
41 BuildRequires: c-ares-devel
42 BuildRequires: doxygen
44 BuildRequires: gcc >= 5:3.2
45 %{?with_gtk:BuildRequires: gdk-pixbuf2-devel >= 2.26}
46 BuildRequires: glib2-devel >= 1:2.32
47 BuildRequires: gnutls-devel >= 3.1.10
49 %{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.12.0}
50 %{!?with_gtk2:BuildRequires: gtk+3-devel >= 3.0.0}
52 %{?with_kerberos5:BuildRequires: heimdal-devel}
53 BuildRequires: libcap-devel
54 BuildRequires: libgcrypt-devel >= 1.4.2
55 BuildRequires: libnl-devel >= 3.2
56 BuildRequires: libpcap-devel >= 2:1.0.0-4
57 BuildRequires: libssh-devel >= 0.6.0
58 BuildRequires: libsmi-devel
59 BuildRequires: libstdc++-devel
60 BuildRequires: libtool >= 2:2.2.2
61 BuildRequires: libxml2-devel >= 2.0
62 BuildRequires: libxslt-progs
63 BuildRequires: lua52-devel
64 BuildRequires: lz4-devel
65 %{?with_snmp:BuildRequires: net-snmp-devel}
66 BuildRequires: nghttp2-devel
67 BuildRequires: perl-tools-pod
68 BuildRequires: pkgconfig >= 1:0.7
69 %{?with_gui:BuildRequires: portaudio-devel}
70 BuildRequires: python >= 1:2.5
71 BuildRequires: rpmbuild(macros) >= 1.527
72 %{?with_gui:BuildRequires: sbc-devel >= 1.0}
73 %{?with_qt:BuildRequires: speexdsp-devel}
74 BuildRequires: sed >= 4.0
75 BuildRequires: snappy-devel
76 BuildRequires: spandsp-devel
77 BuildRequires: tar >= 1:1.22
80 BuildRequires: zlib-devel
82 BuildRequires: Qt5Core-devel >= 5
83 BuildRequires: Qt5Multimedia-devel >= 5
84 BuildRequires: Qt5PrintSupport-devel >= 5
85 BuildRequires: Qt5Widgets-devel >= 5
86 BuildRequires: libstdc++-devel >= 5
87 BuildRequires: qt5-build >= 5
88 BuildRequires: qt5-linguist >= 5
90 Requires: %{name}-gui-common = %{version}-%{release}
91 Requires: gdk-pixbuf2 >= 2.26
93 Requires: gtk+2 >= 2:2.12.0
95 Requires: gtk+3 >= 3.0.0
99 Provides: ethereal-gnome
101 Obsoletes: ethereal-gnome
102 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
105 Wireshark is the name for powerful graphical network sniffer, traffic
106 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
107 capture and interactively browse the contents of network frames with
108 vast knowledge of more than 100 network protocols. Wireshark has
109 severeal useful features, including a rich display filter language,
110 the ability to view the ASCII contents of a TCP connection and plug-in
113 %description -l es.UTF-8
114 Analizador de tráfico de red.
116 %description -l pl.UTF-8
117 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
118 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
119 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
120 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
121 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
122 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
125 %description -l pt_BR.UTF-8
126 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
128 %description -l ru.UTF-8
129 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
130 базируется на GTK+ и libpcap.
132 %description -l uk.UTF-8
133 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
134 базується на GTK+ та libpcap.
137 Summary: Network traffic and protocol analyzer - GUI common files
138 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych - wspólne pliki interfejsów graficznych
139 Group: Networking/Utilities
140 Requires: %{name}-common = %{version}-%{release}
142 %description gui-common
143 Network traffic and protocol analyzer - files common for all Wireshark
146 %description gui-common -l pl.UTF-8
147 Analizator ruchu i protokołów sieciowych - pliki wspólne dla
148 wszystkich interfejsów graficznych Wiresharka (GTK+, Qt).
151 Summary: Qt-based network traffic and protocol analyzer
152 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych oparty na Qt
154 Requires: %{name}-gui-common = %{version}-%{release}
155 Requires: Qt5Gui-platform-xcb
158 An initial port to Qt (aka QtShark).
160 %description qt -l pl.UTF-8
161 Wstępna wersja analizatora wireshark oparta na Qt (znana też pod nazwą
165 Summary: Network traffic and protocol analyzer - common files
166 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych - wspólne pliki
168 Requires: %{name}-libs = %{version}-%{release}
169 Requires: gnutls >= 3.1.10
170 Requires: libpcap >= 0.4
171 Requires: libssh >= 0.6.0
172 Provides: ethereal-common
173 Provides: group(wireshark)
174 Provides: wireshark-tools
175 Obsoletes: ethereal-common
176 Obsoletes: wireshark-tools
177 Requires(post,postun): /sbin/setcap
180 Wireshark is the name for powerful graphical network sniffer, traffic
181 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
182 capture and interactively browse the contents of network frames with
183 vast knowledge of more than 100 network protocols. Wireshark has
184 severeal useful features, including a rich display filter language,
185 the ability to view the ASCII contents of a TCP connection and plug-in
188 This package provides the shared library, plugins, data and a set of
189 tools for manipulating capture files. It contains:
190 - capinfos - prints informatio about binary capture files,
191 - captype - prints the file types of capture files,
192 - dftest - shows display filter byte-code,
193 - dumpcap - dumps network traffic to a file,
194 - editcap - edit and/or translate the format of capture files,
195 - mergecap - merges two capture files into one,
196 - randpkt - generates libpcap trace file full of random packets,
197 - rawshark - dumps and analyzes raw libpcap data,
198 - text2cap - generate a capture file from an ASCII hexdump of packets.
200 %description common -l es.UTF-8
201 Analizador de tráfico de red.
203 %description common -l pl.UTF-8
204 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
205 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
206 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
207 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
208 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
209 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
212 Ten pakiet ten zawiera bibliotekę współdzieloną, wtyczki, dane oraz
213 zestaw narzędzi do obróbki plików z przechwyconymi pakietami,
215 - capinfos - do wyświetlania informacji o binarnych plikach zrzutu,
216 - captype - do wyświetlania rodzaju plików zrzutu,
217 - dftest - do pokazywania bajtkodu filtrów wyświetlania,
218 - dumpcap - do zrzucania ruchu sieciowego do pliku,
219 - editcap - do edycji plików i tłumaczenia ich na inne formaty,
220 - mergecap - do łączenia dwóch plików w jeden,
221 - randpkt - do generowania plikow cap z losowymi danymi,
222 - rawshark - do obróbki plików cap,
223 - text2cap - do generowania pliku cap z szesnastkowego zrzutu ASCII
226 %description common -l pt_BR.UTF-8
227 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
229 %description common -l ru.UTF-8
230 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
231 базируется на GTK+ и libpcap.
233 %description common -l uk.UTF-8
234 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
235 базується на GTK+ та libpcap.
237 %package -n twireshark
238 Summary: Text-mode network traffic and protocol analyzer
239 Summary(pl.UTF-8): Tekstowy analizator ruchu i protokołów sieciowych
240 Summary(pt_BR.UTF-8): Analisador modo texto de tráfego de rede (sniffer)
242 Requires: %{name}-common = %{version}-%{release}
243 Requires: libpcap >= 0.4
247 %description -n twireshark
248 Twireshark is a network protocol analyzer. It lets you capture packet
249 data from a live network, or read packets from a previously saved
250 capture file, either printing a decoded form of those packets to the
251 standard output or writing the packets to a file. Twireshark's native
252 capture file format is libpcap format, which is also the format used
253 by tcpdump and various other tools.
255 %description -n twireshark -l pl.UTF-8
256 Twireshark jest analizatorem protokołów sieciowych. Pozwala na
257 przechwytywanie pakietów z sieci lub wczytywanie danych z pliku.
258 Zdekodowany wynik (a twireshark zna ponad 100 rozmaitych protokołów
259 sieciowych!) jest wyświetlony na ekranie. Natywnym formatem plików
260 tetherala jest format libpcap, tak więc jest on kompatybilny z
261 tcpdumpem i innymi podobnymi narzędziami.
263 %description -n twireshark -l pt_BR.UTF-8
264 Esta é uma versão para modo texto do analisador de tráfego de rede
268 Summary: Wireshark packet capture and dissection libraries
269 Summary(pl.UTF-8): Biblioteki Wiresharka do przechwytywania i sekcji pakietów
271 Requires: glib2 >= 1:2.32
272 Requires: libgcrypt >= 1.4.2
273 Requires: libnl >= 3.2
274 Obsoletes: libwiretap < 2.4.0
277 Wireshark packet capture and dissection libraries.
279 %description libs -l pl.UTF-8
280 Biblioteki Wiresharka do przechwytywania i sekcji pakietów.
283 Summary: Header files for Wireshark libraries
284 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Wiresharka
285 Group: Development/Libraries
286 Requires: %{name}-libs = %{version}-%{release}
287 Requires: glib2-devel >= 1:2.32
288 Requires: libgcrypt-devel >= 1.4.2
289 Requires: libnl-devel >= 3.2
290 Obsoletes: libwiretap-devel < 2.4.0
293 Header files for Wireshark libraries.
295 %description devel -l pl.UTF-8
296 Pliki nagłówkowe bibliotek Wiresharka.
304 find -name Makefile.am | xargs sed -i -e 's/-Werror//g'
308 %{__aclocal} -I aclocal-fallback
315 CPPFLAGS="%{rpmcppflags} $(pkg-config --cflags liblz4)"
317 HTML_VIEWER=/usr/bin/xdg-open \
319 --enable-packet-editor \
322 %{__enable_disable gui wireshark} \
323 --disable-silent-rules \
324 --disable-usr-local \
326 %{?with_gtk2:--with-gtk=2}%{!?with_gtk2:--with-gtk=3} \
328 %if %{with kerberos5}
332 %{__with_without qt} \
333 %{!?with_snmp:--without-net-snmp --without-ucdsnmp}
338 rm -rf $RPM_BUILD_ROOT
339 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_includedir}/wireshark}
342 DESTDIR=$RPM_BUILD_ROOT
344 cp -p image/wsicon48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
346 %{__rm} $RPM_BUILD_ROOT%{_desktopdir}/wireshark*.desktop
347 %{?with_gtk:cp -p wireshark-gtk.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark.desktop}
348 %{?with_qt:cp -p wireshark.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark-qt.desktop}
350 # headers (from Fedora, inspired by debian/wireshark-dev.header-files)
351 install -d $RPM_BUILD_ROOT%{_includedir}/wireshark/{epan/{crypt,ftypes,dfilter,dissectors,wmem},wiretap,wsutil}
352 install config.h $RPM_BUILD_ROOT%{_includedir}/wireshark
353 install cfile.h file.h $RPM_BUILD_ROOT%{_includedir}/wireshark
354 install ws_diag_control.h $RPM_BUILD_ROOT%{_includedir}/wireshark
355 install ws_symbol_export.h $RPM_BUILD_ROOT%{_includedir}/wireshark
356 install epan/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan
357 install epan/crypt/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/crypt
358 install epan/ftypes/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/ftypes
359 install epan/dfilter/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/dfilter
360 install epan/dissectors/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/dissectors
361 install epan/wmem/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/wmem
362 install wiretap/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/wiretap
363 install wsutil/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/wsutil
365 # plugins *.la are useless - *.so are loaded through gmodule
366 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/*/*/*.la
368 %{?with_qt:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{,-qt}}
369 %{?with_gtk:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{-gtk,}}
372 rm -rf $RPM_BUILD_ROOT
375 %update_mime_database
378 %update_mime_database
381 %groupadd -P %{name}-common -g 104 wireshark
384 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
388 if [ "$1" = "0" ]; then
389 %groupremove wireshark
392 %post libs -p /sbin/ldconfig
393 %postun libs -p /sbin/ldconfig
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_bindir}/wireshark
399 %{_desktopdir}/wireshark.desktop
404 %defattr(644,root,root,755)
406 %{_datadir}/appdata/wireshark.appdata.xml
407 %{_datadir}/mime/packages/wireshark.xml
408 %{_pixmapsdir}/%{name}.png
409 %{_iconsdir}/hicolor/16x16/apps/%{name}.png
410 %{_iconsdir}/hicolor/16x16/mimetypes/application-%{name}-doc.png
411 %{_iconsdir}/hicolor/24x24/apps/%{name}.png
412 %{_iconsdir}/hicolor/24x24/mimetypes/application-%{name}-doc.png
413 %{_iconsdir}/hicolor/32x32/apps/%{name}.png
414 %{_iconsdir}/hicolor/32x32/mimetypes/application-%{name}-doc.png
415 %{_iconsdir}/hicolor/48x48/apps/%{name}.png
416 %{_iconsdir}/hicolor/48x48/mimetypes/application-%{name}-doc.png
417 %{_iconsdir}/hicolor/64x64/apps/%{name}.png
418 %{_iconsdir}/hicolor/64x64/mimetypes/application-%{name}-doc.png
419 %{_iconsdir}/hicolor/128x128/apps/%{name}.png
420 %{_iconsdir}/hicolor/128x128/mimetypes/application-%{name}-doc.png
421 %{_iconsdir}/hicolor/256x256/apps/%{name}.png
422 %{_iconsdir}/hicolor/256x256/mimetypes/application-%{name}-doc.png
423 %{_iconsdir}/hicolor/scalable/apps/%{name}.svg
424 %{_mandir}/man1/wireshark.1*
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_bindir}/wireshark-qt
431 %{_desktopdir}/wireshark-qt.desktop
435 %defattr(644,root,root,755)
436 %doc AUTHORS* ChangeLog NEWS README.md README.linux doc/README.*
437 %dir %{_libdir}/%{name}
438 %dir %{_libdir}/%{name}/extcap
439 %dir %{_libdir}/%{name}/plugins
440 %dir %{_libdir}/%{name}/plugins/2.6
441 %dir %{_libdir}/%{name}/plugins/2.6/codecs
442 %dir %{_libdir}/%{name}/plugins/2.6/epan
443 %dir %{_libdir}/%{name}/plugins/2.6/wiretap
444 %attr(755,root,root) %{_libdir}/%{name}/extcap/ciscodump
445 %attr(755,root,root) %{_libdir}/%{name}/extcap/androiddump
446 %attr(755,root,root) %{_libdir}/%{name}/extcap/randpktdump
447 %attr(755,root,root) %{_libdir}/%{name}/extcap/sshdump
448 %attr(755,root,root) %{_libdir}/%{name}/extcap/udpdump
449 %attr(755,root,root) %{_libdir}/%{name}/plugins/2.6/codecs/*.so
450 %attr(755,root,root) %{_libdir}/%{name}/plugins/2.6/epan/*.so
451 %attr(755,root,root) %{_libdir}/%{name}/plugins/2.6/wiretap/*.so
452 %attr(755,root,root) %{_bindir}/capinfos
453 %attr(755,root,root) %{_bindir}/captype
454 %attr(755,root,root) %{_bindir}/dftest
455 %attr(750,root,wireshark) %{_bindir}/dumpcap
456 %attr(755,root,root) %{_bindir}/editcap
457 %attr(755,root,root) %{_bindir}/idl2wrs
458 %attr(755,root,root) %{_bindir}/mergecap
459 %attr(755,root,root) %{_bindir}/mmdbresolve
460 %attr(755,root,root) %{_bindir}/randpkt
461 %attr(755,root,root) %{_bindir}/rawshark
462 %attr(755,root,root) %{_bindir}/reordercap
463 %attr(755,root,root) %{_bindir}/sharkd
464 %attr(755,root,root) %{_bindir}/text2pcap
465 %attr(755,root,root) %{_bindir}/tfshark
466 %{_mandir}/man1/androiddump.1*
467 %{_mandir}/man1/capinfos.1*
468 %{_mandir}/man1/captype.1*
469 %{_mandir}/man1/ciscodump.1*
470 %{_mandir}/man1/dftest.1*
471 %{_mandir}/man1/dumpcap.1*
472 %{_mandir}/man1/editcap.1*
473 %{_mandir}/man1/mergecap.1*
474 %{_mandir}/man1/mmdbresolve.1*
475 %{_mandir}/man1/rawshark.1*
476 %{_mandir}/man1/randpkt.1*
477 %{_mandir}/man1/randpktdump.1*
478 %{_mandir}/man1/reordercap.1*
479 %{_mandir}/man1/sshdump.1*
480 %{_mandir}/man1/text2pcap.1*
481 %{_mandir}/man1/udpdump.1*
482 %{_mandir}/man4/extcap.4*
483 %{_mandir}/man4/wireshark-filter.4*
486 %defattr(644,root,root,755)
487 %attr(755,root,root) %{_bindir}/tshark
488 %{_mandir}/man1/tshark*.1*
491 %defattr(644,root,root,755)
493 %attr(755,root,root) %{_libdir}/libwireshark.so.*.*.*
494 %attr(755,root,root) %ghost %{_libdir}/libwireshark.so.10
495 %attr(755,root,root) %{_libdir}/libwiretap.so.*.*.*
496 %attr(755,root,root) %ghost %{_libdir}/libwiretap.so.8
497 %attr(755,root,root) %{_libdir}/libwscodecs.so.*.*.*
498 %attr(755,root,root) %ghost %{_libdir}/libwscodecs.so.2
499 %attr(755,root,root) %{_libdir}/libwsutil.so.*.*.*
500 %attr(755,root,root) %ghost %{_libdir}/libwsutil.so.9
503 %defattr(644,root,root,755)
504 %attr(755,root,root) %{_libdir}/libwireshark.so
505 %attr(755,root,root) %{_libdir}/libwiretap.so
506 %attr(755,root,root) %{_libdir}/libwscodecs.so
507 %attr(755,root,root) %{_libdir}/libwsutil.so
508 %{_libdir}/libwireshark.la
509 %{_libdir}/libwiretap.la
510 %{_libdir}/libwscodecs.la
511 %{_libdir}/libwsutil.la
512 %{_includedir}/wireshark
513 %{_pkgconfigdir}/wireshark.pc