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