3 # - use policykit to gain root
4 # - use %caps when rpm supports it: %attr(750,root,wireshark) %caps(cap_net_raw,cap_net_admin=eip) %{_sbindir}/dumpcap
7 %bcond_without gui # build without any GUI support
8 %bcond_without gtk3 # build without GTK+3 support
9 %bcond_without kerberos5 # build without Kerberos V support
10 %bcond_without snmp # build without snmp support
11 %bcond_without qt # build without Qt support
17 Summary: Network traffic and protocol analyzer
18 Summary(es.UTF-8): Analizador de tráfico de red
19 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych
20 Summary(pt_BR.UTF-8): Analisador de tráfego de rede
21 Summary(ru.UTF-8): Анализатор сетевого траффика
22 Summary(uk.UTF-8): Аналізатор мережевого трафіку
27 Group: Networking/Utilities
28 Source0: http://www.wireshark.org/download/src/%{name}-%{version}.tar.bz2
29 # Source0-md5: c1610ab2238965363b811e5188750fb1
30 Patch0: %{name}-Werror.patch
31 Patch1: %{name}-ac.patch
32 Patch2: %{name}-desktop.patch
33 URL: http://www.wireshark.org/
34 BuildRequires: GeoIP-devel
35 BuildRequires: asciidoc
36 BuildRequires: autoconf >= 2.60
37 BuildRequires: automake >= 1:1.9
39 BuildRequires: c-ares-devel
40 BuildRequires: doxygen
42 BuildRequires: glib2-devel >= 1:2.14.0
43 BuildRequires: gnutls-devel >= 1.2.0
45 %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.12.0}
46 %{?with_gtk3:BuildRequires: gtk+3-devel}
48 %{?with_kerberos5:BuildRequires: heimdal-devel}
49 BuildRequires: libcap-devel
50 BuildRequires: libgcrypt-devel >= 1.1.92
51 BuildRequires: libnl-devel >= 3.2
52 BuildRequires: libpcap-devel >= 2:1.0.0-4
53 BuildRequires: libsmi-devel
54 BuildRequires: libtool
55 BuildRequires: libxslt-progs
56 BuildRequires: lua52-devel
57 %{?with_snmp:BuildRequires: net-snmp-devel}
58 %{?with_kerberos5:BuildRequires: openssl-devel}
59 BuildRequires: perl-tools-pod
60 BuildRequires: pkgconfig
61 %{?with_gui:BuildRequires: portaudio-devel}
62 BuildRequires: rpmbuild(macros) >= 1.527
64 BuildRequires: Qt5Core-devel
65 BuildRequires: Qt5PrintSupport-devel
66 BuildRequires: Qt5Widgets-devel
67 BuildRequires: qt5-build
69 BuildRequires: sed >= 4.0
70 BuildRequires: zlib-devel
71 Requires: %{name}-common = %{version}-%{release}
73 Requires: gtk+2 >= 2:2.12.0
75 Requires: libpcap >= 0.4
77 Provides: ethereal-gnome
79 Obsoletes: ethereal-gnome
80 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
83 Wireshark is the name for powerful graphical network sniffer, traffic
84 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
85 capture and interactively browse the contents of network frames with
86 vast knowledge of more than 100 network protocols. Wireshark has
87 severeal useful features, including a rich display filter language,
88 the ability to view the ASCII contents of a TCP connection and plug-in
91 %description -l es.UTF-8
92 Analizador de tráfico de red.
94 %description -l pl.UTF-8
95 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
96 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
97 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
98 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
99 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
100 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
103 %description -l pt_BR.UTF-8
104 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
106 %description -l ru.UTF-8
107 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
108 базируется на GTK+ и libpcap.
110 %description -l uk.UTF-8
111 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
112 базується на GTK+ та libpcap.
115 Summary: Network traffic and protocol analyzer - common files
116 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych - wspólne pliki
118 Requires: libwiretap = %{version}-%{release}
119 Provides: %{name}-tools
120 Provides: ethereal-common
121 Provides: group(wireshark)
122 Obsoletes: ethereal-common
123 Obsoletes: wireshark-tools
124 Requires(post,postun): /sbin/ldconfig
125 Requires(post,postun): /sbin/setcap
128 Wireshark is the name for powerful graphical network sniffer, traffic
129 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
130 capture and interactively browse the contents of network frames with
131 vast knowledge of more than 100 network protocols. Wireshark has
132 severeal useful features, including a rich display filter language,
133 the ability to view the ASCII contents of a TCP connection and plug-in
136 This package provides set of tools for manipulating capture files. It
138 - capinfos - prints informatio about binary capture files,
139 - captype - prints the file types of capture files,
140 - dftest - shows display filter byte-code,
141 - dumpcap - dumps network traffic to a file,
142 - editcap - edit and/or translate the format of capture files,
143 - mergecap - merges two capture files into one,
144 - randpkt - generates libpcap trace file full of random packets,
145 - rawshark - dumps and analyzes raw libpcap data,
146 - text2cap - generate a capture file from an ASCII hexdump of packets.
148 %description common -l es.UTF-8
149 Analizador de tráfico de red.
151 %description common -l pl.UTF-8
152 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
153 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
154 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
155 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
156 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
157 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
160 Pakiet ten dostarcza także zestaw narzędzi do obróbki plików z
161 przechwyconymi pakietami, obejmujący:
162 - capinfos - do wyświetlania informacji o binarnych plikach zrzutu,
163 - captype - do wyświetlania rodzaju plików zrzutu,
164 - dftest - do pokazywania bajtkodu filtrów wyświetlania,
165 - dumpcap - do zrzucania ruchu sieciowego do pliku,
166 - editcap - do edycji plików i tłumaczenia ich na inne formaty,
167 - mergecap - do łączenia dwóch plików w jeden,
168 - randpkt - do generowania plikow cap z losowymi danymi,
169 - rawshark - do obróbki plików cap,
170 - text2cap - do generowania pliku cap z szesnastkowego zrzutu ASCII
173 %description common -l pt_BR.UTF-8
174 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
176 %description common -l ru.UTF-8
177 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
178 базируется на GTK+ и libpcap.
180 %description common -l uk.UTF-8
181 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
182 базується на GTK+ та libpcap.
185 Summary: Qt-based network traffic and protocol analyzer
186 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych oparty na Qt
188 Requires: Qt5Gui-platform-xcb
191 An initial port to Qt (aka QtShark).
193 %description qt -l pl.UTF-8
194 Wstępna wersja analizatora wireshark oparta na Qt (znana też pod nazwą
197 %package -n twireshark
198 Summary: Text-mode network traffic and protocol analyzer
199 Summary(pl.UTF-8): Tekstowy analizator ruchu i protokołów sieciowych
200 Summary(pt_BR.UTF-8): Analisador modo texto de tráfego de rede (sniffer)
202 Requires: %{name}-common = %{version}-%{release}
203 Requires: libpcap >= 0.4
207 %description -n twireshark
208 Twireshark is a network protocol analyzer. It lets you capture packet
209 data from a live network, or read packets from a previously saved
210 capture file, either printing a decoded form of those packets to the
211 standard output or writing the packets to a file. Twireshark's native
212 capture file format is libpcap format, which is also the format used
213 by tcpdump and various other tools.
215 %description -n twireshark -l pl.UTF-8
216 Twireshark jest analizatorem protokołów sieciowych. Pozwala na
217 przechwytywanie pakietów z sieci lub wczytywanie danych z pliku.
218 Zdekodowany wynik (a twireshark zna ponad 100 rozmaitych protokołów
219 sieciowych!) jest wyświetlony na ekranie. Natywnym formatem plików
220 tetherala jest format libpcap, tak więc jest on kompatybilny z
221 tcpdumpem i innymi podobnymi narzędziami.
223 %description -n twireshark -l pt_BR.UTF-8
224 Esta é uma versão para modo texto do analisador de tráfego de rede
227 %package -n libwiretap
228 Summary: Packet capture and analysis library
229 Summary(pl.UTF-8): Biblioteka do przechwytywania i analizy pakietów
231 Requires: glib2 >= 1:2.22.0
232 Requires: libnl >= 3.2
234 %description -n libwiretap
235 Wiretap is a library that is being developed as a future replacement
236 for libpcap, the current standard Unix library for packet capturing.
238 %description -n libwiretap -l pl.UTF-8
239 Biblioteka Wiretap rozwijana jest jako przyszły następca biblioteki
240 libpcap, obecnie standardu przechwytywania pakietów w systemach Unix.
242 %package -n libwiretap-devel
243 Summary: Header files for libwiretap packet capture library
244 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libwiretap do przechwytywania pakietów
245 Group: Development/Libraries
246 Requires: glib2-devel >= 1:2.14.0
247 Requires: libnl-devel >= 3.2
248 Requires: libwiretap = %{version}-%{release}
250 %description -n libwiretap-devel
251 Header files for libwiretap packet capture library.
253 %description -n libwiretap-devel -l pl.UTF-8
254 Pliki nagłówkowe biblioteki libwiretap służącej do przechwytywania
262 find -name Makefile.am | xargs sed -i -e 's/-Werror//g'
266 %{__aclocal} -I aclocal-fallback
275 --enable-packet-editor \
277 --disable-silent-rules \
278 --disable-usr-local \
280 %{?with_gtk3:--with-gtk3 --without-gtk2}%{!?with_gtk3:--with-gtk2 --without-gtk3} \
282 %{__with_without qt} \
283 %{__enable_disable gui wireshark} \
285 %if %{with kerberos5}
289 %{!?with_snmp:--without-net-snmp --without-ucdsnmp}
294 rm -rf $RPM_BUILD_ROOT
295 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_includedir}/wiretap}
298 DESTDIR=$RPM_BUILD_ROOT
300 cp -p image/hi48-app-wireshark.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
301 %{?with_qt:cp -p wireshark-gtk.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark.desktop}
302 %{?with_gtk3:cp -p wireshark.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark-qt.desktop}
303 %{__rm} -f $RPM_BUILD_ROOT%{_desktopdir}/wireshark-gtk.desktop
305 cp -a wiretap/*.h $RPM_BUILD_ROOT%{_includedir}/wiretap
307 # plugins *.la are useless - *.so are loaded through gmodule
308 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/%{version}*/*.la
310 # no headers installed for this library
311 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libwireshark.{so,la}
313 %{?with_qt:mv $RPM_BUILD_ROOT%{_bindir}/wireshark{,-qt}}
314 %{?with_gtk3:mv $RPM_BUILD_ROOT%{_bindir}/wireshark{-gtk,}}
317 rm -rf $RPM_BUILD_ROOT
320 %groupadd -P %{name}-common -g 104 wireshark
324 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
325 %update_mime_database
330 if [ "$1" = "0" ]; then
331 %groupremove wireshark
333 %update_mime_database
335 %post -n libwiretap -p /sbin/ldconfig
336 %postun -n libwiretap -p /sbin/ldconfig
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_bindir}/wireshark
343 %{_desktopdir}/*.desktop
344 %{_pixmapsdir}/%{name}.png
345 %{_iconsdir}/hicolor/16x16/apps/%{name}.png
346 %{_iconsdir}/hicolor/16x16/mimetypes/application-%{name}-doc.png
347 %{_iconsdir}/hicolor/24x24/apps/%{name}.png
348 %{_iconsdir}/hicolor/24x24/mimetypes/application-%{name}-doc.png
349 %{_iconsdir}/hicolor/32x32/apps/%{name}.png
350 %{_iconsdir}/hicolor/32x32/mimetypes/application-%{name}-doc.png
351 %{_iconsdir}/hicolor/48x48/apps/%{name}.png
352 %{_iconsdir}/hicolor/48x48/mimetypes/application-%{name}-doc.png
353 %{_iconsdir}/hicolor/64x64/apps/%{name}.png
354 %{_iconsdir}/hicolor/64x64/mimetypes/application-%{name}-doc.png
355 %{_iconsdir}/hicolor/128x128/apps/%{name}.png
356 %{_iconsdir}/hicolor/128x128/mimetypes/application-%{name}-doc.png
357 %{_iconsdir}/hicolor/256x256/apps/%{name}.png
358 %{_iconsdir}/hicolor/256x256/mimetypes/application-%{name}-doc.png
359 %{_iconsdir}/hicolor/scalable/apps/%{name}.svg
360 %{_mandir}/man1/wireshark.1*
364 %defattr(644,root,root,755)
365 %doc AUTHORS* ChangeLog NEWS README{,.[lv]*} doc/{randpkt.txt,README.*}
366 %dir %{_libdir}/%{name}
367 %dir %{_libdir}/%{name}/plugins
368 %dir %{_libdir}/%{name}/plugins/%{version}*
369 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{version}*/*.so
370 %attr(755,root,root) %{_bindir}/androiddump
371 %attr(755,root,root) %{_bindir}/capinfos
372 %attr(755,root,root) %{_bindir}/captype
373 %attr(755,root,root) %{_bindir}/dftest
374 %attr(750,root,wireshark) %{_bindir}/dumpcap
375 %attr(755,root,root) %{_bindir}/editcap
376 %attr(755,root,root) %{_bindir}/idl2wrs
377 %attr(755,root,root) %{_bindir}/mergecap
378 %attr(755,root,root) %{_bindir}/randpkt
379 %attr(755,root,root) %{_bindir}/rawshark
380 %attr(755,root,root) %{_bindir}/reordercap
381 %attr(755,root,root) %{_bindir}/text2pcap
382 %attr(755,root,root) %{_libdir}/libwireshark.so.*.*.*
383 %attr(755,root,root) %ghost %{_libdir}/libwireshark.so.6
384 %{_datadir}/appdata/wireshark.appdata.xml
385 %{_datadir}/mime/packages/wireshark.xml
386 %{_mandir}/man1/capinfos.1*
387 %{_mandir}/man1/dftest.1*
388 %{_mandir}/man1/dumpcap.1*
389 %{_mandir}/man1/editcap.1*
390 %{_mandir}/man1/mergecap.1*
391 %{_mandir}/man1/rawshark.1*
392 %{_mandir}/man1/randpkt.1*
393 %{_mandir}/man1/reordercap.1*
394 %{_mandir}/man1/text2pcap.1*
395 %{_mandir}/man4/wireshark-filter.4*
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_bindir}/wireshark-qt
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_bindir}/tshark
406 %{_mandir}/man1/tshark*.1*
409 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_libdir}/libwiretap.so.*.*.*
412 %attr(755,root,root) %ghost %{_libdir}/libwiretap.so.5
413 %attr(755,root,root) %{_libdir}/libwsutil.so.*.*.*
414 %attr(755,root,root) %ghost %{_libdir}/libwsutil.so.6
416 %files -n libwiretap-devel
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_libdir}/libwiretap.so
419 %attr(755,root,root) %{_libdir}/libwsutil.so
420 %{_libdir}/libwiretap.la
421 %{_libdir}/libwsutil.la
422 %{_includedir}/wiretap