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