]> git.pld-linux.org Git - packages/wireshark.git/blob - wireshark.spec
8f68eff0a954cd4542a8abe4b1d007c9558543ff
[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             # without QT GUI
9
10 %define         branch_ver      4.0
11 %define         qt_ver          5.12
12 Summary:        Network traffic and protocol analyzer
13 Summary(es.UTF-8):      Analizador de tráfico de red
14 Summary(pl.UTF-8):      Analizator ruchu i protokołów sieciowych
15 Summary(pt_BR.UTF-8):   Analisador de tráfego de rede
16 Summary(ru.UTF-8):      Анализатор сетевого траффика
17 Summary(uk.UTF-8):      Аналізатор мережевого трафіку
18 Name:           wireshark
19 Version:        4.0.3
20 Release:        1
21 License:        GPL v2+
22 Group:          Networking/Utilities
23 Source0:        https://2.na.dl.wireshark.org/src/%{name}-%{version}.tar.xz
24 # Source0-md5:  11a7302d65b1ff26f92148f3014eaf5b
25 URL:            https://www.wireshark.org/
26 BuildRequires:  bcg729-devel
27 BuildRequires:  bison
28 BuildRequires:  c-ares-devel >= 1.13.0
29 BuildRequires:  cmake >= 3.10
30 BuildRequires:  doxygen
31 BuildRequires:  flex
32 BuildRequires:  gcc >= 5:3.2
33 BuildRequires:  gettext-tools
34 BuildRequires:  glib2-devel >= 1:2.50.0
35 BuildRequires:  gnutls-devel >= 3.5.8
36 %{?with_kerberos5:BuildRequires:        heimdal-devel}
37 BuildRequires:  libbrotli-devel
38 # libcap-devel doesn't pull libcap, but only libcap-libs
39 BuildRequires:  libcap
40 BuildRequires:  libcap-devel
41 BuildRequires:  libgcrypt-devel >= 1.8.0
42 BuildRequires:  libmaxminddb-devel
43 BuildRequires:  libnl-devel >= 3.2
44 BuildRequires:  libpcap-devel >= 2:1.0.0-4
45 BuildRequires:  libsmi-devel
46 BuildRequires:  libssh-devel >= 0.6.0
47 BuildRequires:  libstdc++-devel >= 6:4.7
48 BuildRequires:  libtool >= 2:2.2.2
49 BuildRequires:  libxml2-devel >= 2.0
50 BuildRequires:  libxslt-progs
51 BuildRequires:  lua52-devel
52 BuildRequires:  lz4-devel
53 BuildRequires:  minizip-devel
54 %{?with_snmp:BuildRequires:     net-snmp-devel}
55 BuildRequires:  nghttp2-devel >= 1.11.0
56 BuildRequires:  opus-devel
57 BuildRequires:  perl-tools-pod
58 BuildRequires:  pkgconfig >= 1:0.7
59 BuildRequires:  python3 >= 1:3.6
60 BuildRequires:  rpmbuild(macros) >= 1.527
61 BuildRequires:  ruby-asciidoctor >= 1.5
62 %{?with_gui:BuildRequires:      sbc-devel >= 1.0}
63 BuildRequires:  sed >= 4.0
64 BuildRequires:  snappy-devel
65 BuildRequires:  spandsp-devel
66 %{?with_gui:BuildRequires:      speexdsp-devel}
67 BuildRequires:  systemd-devel
68 BuildRequires:  tar >= 1:1.22
69 BuildRequires:  webrtc-libilbc-devel
70 BuildRequires:  w3m
71 BuildRequires:  xz
72 BuildRequires:  zlib-devel
73 BuildRequires:  zstd-devel >= 1.0.0
74 %if %{with gui}
75 BuildRequires:  Qt5Core-devel >= %{qt_ver}
76 BuildRequires:  Qt5Gui-devel >= %{qt_ver}
77 BuildRequires:  Qt5Multimedia-devel >= %{qt_ver}
78 BuildRequires:  Qt5PrintSupport-devel >= %{qt_ver}
79 BuildRequires:  Qt5Widgets-devel >= %{qt_ver}
80 BuildRequires:  libstdc++-devel >= 6:5
81 BuildRequires:  qt5-build >= %{qt_ver}
82 BuildRequires:  qt5-linguist >= %{qt_ver}
83 %endif
84 Requires(post,postun):  gtk-update-icon-cache
85 Requires(post,postun):  shared-mime-info
86 Requires:       Qt5Core >= %{qt_ver}
87 Requires:       Qt5Gui >= %{qt_ver}
88 Requires:       Qt5Multimedia >= %{qt_ver}
89 Requires:       Qt5PrintSupport >= %{qt_ver}
90 Requires:       Qt5Widgets >= %{qt_ver}
91 Requires:       gdk-pixbuf2 >= 2.26
92 Requires:       hicolor-icon-theme
93 Suggests:       xdg-utils
94 Provides:       ethereal
95 Provides:       ethereal-gnome
96 Obsoletes:      ethereal < 1
97 Obsoletes:      ethereal-gnome < 1
98 Obsoletes:      wireshark-gui-common < 3
99 Obsoletes:      wireshark-qt < 3
100 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
101
102 %description
103 Wireshark is the name for powerful graphical network sniffer, traffic
104 and protocol analyzer based on QT and libpcap libraries. It lets you
105 capture and interactively browse the contents of network frames with
106 vast knowledge of more than 100 network protocols. Wireshark has
107 severeal useful features, including a rich display filter language,
108 the ability to view the ASCII contents of a TCP connection and plug-in
109 capabilities.
110
111 %description -l es.UTF-8
112 Analizador de tráfico de red.
113
114 %description -l pl.UTF-8
115 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
116 protokołów sieciowych opartym na bibliotekach QT oraz libpcap.
117 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
118 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
119 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
120 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
121 wtyczek (plug-ins).
122
123 %description -l pt_BR.UTF-8
124 O Wireshark é um analisador de protocolo de rede baseado no QT.
125
126 %description -l ru.UTF-8
127 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
128 базируется на QT и libpcap.
129
130 %description -l uk.UTF-8
131 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
132 базується на QT та libpcap.
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(post,postun):  /sbin/setcap
139 Requires:       %{name}-libs = %{version}-%{release}
140 Requires:       gnutls >= 3.5.8
141 Requires:       libpcap >= 0.4
142 Requires:       libssh >= 0.6.0
143 Provides:       ethereal-common
144 Provides:       group(wireshark)
145 Provides:       wireshark-tools
146 Obsoletes:      ethereal-common < 1
147 Obsoletes:      wireshark-tools < 1.0.3-3
148
149 %description common
150 Wireshark is the name for powerful graphical network sniffer, traffic
151 and protocol analyzer based on QT 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 QT 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 QT.
198
199 %description common -l ru.UTF-8
200 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
201 базируется на QT и libpcap.
202
203 %description common -l uk.UTF-8
204 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
205 базується на QT та libpcap.
206
207 %package -n twireshark
208 Summary:        Text-mode network traffic and protocol analyzer
209 Summary(pl.UTF-8):      Tekstowy analizator ruchu i protokołów sieciowych
210 Summary(pt_BR.UTF-8):   Analisador modo texto de tráfego de rede (sniffer)
211 Group:          Networking
212 Requires:       %{name}-common = %{version}-%{release}
213 Requires:       libpcap >= 0.4
214 Provides:       tethereal
215 Obsoletes:      tethereal < 1
216
217 %description -n twireshark
218 Twireshark is a network protocol analyzer. It lets you capture packet
219 data from a live network, or read packets from a previously saved
220 capture file, either printing a decoded form of those packets to the
221 standard output or writing the packets to a file. Twireshark's native
222 capture file format is libpcap format, which is also the format used
223 by tcpdump and various other tools.
224
225 %description -n twireshark -l pl.UTF-8
226 Twireshark jest analizatorem protokołów sieciowych. Pozwala na
227 przechwytywanie pakietów z sieci lub wczytywanie danych z pliku.
228 Zdekodowany wynik (a twireshark zna ponad 100 rozmaitych protokołów
229 sieciowych!) jest wyświetlony na ekranie. Natywnym formatem plików
230 tetherala jest format libpcap, tak więc jest on kompatybilny z
231 tcpdumpem i innymi podobnymi narzędziami.
232
233 %description -n twireshark -l pt_BR.UTF-8
234 Esta é uma versão para modo texto do analisador de tráfego de rede
235 Wireshark.
236
237 %package libs
238 Summary:        Wireshark packet capture and dissection libraries
239 Summary(pl.UTF-8):      Biblioteki Wiresharka do przechwytywania i sekcji pakietów
240 Group:          Libraries
241 Requires:       c-ares >= 1.13.0
242 Requires:       glib2 >= 1:2.50.0
243 Requires:       libgcrypt >= 1.8.0
244 Requires:       libnl >= 3.2
245 Requires:       zstd >= 1.0.0
246 Obsoletes:      libwiretap < 2.4.0
247
248 %description libs
249 Wireshark packet capture and dissection libraries.
250
251 %description libs -l pl.UTF-8
252 Biblioteki Wiresharka do przechwytywania i sekcji pakietów.
253
254 %package devel
255 Summary:        Header files for Wireshark libraries
256 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek Wiresharka
257 Group:          Development/Libraries
258 Requires:       %{name}-libs = %{version}-%{release}
259 Requires:       glib2-devel >= 1:2.50.0
260 Requires:       libgcrypt-devel >= 1.8.0
261 Requires:       libnl-devel >= 3.2
262 Obsoletes:      libwiretap-devel < 2.4.0
263
264 %description devel
265 Header files for Wireshark libraries.
266
267 %description devel -l pl.UTF-8
268 Pliki nagłówkowe bibliotek Wiresharka.
269
270 %prep
271 %setup -q
272
273 %build
274 install -d build
275 cd build
276 %cmake .. \
277         -DBUILD_androiddump=ON \
278         -DBUILD_corbaidl2wrs=ON \
279         -DBUILD_dcerpcidl2wrs=ON \
280         -DBUILD_mmdbresolve=ON \
281         -DBUILD_randpktdump=ON \
282         -DBUILD_tfshark=OFF \
283         -DBUILD_wireshark=ON \
284         -DCMAKE_INSTALL_DATADIR:PATH=share/wireshark \
285         -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
286         -DDISABLE_WERROR=ON \
287         -DENABLE_LUA=ON \
288         -DENABLE_NETLINK=ON \
289         -DENABLE_PLUGINS=ON \
290         -DENABLE_PORTAUDIO=ON \
291         -DENABLE_QT5=ON \
292         -DENABLE_SMI=ON
293
294 %{__make}
295
296 %install
297 rm -rf $RPM_BUILD_ROOT
298
299 %{__make} -C build install \
300         DESTDIR=$RPM_BUILD_ROOT
301
302 # used by installed headers, but not installed by cmake
303 cp -p build/config.h $RPM_BUILD_ROOT%{_includedir}/wireshark
304
305 %clean
306 rm -rf $RPM_BUILD_ROOT
307
308 %pre
309 %update_icon_cache hicolor
310 %update_mime_database
311
312 %postun
313 %update_icon_cache hicolor
314 %update_mime_database
315
316 %pre    common
317 %groupadd -P %{name}-common -g 104 wireshark
318
319 %post   common
320 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
321 exit 0
322
323 %postun common
324 if [ "$1" = "0" ]; then
325         %groupremove wireshark
326 fi
327
328 %post   libs -p /sbin/ldconfig
329 %postun libs -p /sbin/ldconfig
330
331 %if %{with gui}
332 %files
333 %defattr(644,root,root,755)
334 %attr(755,root,root) %{_bindir}/wireshark
335 %{_desktopdir}/org.wireshark.Wireshark.desktop
336 %{_datadir}/%{name}
337 %{_datadir}/metainfo/org.wireshark.Wireshark.metainfo.xml
338 %{_datadir}/mime/packages/org.wireshark.Wireshark.xml
339 %{_iconsdir}/hicolor/16x16/apps/org.wireshark.Wireshark.png
340 %{_iconsdir}/hicolor/16x16/mimetypes/org.wireshark.Wireshark-mimetype.png
341 %{_iconsdir}/hicolor/24x24/apps/org.wireshark.Wireshark.png
342 %{_iconsdir}/hicolor/24x24/mimetypes/org.wireshark.Wireshark-mimetype.png
343 %{_iconsdir}/hicolor/32x32/apps/org.wireshark.Wireshark.png
344 %{_iconsdir}/hicolor/32x32/mimetypes/org.wireshark.Wireshark-mimetype.png
345 %{_iconsdir}/hicolor/48x48/apps/org.wireshark.Wireshark.png
346 %{_iconsdir}/hicolor/48x48/mimetypes/org.wireshark.Wireshark-mimetype.png
347 %{_iconsdir}/hicolor/64x64/apps/org.wireshark.Wireshark.png
348 %{_iconsdir}/hicolor/64x64/mimetypes/org.wireshark.Wireshark-mimetype.png
349 %{_iconsdir}/hicolor/128x128/apps/org.wireshark.Wireshark.png
350 %{_iconsdir}/hicolor/128x128/mimetypes/org.wireshark.Wireshark-mimetype.png
351 %{_iconsdir}/hicolor/256x256/apps/org.wireshark.Wireshark.png
352 %{_iconsdir}/hicolor/256x256/mimetypes/org.wireshark.Wireshark-mimetype.png
353 %{_iconsdir}/hicolor/scalable/apps/org.wireshark.Wireshark.svg
354 %{_mandir}/man1/wireshark.1*
355 %endif
356
357 %files common
358 %defattr(644,root,root,755)
359 %doc AUTHORS* ChangeLog NEWS README.md README.linux doc/README.*
360 %dir %{_libdir}/%{name}/extcap
361 %dir %{_libdir}/%{name}/plugins
362 %dir %{_libdir}/%{name}/plugins/%{branch_ver}
363 %dir %{_libdir}/%{name}/plugins/%{branch_ver}/codecs
364 %dir %{_libdir}/%{name}/plugins/%{branch_ver}/epan
365 %dir %{_libdir}/%{name}/plugins/%{branch_ver}/wiretap
366 %attr(755,root,root) %{_libdir}/%{name}/extcap/androiddump
367 %attr(755,root,root) %{_libdir}/%{name}/extcap/ciscodump
368 %attr(755,root,root) %{_libdir}/%{name}/extcap/dpauxmon
369 %attr(755,root,root) %{_libdir}/%{name}/extcap/randpktdump
370 %attr(755,root,root) %{_libdir}/%{name}/extcap/sshdump
371 %attr(755,root,root) %{_libdir}/%{name}/extcap/sdjournal
372 %attr(755,root,root) %{_libdir}/%{name}/extcap/udpdump
373 %attr(755,root,root) %{_libdir}/%{name}/extcap/wifidump
374 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{branch_ver}/codecs/*.so
375 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{branch_ver}/epan/*.so
376 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{branch_ver}/wiretap/*.so
377 %attr(755,root,root) %{_bindir}/capinfos
378 %attr(755,root,root) %{_bindir}/captype
379 %attr(750,root,wireshark) %{_bindir}/dumpcap
380 %attr(755,root,root) %{_bindir}/editcap
381 %attr(755,root,root) %{_bindir}/idl2wrs
382 %attr(755,root,root) %{_bindir}/mergecap
383 %attr(755,root,root) %{_bindir}/mmdbresolve
384 %attr(755,root,root) %{_bindir}/randpkt
385 %attr(755,root,root) %{_bindir}/rawshark
386 %attr(755,root,root) %{_bindir}/reordercap
387 %attr(755,root,root) %{_bindir}/sharkd
388 %attr(755,root,root) %{_bindir}/text2pcap
389 %{_mandir}/man1/androiddump.1*
390 %{_mandir}/man1/capinfos.1*
391 %{_mandir}/man1/captype.1*
392 %{_mandir}/man1/ciscodump.1*
393 %{_mandir}/man1/dftest.1*
394 %{_mandir}/man1/dpauxmon.1*
395 %{_mandir}/man1/dumpcap.1*
396 %{_mandir}/man1/editcap.1*
397 %{_mandir}/man1/etwdump.1.*
398 %{_mandir}/man1/idl2wrs.1*
399 %{_mandir}/man1/mergecap.1*
400 %{_mandir}/man1/mmdbresolve.1*
401 %{_mandir}/man1/rawshark.1*
402 %{_mandir}/man1/randpkt.1*
403 %{_mandir}/man1/randpktdump.1*
404 %{_mandir}/man1/reordercap.1*
405 %{_mandir}/man1/sdjournal.1*
406 %{_mandir}/man1/sshdump.1*
407 %{_mandir}/man1/text2pcap.1*
408 %{_mandir}/man1/udpdump.1*
409 %{_mandir}/man1/wifidump.1*
410 %{_mandir}/man4/extcap.4*
411 %{_mandir}/man4/wireshark-filter.4*
412
413 %files -n twireshark
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_bindir}/tshark
416 %{_mandir}/man1/tshark*.1*
417
418 %files libs
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/libwireshark.so.*.*.*
421 %attr(755,root,root) %ghost %{_libdir}/libwireshark.so.16
422 %attr(755,root,root) %{_libdir}/libwiretap.so.*.*.*
423 %attr(755,root,root) %ghost %{_libdir}/libwiretap.so.13
424 %attr(755,root,root) %{_libdir}/libwsutil.so.*.*.*
425 %attr(755,root,root) %ghost %{_libdir}/libwsutil.so.14
426 %dir %{_libdir}/%{name}
427
428 %files devel
429 %defattr(644,root,root,755)
430 %doc wiretap/{README,README.airmagnet}
431 %attr(755,root,root) %{_libdir}/libwireshark.so
432 %attr(755,root,root) %{_libdir}/libwiretap.so
433 %attr(755,root,root) %{_libdir}/libwsutil.so
434 %{_includedir}/wireshark
435 %{_pkgconfigdir}/wireshark.pc
436 %{_libdir}/%{name}/cmake
This page took 0.089122 seconds and 2 git commands to generate.