]> git.pld-linux.org Git - packages/wireshark.git/blob - wireshark.spec
- up to 2.2.7
[packages/wireshark.git] / wireshark.spec
1 # TODO
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
4 #
5 # Conditional build:
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
12
13 %if %{without gui}
14 %undefine with_gtk
15 %undefine with_qt
16 %endif
17
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):      Аналізатор мережевого трафіку
24 Name:           wireshark
25 Version:        2.2.7
26 Release:        1
27 License:        GPL v2+
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
39 BuildRequires:  bison
40 BuildRequires:  c-ares-devel
41 BuildRequires:  doxygen
42 BuildRequires:  flex
43 BuildRequires:  glib2-devel >= 1:2.22.0
44 BuildRequires:  gnutls-devel >= 3.1.10
45 %if %{with gui}
46 %{?with_gtk2:BuildRequires:     gtk+2-devel >= 2:2.12.0}
47 %{!?with_gtk2:BuildRequires:    gtk+3-devel >= 3.0.0}
48 %endif
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
67 %if %{with qt}
68 BuildRequires:  Qt5Core-devel
69 BuildRequires:  Qt5PrintSupport-devel
70 BuildRequires:  Qt5Widgets-devel
71 BuildRequires:  libstdc++-devel
72 BuildRequires:  qt5-build
73 BuildRequires:  qt5-linguist
74 %endif
75 Requires:       %{name}-gui-common = %{version}-%{release}
76 %if %{with gtk2}
77 Requires:       gtk+2 >= 2:2.12.0
78 %else
79 Requires:       gtk+3 >= 3.0.0
80 %endif
81 Suggests:       xdg-utils
82 Provides:       ethereal
83 Provides:       ethereal-gnome
84 Obsoletes:      ethereal
85 Obsoletes:      ethereal-gnome
86 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
87
88 %description
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
95 capabilities.
96
97 %description -l es.UTF-8
98 Analizador de tráfico de red.
99
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
107 wtyczek (plug-ins).
108
109 %description -l pt_BR.UTF-8
110 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
111
112 %description -l ru.UTF-8
113 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
114 базируется на GTK+ и libpcap.
115
116 %description -l uk.UTF-8
117 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
118 базується на GTK+ та libpcap.
119
120 %package gui-common
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}
125
126 %description gui-common
127 Network traffic and protocol analyzer - files common for all Wireshark
128 GUIs (GTK+, Qt).
129
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).
133
134 %package common
135 Summary:        Network traffic and protocol analyzer - common files
136 Summary(pl.UTF-8):      Analizator ruchu i protokołów sieciowych - wspólne pliki
137 Group:          Networking
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
148
149 %description common
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
156 capabilities.
157
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.
169
170 %description common -l es.UTF-8
171 Analizador de tráfico de red.
172
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
180 wtyczek (plug-ins).
181
182 Ten pakiet ten zawiera bibliotekę współdzieloną, wtyczki, dane oraz
183 zestaw narzędzi do obróbki plików z przechwyconymi pakietami,
184 obejmujący:
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
194   pakietów.
195
196 %description common -l pt_BR.UTF-8
197 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
198
199 %description common -l ru.UTF-8
200 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
201 базируется на GTK+ и libpcap.
202
203 %description common -l uk.UTF-8
204 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
205 базується на GTK+ та libpcap.
206
207 %package qt
208 Summary:        Qt-based network traffic and protocol analyzer
209 Summary(pl.UTF-8):      Analizator ruchu i protokołów sieciowych oparty na Qt
210 Group:          Networking
211 Requires:       %{name}-gui-common = %{version}-%{release}
212 Requires:       Qt5Gui-platform-xcb
213
214 %description qt
215 An initial port to Qt (aka QtShark).
216
217 %description qt -l pl.UTF-8
218 Wstępna wersja analizatora wireshark oparta na Qt (znana też pod nazwą
219 QtShark).
220
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)
225 Group:          Networking
226 Requires:       %{name}-common = %{version}-%{release}
227 Requires:       libpcap >= 0.4
228 Provides:       tethereal
229 Obsoletes:      tethereal
230
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.
238
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.
246
247 %description -n twireshark -l pt_BR.UTF-8
248 Esta é uma versão para modo texto do analisador de tráfego de rede
249 Wireshark.
250
251 %package -n libwiretap
252 Summary:        Packet capture and analysis library
253 Summary(pl.UTF-8):      Biblioteka do przechwytywania i analizy pakietów
254 Group:          Libraries
255 Requires:       glib2 >= 1:2.22.0
256 Requires:       libgcrypt >= 1.4.2
257 Requires:       libnl >= 3.2
258
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.
262
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.
266
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}
275
276 %description -n libwiretap-devel
277 Header files for libwiretap packet capture library.
278
279 %description -n libwiretap-devel -l pl.UTF-8
280 Pliki nagłówkowe biblioteki libwiretap służącej do przechwytywania
281 pakietów.
282
283 %prep
284 %setup -q
285 %patch0 -p1
286 %patch1 -p1
287 %patch2 -p1
288 find -name Makefile.am | xargs sed -i -e 's/-Werror//g'
289
290 %build
291 %{__libtoolize}
292 %{__aclocal} -I aclocal-fallback
293 %{__autoconf}
294 %{__automake}
295 %if %{with qt}
296 MOC=moc-qt5 \
297 UIC=uic-qt5 \
298 %endif
299 %configure \
300         HTML_VIEWER=/usr/bin/xdg-open \
301         --enable-dftest \
302         --enable-packet-editor \
303         --enable-randpkt \
304         --disable-silent-rules \
305         --disable-usr-local \
306 %if %{with gtk}
307         %{?with_gtk2:--with-gtk2 --without-gtk3}%{!?with_gtk2:--with-gtk3 --without-gtk2} \
308 %else
309         --without-gtk2 \
310         --without-gtk3 \
311 %endif
312         %{__with_without qt} \
313         %{__enable_disable gui wireshark} \
314         --with-lua \
315 %if %{with kerberos5}
316         --with-krb5 \
317 %endif
318         %{!?with_snmp:--without-net-snmp --without-ucdsnmp}
319
320 %{__make}
321
322 %install
323 rm -rf $RPM_BUILD_ROOT
324 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_includedir}/wiretap}
325
326 %{__make} install \
327         DESTDIR=$RPM_BUILD_ROOT
328
329 cp -p image/hi48-app-wireshark.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
330
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}
334
335 cp -a wiretap/*.h $RPM_BUILD_ROOT%{_includedir}/wiretap
336
337 # plugins *.la are useless - *.so are loaded through gmodule
338 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/%{version}*/*.la
339
340 # no headers installed for this library
341 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libwireshark.{so,la}
342
343 %{?with_qt:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{,-qt}}
344 %{?with_gtk:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{-gtk,}}
345
346 %clean
347 rm -rf $RPM_BUILD_ROOT
348
349 %pre    gui-common
350 %update_mime_database
351
352 %postun gui-common
353 %update_mime_database
354
355 %pre    common
356 %groupadd -P %{name}-common -g 104 wireshark
357
358 %post   common
359 /sbin/ldconfig
360 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
361 exit 0
362
363 %postun common
364 /sbin/ldconfig
365 if [ "$1" = "0" ]; then
366         %groupremove wireshark
367 fi
368
369 %post   -n libwiretap -p /sbin/ldconfig
370 %postun -n libwiretap -p /sbin/ldconfig
371
372 %if %{with gtk}
373 %files
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_bindir}/wireshark
376 %{_desktopdir}/wireshark.desktop
377 %endif
378
379 %if %{with gui}
380 %files gui-common
381 %defattr(644,root,root,755)
382 %{_datadir}/%{name}
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*
402 %endif
403
404 %files common
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*
440
441 %if %{with qt}
442 %files qt
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_bindir}/wireshark-qt
445 %{_desktopdir}/wireshark-qt.desktop
446 %endif
447
448 %files -n twireshark
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_bindir}/tshark
451 %{_mandir}/man1/tshark*.1*
452
453 %files -n libwiretap
454 %defattr(644,root,root,755)
455 %doc wiretap/README*
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
462
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
This page took 0.05735 seconds and 4 git commands to generate.