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: 2b6f1f37c72fa15a0a1863016a0abcc0
31 Patch0: %{name}-Werror.patch
32 Patch1: %{name}-ac.patch
33 Patch2: %{name}-desktop.patch
34 URL: https://www.wireshark.org/
35 BuildRequires: GeoIP-devel
36 BuildRequires: asciidoc
37 BuildRequires: autoconf >= 2.64
38 BuildRequires: automake >= 1:1.11
40 BuildRequires: c-ares-devel
41 BuildRequires: doxygen
43 BuildRequires: gcc >= 5:3.2
44 %{?with_gtk:BuildRequires: gdk-pixbuf2-devel >= 2.26}
45 BuildRequires: glib2-devel >= 1:2.32
46 BuildRequires: gnutls-devel >= 3.1.10
48 %{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.12.0}
49 %{!?with_gtk2:BuildRequires: gtk+3-devel >= 3.0.0}
51 %{?with_kerberos5:BuildRequires: heimdal-devel}
52 BuildRequires: libcap-devel
53 BuildRequires: libgcrypt-devel >= 1.4.2
54 BuildRequires: libnl-devel >= 3.2
55 BuildRequires: libpcap-devel >= 2:1.0.0-4
56 BuildRequires: libssh-devel >= 0.6.0
57 BuildRequires: libsmi-devel
58 BuildRequires: libstdc++-devel
59 BuildRequires: libtool >= 2:2.2.2
60 BuildRequires: libxml2-devel >= 2.0
61 BuildRequires: libxslt-progs
62 BuildRequires: lua52-devel
63 BuildRequires: lz4-devel
64 %{?with_snmp:BuildRequires: net-snmp-devel}
65 BuildRequires: nghttp2-devel
66 BuildRequires: perl-tools-pod
67 BuildRequires: pkgconfig >= 1:0.7
68 %{?with_gui:BuildRequires: portaudio-devel}
69 BuildRequires: python >= 1:2.5
70 BuildRequires: rpmbuild(macros) >= 1.527
71 %{?with_gui:BuildRequires: sbc-devel >= 1.0}
72 %{?with_qt:BuildRequires: speexdsp-devel}
73 BuildRequires: sed >= 4.0
74 BuildRequires: snappy-devel
75 BuildRequires: spandsp-devel
76 BuildRequires: tar >= 1:1.22
79 BuildRequires: zlib-devel
81 BuildRequires: Qt5Core-devel >= 5
82 BuildRequires: Qt5Multimedia-devel >= 5
83 BuildRequires: Qt5PrintSupport-devel >= 5
84 BuildRequires: Qt5Widgets-devel >= 5
85 BuildRequires: libstdc++-devel >= 5
86 BuildRequires: qt5-build >= 5
87 BuildRequires: qt5-linguist >= 5
89 Requires: %{name}-gui-common = %{version}-%{release}
90 Requires: gdk-pixbuf2 >= 2.26
92 Requires: gtk+2 >= 2:2.12.0
94 Requires: gtk+3 >= 3.0.0
98 Provides: ethereal-gnome
100 Obsoletes: ethereal-gnome
101 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
104 Wireshark is the name for powerful graphical network sniffer, traffic
105 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
106 capture and interactively browse the contents of network frames with
107 vast knowledge of more than 100 network protocols. Wireshark has
108 severeal useful features, including a rich display filter language,
109 the ability to view the ASCII contents of a TCP connection and plug-in
112 %description -l es.UTF-8
113 Analizador de tráfico de red.
115 %description -l pl.UTF-8
116 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
117 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
118 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
119 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
120 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
121 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
124 %description -l pt_BR.UTF-8
125 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
127 %description -l ru.UTF-8
128 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
129 базируется на GTK+ и libpcap.
131 %description -l uk.UTF-8
132 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
133 базується на GTK+ та libpcap.
136 Summary: Network traffic and protocol analyzer - GUI common files
137 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych - wspólne pliki interfejsów graficznych
138 Group: Networking/Utilities
139 Requires: %{name}-common = %{version}-%{release}
141 %description gui-common
142 Network traffic and protocol analyzer - files common for all Wireshark
145 %description gui-common -l pl.UTF-8
146 Analizator ruchu i protokołów sieciowych - pliki wspólne dla
147 wszystkich interfejsów graficznych Wiresharka (GTK+, Qt).
150 Summary: Qt-based network traffic and protocol analyzer
151 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych oparty na Qt
153 Requires: %{name}-gui-common = %{version}-%{release}
154 Requires: Qt5Gui-platform-xcb
157 An initial port to Qt (aka QtShark).
159 %description qt -l pl.UTF-8
160 Wstępna wersja analizatora wireshark oparta na Qt (znana też pod nazwą
164 Summary: Network traffic and protocol analyzer - common files
165 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych - wspólne pliki
167 Requires: %{name}-libs = %{version}-%{release}
168 Requires: gnutls >= 3.1.10
169 Requires: libpcap >= 0.4
170 Requires: libssh >= 0.6.0
171 Provides: ethereal-common
172 Provides: group(wireshark)
173 Provides: wireshark-tools
174 Obsoletes: ethereal-common
175 Obsoletes: wireshark-tools
176 Requires(post,postun): /sbin/setcap
179 Wireshark is the name for powerful graphical network sniffer, traffic
180 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
181 capture and interactively browse the contents of network frames with
182 vast knowledge of more than 100 network protocols. Wireshark has
183 severeal useful features, including a rich display filter language,
184 the ability to view the ASCII contents of a TCP connection and plug-in
187 This package provides the shared library, plugins, data and a set of
188 tools for manipulating capture files. It contains:
189 - capinfos - prints informatio about binary capture files,
190 - captype - prints the file types of capture files,
191 - dftest - shows display filter byte-code,
192 - dumpcap - dumps network traffic to a file,
193 - editcap - edit and/or translate the format of capture files,
194 - mergecap - merges two capture files into one,
195 - randpkt - generates libpcap trace file full of random packets,
196 - rawshark - dumps and analyzes raw libpcap data,
197 - text2cap - generate a capture file from an ASCII hexdump of packets.
199 %description common -l es.UTF-8
200 Analizador de tráfico de red.
202 %description common -l pl.UTF-8
203 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
204 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
205 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
206 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
207 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
208 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
211 Ten pakiet ten zawiera bibliotekę współdzieloną, wtyczki, dane oraz
212 zestaw narzędzi do obróbki plików z przechwyconymi pakietami,
214 - capinfos - do wyświetlania informacji o binarnych plikach zrzutu,
215 - captype - do wyświetlania rodzaju plików zrzutu,
216 - dftest - do pokazywania bajtkodu filtrów wyświetlania,
217 - dumpcap - do zrzucania ruchu sieciowego do pliku,
218 - editcap - do edycji plików i tłumaczenia ich na inne formaty,
219 - mergecap - do łączenia dwóch plików w jeden,
220 - randpkt - do generowania plikow cap z losowymi danymi,
221 - rawshark - do obróbki plików cap,
222 - text2cap - do generowania pliku cap z szesnastkowego zrzutu ASCII
225 %description common -l pt_BR.UTF-8
226 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
228 %description common -l ru.UTF-8
229 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
230 базируется на GTK+ и libpcap.
232 %description common -l uk.UTF-8
233 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
234 базується на GTK+ та libpcap.
236 %package -n twireshark
237 Summary: Text-mode network traffic and protocol analyzer
238 Summary(pl.UTF-8): Tekstowy analizator ruchu i protokołów sieciowych
239 Summary(pt_BR.UTF-8): Analisador modo texto de tráfego de rede (sniffer)
241 Requires: %{name}-common = %{version}-%{release}
242 Requires: libpcap >= 0.4
246 %description -n twireshark
247 Twireshark is a network protocol analyzer. It lets you capture packet
248 data from a live network, or read packets from a previously saved
249 capture file, either printing a decoded form of those packets to the
250 standard output or writing the packets to a file. Twireshark's native
251 capture file format is libpcap format, which is also the format used
252 by tcpdump and various other tools.
254 %description -n twireshark -l pl.UTF-8
255 Twireshark jest analizatorem protokołów sieciowych. Pozwala na
256 przechwytywanie pakietów z sieci lub wczytywanie danych z pliku.
257 Zdekodowany wynik (a twireshark zna ponad 100 rozmaitych protokołów
258 sieciowych!) jest wyświetlony na ekranie. Natywnym formatem plików
259 tetherala jest format libpcap, tak więc jest on kompatybilny z
260 tcpdumpem i innymi podobnymi narzędziami.
262 %description -n twireshark -l pt_BR.UTF-8
263 Esta é uma versão para modo texto do analisador de tráfego de rede
267 Summary: Wireshark packet capture and dissection libraries
268 Summary(pl.UTF-8): Biblioteki Wiresharka do przechwytywania i sekcji pakietów
270 Requires: glib2 >= 1:2.32
271 Requires: libgcrypt >= 1.4.2
272 Requires: libnl >= 3.2
273 Obsoletes: libwiretap < 2.4.0
276 Wireshark packet capture and dissection libraries.
278 %description libs -l pl.UTF-8
279 Biblioteki Wiresharka do przechwytywania i sekcji pakietów.
282 Summary: Header files for Wireshark libraries
283 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Wiresharka
284 Group: Development/Libraries
285 Requires: %{name}-libs = %{version}-%{release}
286 Requires: glib2-devel >= 1:2.32
287 Requires: libgcrypt-devel >= 1.4.2
288 Requires: libnl-devel >= 3.2
289 Obsoletes: libwiretap-devel < 2.4.0
292 Header files for Wireshark libraries.
294 %description devel -l pl.UTF-8
295 Pliki nagłówkowe bibliotek Wiresharka.
302 find -name Makefile.am | xargs sed -i -e 's/-Werror//g'
306 %{__aclocal} -I aclocal-fallback
313 CPPFLAGS="%{rpmcppflags} $(pkg-config --cflags liblz4)"
315 HTML_VIEWER=/usr/bin/xdg-open \
317 --enable-packet-editor \
320 %{__enable_disable gui wireshark} \
321 --disable-silent-rules \
322 --disable-usr-local \
324 %{?with_gtk2:--with-gtk=2}%{!?with_gtk2:--with-gtk=3} \
326 %if %{with kerberos5}
330 %{__with_without qt} \
331 %{!?with_snmp:--without-net-snmp --without-ucdsnmp}
336 rm -rf $RPM_BUILD_ROOT
337 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_includedir}/wireshark}
340 DESTDIR=$RPM_BUILD_ROOT
342 cp -p image/hi48-app-wireshark.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
344 %{__rm} $RPM_BUILD_ROOT%{_desktopdir}/wireshark*.desktop
345 %{?with_gtk:cp -p wireshark-gtk.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark.desktop}
346 %{?with_qt:cp -p wireshark.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark-qt.desktop}
348 # headers (from Fedora, inspired by debian/wireshark-dev.header-files)
349 install -d $RPM_BUILD_ROOT%{_includedir}/wireshark/{epan/{crypt,ftypes,dfilter,dissectors,wmem},wiretap,wsutil}
350 install config.h register.h $RPM_BUILD_ROOT%{_includedir}/wireshark
351 install cfile.h file.h $RPM_BUILD_ROOT%{_includedir}/wireshark
352 install ws_diag_control.h $RPM_BUILD_ROOT%{_includedir}/wireshark
353 install ws_symbol_export.h $RPM_BUILD_ROOT%{_includedir}/wireshark
354 install epan/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan
355 install epan/crypt/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/crypt
356 install epan/ftypes/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/ftypes
357 install epan/dfilter/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/dfilter
358 install epan/dissectors/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/dissectors
359 install epan/wmem/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/wmem
360 install wiretap/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/wiretap
361 install wsutil/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/wsutil
363 # plugins *.la are useless - *.so are loaded through gmodule
364 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/%{version}*/*.la
366 %{?with_qt:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{,-qt}}
367 %{?with_gtk:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{-gtk,}}
370 rm -rf $RPM_BUILD_ROOT
373 %update_mime_database
376 %update_mime_database
379 %groupadd -P %{name}-common -g 104 wireshark
382 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
386 if [ "$1" = "0" ]; then
387 %groupremove wireshark
390 %post libs -p /sbin/ldconfig
391 %postun libs -p /sbin/ldconfig
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_bindir}/wireshark
397 %{_desktopdir}/wireshark.desktop
402 %defattr(644,root,root,755)
404 %{_datadir}/appdata/wireshark.appdata.xml
405 %{_datadir}/mime/packages/wireshark.xml
406 %{_pixmapsdir}/%{name}.png
407 %{_iconsdir}/hicolor/16x16/apps/%{name}.png
408 %{_iconsdir}/hicolor/16x16/mimetypes/application-%{name}-doc.png
409 %{_iconsdir}/hicolor/24x24/apps/%{name}.png
410 %{_iconsdir}/hicolor/24x24/mimetypes/application-%{name}-doc.png
411 %{_iconsdir}/hicolor/32x32/apps/%{name}.png
412 %{_iconsdir}/hicolor/32x32/mimetypes/application-%{name}-doc.png
413 %{_iconsdir}/hicolor/48x48/apps/%{name}.png
414 %{_iconsdir}/hicolor/48x48/mimetypes/application-%{name}-doc.png
415 %{_iconsdir}/hicolor/64x64/apps/%{name}.png
416 %{_iconsdir}/hicolor/64x64/mimetypes/application-%{name}-doc.png
417 %{_iconsdir}/hicolor/128x128/apps/%{name}.png
418 %{_iconsdir}/hicolor/128x128/mimetypes/application-%{name}-doc.png
419 %{_iconsdir}/hicolor/256x256/apps/%{name}.png
420 %{_iconsdir}/hicolor/256x256/mimetypes/application-%{name}-doc.png
421 %{_iconsdir}/hicolor/scalable/apps/%{name}.svg
422 %{_mandir}/man1/wireshark.1*
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_bindir}/wireshark-qt
429 %{_desktopdir}/wireshark-qt.desktop
433 %defattr(644,root,root,755)
434 %doc AUTHORS* ChangeLog NEWS README README.linux README.vmware doc/README.*
435 %dir %{_libdir}/%{name}
436 %dir %{_libdir}/%{name}/extcap
437 %dir %{_libdir}/%{name}/plugins
438 %dir %{_libdir}/%{name}/plugins/%{version}*
439 %attr(755,root,root) %{_libdir}/%{name}/extcap/ciscodump
440 %attr(755,root,root) %{_libdir}/%{name}/extcap/androiddump
441 %attr(755,root,root) %{_libdir}/%{name}/extcap/randpktdump
442 %attr(755,root,root) %{_libdir}/%{name}/extcap/sshdump
443 %attr(755,root,root) %{_libdir}/%{name}/extcap/udpdump
444 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{version}*/*.so
445 %attr(755,root,root) %{_bindir}/capinfos
446 %attr(755,root,root) %{_bindir}/captype
447 %attr(755,root,root) %{_bindir}/dftest
448 %attr(750,root,wireshark) %{_bindir}/dumpcap
449 %attr(755,root,root) %{_bindir}/editcap
450 %attr(755,root,root) %{_bindir}/idl2wrs
451 %attr(755,root,root) %{_bindir}/mergecap
452 %attr(755,root,root) %{_bindir}/randpkt
453 %attr(755,root,root) %{_bindir}/rawshark
454 %attr(755,root,root) %{_bindir}/reordercap
455 %attr(755,root,root) %{_bindir}/sharkd
456 %attr(755,root,root) %{_bindir}/text2pcap
457 %attr(755,root,root) %{_bindir}/tfshark
458 %{_mandir}/man1/androiddump.1*
459 %{_mandir}/man1/capinfos.1*
460 %{_mandir}/man1/dftest.1*
461 %{_mandir}/man1/dumpcap.1*
462 %{_mandir}/man1/editcap.1*
463 %{_mandir}/man1/mergecap.1*
464 %{_mandir}/man1/rawshark.1*
465 %{_mandir}/man1/randpkt.1*
466 %{_mandir}/man1/randpktdump.1*
467 %{_mandir}/man1/reordercap.1*
468 %{_mandir}/man1/sshdump.1*
469 %{_mandir}/man1/text2pcap.1*
470 %{_mandir}/man1/udpdump.1*
471 %{_mandir}/man4/extcap.4*
472 %{_mandir}/man4/wireshark-filter.4*
475 %defattr(644,root,root,755)
476 %attr(755,root,root) %{_bindir}/tshark
477 %{_mandir}/man1/tshark*.1*
480 %defattr(644,root,root,755)
482 %attr(755,root,root) %{_libdir}/libwireshark.so.*.*.*
483 %attr(755,root,root) %ghost %{_libdir}/libwireshark.so.9
484 %attr(755,root,root) %{_libdir}/libwiretap.so.*.*.*
485 %attr(755,root,root) %ghost %{_libdir}/libwiretap.so.7
486 %attr(755,root,root) %{_libdir}/libwscodecs.so.*.*.*
487 %attr(755,root,root) %ghost %{_libdir}/libwscodecs.so.1
488 %attr(755,root,root) %{_libdir}/libwsutil.so.*.*.*
489 %attr(755,root,root) %ghost %{_libdir}/libwsutil.so.8
492 %defattr(644,root,root,755)
493 %attr(755,root,root) %{_libdir}/libwireshark.so
494 %attr(755,root,root) %{_libdir}/libwiretap.so
495 %attr(755,root,root) %{_libdir}/libwscodecs.so
496 %attr(755,root,root) %{_libdir}/libwsutil.so
497 %{_libdir}/libwireshark.la
498 %{_libdir}/libwiretap.la
499 %{_libdir}/libwscodecs.la
500 %{_libdir}/libwsutil.la
501 %{_includedir}/wireshark
502 %{_pkgconfigdir}/wireshark.pc