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: http://www.wireshark.org/download/src/%{name}-%{version}.tar.bz2
30 # Source0-md5: a4d880554c7f925dafef60fa313b580d
31 Patch0: %{name}-Werror.patch
32 Patch1: %{name}-ac.patch
33 Patch2: %{name}-desktop.patch
34 URL: http://www.wireshark.org/
35 BuildRequires: GeoIP-devel
36 BuildRequires: asciidoc
37 BuildRequires: autoconf >= 2.60
38 BuildRequires: automake >= 1:1.9
40 BuildRequires: c-ares-devel
41 BuildRequires: doxygen
43 BuildRequires: glib2-devel >= 1:2.22.0
44 BuildRequires: gnutls-devel >= 3.1.10
46 %{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.12.0}
47 %{!?with_gtk2:BuildRequires: gtk+3-devel >= 3.0.0}
49 %{?with_kerberos5:BuildRequires: heimdal-devel}
50 BuildRequires: libcap-devel
51 BuildRequires: libgcrypt-devel >= 1.4.2
52 BuildRequires: libnl-devel >= 3.2
53 BuildRequires: libpcap-devel >= 2:1.0.0-4
54 BuildRequires: libsmi-devel
55 BuildRequires: libtool
56 BuildRequires: libxslt-progs
57 BuildRequires: lua52-devel
58 %{?with_snmp:BuildRequires: net-snmp-devel}
59 BuildRequires: perl-tools-pod
60 BuildRequires: pkgconfig >= 1:0.7
61 %{?with_gui:BuildRequires: portaudio-devel}
62 BuildRequires: python >= 1:2.5
63 BuildRequires: rpmbuild(macros) >= 1.527
64 %{?with_gui:BuildRequires: sbc-devel >= 1.0}
65 BuildRequires: sed >= 4.0
66 BuildRequires: zlib-devel
68 BuildRequires: Qt5Core-devel
69 BuildRequires: Qt5PrintSupport-devel
70 BuildRequires: Qt5Widgets-devel
71 BuildRequires: libstdc++-devel
72 BuildRequires: qt5-build
73 BuildRequires: qt5-linguist
75 Requires: %{name}-gui-common = %{version}-%{release}
77 Requires: gtk+2 >= 2:2.12.0
79 Requires: gtk+3 >= 3.0.0
83 Provides: ethereal-gnome
85 Obsoletes: ethereal-gnome
86 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89 Wireshark is the name for powerful graphical network sniffer, traffic
90 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
91 capture and interactively browse the contents of network frames with
92 vast knowledge of more than 100 network protocols. Wireshark has
93 severeal useful features, including a rich display filter language,
94 the ability to view the ASCII contents of a TCP connection and plug-in
97 %description -l es.UTF-8
98 Analizador de tráfico de red.
100 %description -l pl.UTF-8
101 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
102 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
103 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
104 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
105 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
106 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
109 %description -l pt_BR.UTF-8
110 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
112 %description -l ru.UTF-8
113 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
114 базируется на GTK+ и libpcap.
116 %description -l uk.UTF-8
117 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
118 базується на GTK+ та libpcap.
121 Summary: Network traffic and protocol analyzer - GUI common files
122 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych - wspólne pliki interfejsów graficznych
123 Group: Networking/Utilities
124 Requires: %{name}-common = %{version}-%{release}
126 %description gui-common
127 Network traffic and protocol analyzer - files common for all Wireshark
130 %description gui-common -l pl.UTF-8
131 Analizator ruchu i protokołów sieciowych - pliki wspólne dla
132 wszystkich interfejsów graficznych Wiresharka (GTK+, Qt).
135 Summary: Network traffic and protocol analyzer - common files
136 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych - wspólne pliki
138 Requires: gnutls >= 3.1.10
139 Requires: libpcap >= 0.4
140 Requires: libwiretap = %{version}-%{release}
141 Provides: ethereal-common
142 Provides: group(wireshark)
143 Provides: wireshark-tools
144 Obsoletes: ethereal-common
145 Obsoletes: wireshark-tools
146 Requires(post,postun): /sbin/ldconfig
147 Requires(post,postun): /sbin/setcap
150 Wireshark is the name for powerful graphical network sniffer, traffic
151 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
152 capture and interactively browse the contents of network frames with
153 vast knowledge of more than 100 network protocols. Wireshark has
154 severeal useful features, including a rich display filter language,
155 the ability to view the ASCII contents of a TCP connection and plug-in
158 This package provides the shared library, plugins, data and a set of
159 tools for manipulating capture files. It contains:
160 - capinfos - prints informatio about binary capture files,
161 - captype - prints the file types of capture files,
162 - dftest - shows display filter byte-code,
163 - dumpcap - dumps network traffic to a file,
164 - editcap - edit and/or translate the format of capture files,
165 - mergecap - merges two capture files into one,
166 - randpkt - generates libpcap trace file full of random packets,
167 - rawshark - dumps and analyzes raw libpcap data,
168 - text2cap - generate a capture file from an ASCII hexdump of packets.
170 %description common -l es.UTF-8
171 Analizador de tráfico de red.
173 %description common -l pl.UTF-8
174 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
175 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
176 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
177 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
178 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
179 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
182 Ten pakiet ten zawiera bibliotekę współdzieloną, wtyczki, dane oraz
183 zestaw narzędzi do obróbki plików z przechwyconymi pakietami,
185 - capinfos - do wyświetlania informacji o binarnych plikach zrzutu,
186 - captype - do wyświetlania rodzaju plików zrzutu,
187 - dftest - do pokazywania bajtkodu filtrów wyświetlania,
188 - dumpcap - do zrzucania ruchu sieciowego do pliku,
189 - editcap - do edycji plików i tłumaczenia ich na inne formaty,
190 - mergecap - do łączenia dwóch plików w jeden,
191 - randpkt - do generowania plikow cap z losowymi danymi,
192 - rawshark - do obróbki plików cap,
193 - text2cap - do generowania pliku cap z szesnastkowego zrzutu ASCII
196 %description common -l pt_BR.UTF-8
197 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
199 %description common -l ru.UTF-8
200 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
201 базируется на GTK+ и libpcap.
203 %description common -l uk.UTF-8
204 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
205 базується на GTK+ та libpcap.
208 Summary: Qt-based network traffic and protocol analyzer
209 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych oparty na Qt
211 Requires: %{name}-gui-common = %{version}-%{release}
212 Requires: Qt5Gui-platform-xcb
215 An initial port to Qt (aka QtShark).
217 %description qt -l pl.UTF-8
218 Wstępna wersja analizatora wireshark oparta na Qt (znana też pod nazwą
221 %package -n twireshark
222 Summary: Text-mode network traffic and protocol analyzer
223 Summary(pl.UTF-8): Tekstowy analizator ruchu i protokołów sieciowych
224 Summary(pt_BR.UTF-8): Analisador modo texto de tráfego de rede (sniffer)
226 Requires: %{name}-common = %{version}-%{release}
227 Requires: libpcap >= 0.4
231 %description -n twireshark
232 Twireshark is a network protocol analyzer. It lets you capture packet
233 data from a live network, or read packets from a previously saved
234 capture file, either printing a decoded form of those packets to the
235 standard output or writing the packets to a file. Twireshark's native
236 capture file format is libpcap format, which is also the format used
237 by tcpdump and various other tools.
239 %description -n twireshark -l pl.UTF-8
240 Twireshark jest analizatorem protokołów sieciowych. Pozwala na
241 przechwytywanie pakietów z sieci lub wczytywanie danych z pliku.
242 Zdekodowany wynik (a twireshark zna ponad 100 rozmaitych protokołów
243 sieciowych!) jest wyświetlony na ekranie. Natywnym formatem plików
244 tetherala jest format libpcap, tak więc jest on kompatybilny z
245 tcpdumpem i innymi podobnymi narzędziami.
247 %description -n twireshark -l pt_BR.UTF-8
248 Esta é uma versão para modo texto do analisador de tráfego de rede
251 %package -n libwiretap
252 Summary: Packet capture and analysis library
253 Summary(pl.UTF-8): Biblioteka do przechwytywania i analizy pakietów
255 Requires: glib2 >= 1:2.22.0
256 Requires: libgcrypt >= 1.4.2
257 Requires: libnl >= 3.2
259 %description -n libwiretap
260 Wiretap is a library that is being developed as a future replacement
261 for libpcap, the current standard Unix library for packet capturing.
263 %description -n libwiretap -l pl.UTF-8
264 Biblioteka Wiretap rozwijana jest jako przyszły następca biblioteki
265 libpcap, obecnie standardu przechwytywania pakietów w systemach Unix.
267 %package -n libwiretap-devel
268 Summary: Header files for libwiretap packet capture library
269 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libwiretap do przechwytywania pakietów
270 Group: Development/Libraries
271 Requires: glib2-devel >= 1:2.22.0
272 Requires: libgcrypt-devel >= 1.4.2
273 Requires: libnl-devel >= 3.2
274 Requires: libwiretap = %{version}-%{release}
276 %description -n libwiretap-devel
277 Header files for libwiretap packet capture library.
279 %description -n libwiretap-devel -l pl.UTF-8
280 Pliki nagłówkowe biblioteki libwiretap służącej do przechwytywania
288 find -name Makefile.am | xargs sed -i -e 's/-Werror//g'
292 %{__aclocal} -I aclocal-fallback
300 HTML_VIEWER=/usr/bin/xdg-open \
302 --enable-packet-editor \
304 --disable-silent-rules \
305 --disable-usr-local \
307 %{?with_gtk2:--with-gtk2 --without-gtk3}%{!?with_gtk2:--with-gtk3 --without-gtk2} \
312 %{__with_without qt} \
313 %{__enable_disable gui wireshark} \
315 %if %{with kerberos5}
318 %{!?with_snmp:--without-net-snmp --without-ucdsnmp}
323 rm -rf $RPM_BUILD_ROOT
324 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_includedir}/wiretap}
327 DESTDIR=$RPM_BUILD_ROOT
329 cp -p image/hi48-app-wireshark.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
331 %{__rm} $RPM_BUILD_ROOT%{_desktopdir}/wireshark*.desktop
332 %{?with_gtk:cp -p wireshark-gtk.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark.desktop}
333 %{?with_qt:cp -p wireshark.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark-qt.desktop}
335 cp -a wiretap/*.h $RPM_BUILD_ROOT%{_includedir}/wiretap
337 # plugins *.la are useless - *.so are loaded through gmodule
338 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/%{version}*/*.la
340 # no headers installed for this library
341 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libwireshark.{so,la}
343 %{?with_qt:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{,-qt}}
344 %{?with_gtk:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{-gtk,}}
347 rm -rf $RPM_BUILD_ROOT
350 %update_mime_database
353 %update_mime_database
356 %groupadd -P %{name}-common -g 104 wireshark
360 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
365 if [ "$1" = "0" ]; then
366 %groupremove wireshark
369 %post -n libwiretap -p /sbin/ldconfig
370 %postun -n libwiretap -p /sbin/ldconfig
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_bindir}/wireshark
376 %{_desktopdir}/wireshark.desktop
381 %defattr(644,root,root,755)
383 %{_datadir}/appdata/wireshark.appdata.xml
384 %{_datadir}/mime/packages/wireshark.xml
385 %{_pixmapsdir}/%{name}.png
386 %{_iconsdir}/hicolor/16x16/apps/%{name}.png
387 %{_iconsdir}/hicolor/16x16/mimetypes/application-%{name}-doc.png
388 %{_iconsdir}/hicolor/24x24/apps/%{name}.png
389 %{_iconsdir}/hicolor/24x24/mimetypes/application-%{name}-doc.png
390 %{_iconsdir}/hicolor/32x32/apps/%{name}.png
391 %{_iconsdir}/hicolor/32x32/mimetypes/application-%{name}-doc.png
392 %{_iconsdir}/hicolor/48x48/apps/%{name}.png
393 %{_iconsdir}/hicolor/48x48/mimetypes/application-%{name}-doc.png
394 %{_iconsdir}/hicolor/64x64/apps/%{name}.png
395 %{_iconsdir}/hicolor/64x64/mimetypes/application-%{name}-doc.png
396 %{_iconsdir}/hicolor/128x128/apps/%{name}.png
397 %{_iconsdir}/hicolor/128x128/mimetypes/application-%{name}-doc.png
398 %{_iconsdir}/hicolor/256x256/apps/%{name}.png
399 %{_iconsdir}/hicolor/256x256/mimetypes/application-%{name}-doc.png
400 %{_iconsdir}/hicolor/scalable/apps/%{name}.svg
401 %{_mandir}/man1/wireshark.1*
405 %defattr(644,root,root,755)
406 %doc AUTHORS* ChangeLog NEWS README README.linux README.vmware doc/README.*
407 %dir %{_libdir}/%{name}
408 %dir %{_libdir}/%{name}/extcap
409 %dir %{_libdir}/%{name}/plugins
410 %dir %{_libdir}/%{name}/plugins/%{version}*
411 %attr(755,root,root) %{_libdir}/%{name}/extcap/androiddump
412 %attr(755,root,root) %{_libdir}/%{name}/extcap/randpktdump
413 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{version}*/*.so
414 %attr(755,root,root) %{_bindir}/capinfos
415 %attr(755,root,root) %{_bindir}/captype
416 %attr(755,root,root) %{_bindir}/dftest
417 %attr(750,root,wireshark) %{_bindir}/dumpcap
418 %attr(755,root,root) %{_bindir}/editcap
419 %attr(755,root,root) %{_bindir}/idl2wrs
420 %attr(755,root,root) %{_bindir}/mergecap
421 %attr(755,root,root) %{_bindir}/randpkt
422 %attr(755,root,root) %{_bindir}/rawshark
423 %attr(755,root,root) %{_bindir}/reordercap
424 %attr(755,root,root) %{_bindir}/text2pcap
425 %attr(755,root,root) %{_libdir}/libwireshark.so.*.*.*
426 %attr(755,root,root) %ghost %{_libdir}/libwireshark.so.8
427 %{_mandir}/man1/androiddump.1*
428 %{_mandir}/man1/capinfos.1*
429 %{_mandir}/man1/dftest.1*
430 %{_mandir}/man1/dumpcap.1*
431 %{_mandir}/man1/editcap.1*
432 %{_mandir}/man1/mergecap.1*
433 %{_mandir}/man1/rawshark.1*
434 %{_mandir}/man1/randpkt.1*
435 %{_mandir}/man1/randpktdump.1*
436 %{_mandir}/man1/reordercap.1*
437 %{_mandir}/man1/text2pcap.1*
438 %{_mandir}/man4/extcap.4*
439 %{_mandir}/man4/wireshark-filter.4*
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_bindir}/wireshark-qt
445 %{_desktopdir}/wireshark-qt.desktop
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_bindir}/tshark
451 %{_mandir}/man1/tshark*.1*
454 %defattr(644,root,root,755)
456 %attr(755,root,root) %{_libdir}/libwiretap.so.*.*.*
457 %attr(755,root,root) %ghost %{_libdir}/libwiretap.so.6
458 %attr(755,root,root) %{_libdir}/libwscodecs.so.*.*.*
459 %attr(755,root,root) %ghost %{_libdir}/libwscodecs.so.1
460 %attr(755,root,root) %{_libdir}/libwsutil.so.*.*.*
461 %attr(755,root,root) %ghost %{_libdir}/libwsutil.so.7
463 %files -n libwiretap-devel
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_libdir}/libwiretap.so
466 %attr(755,root,root) %{_libdir}/libwscodecs.so
467 %attr(755,root,root) %{_libdir}/libwsutil.so
468 %{_libdir}/libwiretap.la
469 %{_libdir}/libwscodecs.la
470 %{_libdir}/libwsutil.la
471 %{_includedir}/wiretap