]> git.pld-linux.org Git - packages/wireshark.git/blob - wireshark.spec
update desktop database
[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.6
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:  0994f7f327e0562f7a69bb4fa956dc7f
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:  Qt5Concurrent-devel >= %{qt_ver}
76 BuildRequires:  Qt5Core-devel >= %{qt_ver}
77 BuildRequires:  Qt5Gui-devel >= %{qt_ver}
78 BuildRequires:  Qt5Multimedia-devel >= %{qt_ver}
79 BuildRequires:  Qt5PrintSupport-devel >= %{qt_ver}
80 BuildRequires:  Qt5Widgets-devel >= %{qt_ver}
81 BuildRequires:  libstdc++-devel >= 6:5
82 BuildRequires:  qt5-build >= %{qt_ver}
83 BuildRequires:  qt5-linguist >= %{qt_ver}
84 %endif
85 Requires(post,postun):  desktop-file-utils
86 Requires(post,postun):  gtk-update-icon-cache
87 Requires(post,postun):  shared-mime-info
88 Requires:       Qt5Core >= %{qt_ver}
89 Requires:       Qt5Gui >= %{qt_ver}
90 Requires:       Qt5Multimedia >= %{qt_ver}
91 Requires:       Qt5PrintSupport >= %{qt_ver}
92 Requires:       Qt5Widgets >= %{qt_ver}
93 Requires:       gdk-pixbuf2 >= 2.26
94 Requires:       hicolor-icon-theme
95 Suggests:       xdg-utils
96 Provides:       ethereal
97 Provides:       ethereal-gnome
98 Obsoletes:      ethereal < 1
99 Obsoletes:      ethereal-gnome < 1
100 Obsoletes:      wireshark-gui-common < 3
101 Obsoletes:      wireshark-qt < 3
102 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
103
104 %description
105 Wireshark is the name for powerful graphical network sniffer, traffic
106 and protocol analyzer based on QT and libpcap libraries. It lets you
107 capture and interactively browse the contents of network frames with
108 vast knowledge of more than 100 network protocols. Wireshark has
109 severeal useful features, including a rich display filter language,
110 the ability to view the ASCII contents of a TCP connection and plug-in
111 capabilities.
112
113 %description -l es.UTF-8
114 Analizador de tráfico de red.
115
116 %description -l pl.UTF-8
117 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
118 protokołów sieciowych opartym na bibliotekach QT oraz libpcap.
119 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
120 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
121 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
122 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
123 wtyczek (plug-ins).
124
125 %description -l pt_BR.UTF-8
126 O Wireshark é um analisador de protocolo de rede baseado no QT.
127
128 %description -l ru.UTF-8
129 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
130 базируется на QT и libpcap.
131
132 %description -l uk.UTF-8
133 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
134 базується на QT та libpcap.
135
136 %package common
137 Summary:        Network traffic and protocol analyzer - common files
138 Summary(pl.UTF-8):      Analizator ruchu i protokołów sieciowych - wspólne pliki
139 Group:          Networking
140 Requires(post,postun):  /sbin/setcap
141 Requires:       %{name}-libs = %{version}-%{release}
142 Requires:       gnutls >= 3.5.8
143 Requires:       libpcap >= 0.4
144 Requires:       libssh >= 0.6.0
145 Provides:       ethereal-common
146 Provides:       group(wireshark)
147 Provides:       wireshark-tools
148 Obsoletes:      ethereal-common < 1
149 Obsoletes:      wireshark-tools < 1.0.3-3
150
151 %description common
152 Wireshark is the name for powerful graphical network sniffer, traffic
153 and protocol analyzer based on QT and libpcap libraries. It lets you
154 capture and interactively browse the contents of network frames with
155 vast knowledge of more than 100 network protocols. Wireshark has
156 severeal useful features, including a rich display filter language,
157 the ability to view the ASCII contents of a TCP connection and plug-in
158 capabilities.
159
160 This package provides the shared library, plugins, data and a set of
161 tools for manipulating capture files. It contains:
162 - capinfos - prints informatio about binary capture files,
163 - captype - prints the file types of capture files,
164 - dftest - shows display filter byte-code,
165 - dumpcap - dumps network traffic to a file,
166 - editcap - edit and/or translate the format of capture files,
167 - mergecap - merges two capture files into one,
168 - randpkt - generates libpcap trace file full of random packets,
169 - rawshark - dumps and analyzes raw libpcap data,
170 - text2cap - generate a capture file from an ASCII hexdump of packets.
171
172 %description common -l es.UTF-8
173 Analizador de tráfico de red.
174
175 %description common -l pl.UTF-8
176 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
177 protokołów sieciowych opartym na bibliotekach QT oraz libpcap.
178 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
179 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
180 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
181 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
182 wtyczek (plug-ins).
183
184 Ten pakiet ten zawiera bibliotekę współdzieloną, wtyczki, dane oraz
185 zestaw narzędzi do obróbki plików z przechwyconymi pakietami,
186 obejmujący:
187 - capinfos - do wyświetlania informacji o binarnych plikach zrzutu,
188 - captype - do wyświetlania rodzaju plików zrzutu,
189 - dftest - do pokazywania bajtkodu filtrów wyświetlania,
190 - dumpcap - do zrzucania ruchu sieciowego do pliku,
191 - editcap - do edycji plików i tłumaczenia ich na inne formaty,
192 - mergecap - do łączenia dwóch plików w jeden,
193 - randpkt - do generowania plikow cap z losowymi danymi,
194 - rawshark - do obróbki plików cap,
195 - text2cap - do generowania pliku cap z szesnastkowego zrzutu ASCII
196   pakietów.
197
198 %description common -l pt_BR.UTF-8
199 O Wireshark é um analisador de protocolo de rede baseado no QT.
200
201 %description common -l ru.UTF-8
202 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
203 базируется на QT и libpcap.
204
205 %description common -l uk.UTF-8
206 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
207 базується на QT та libpcap.
208
209 %package -n twireshark
210 Summary:        Text-mode network traffic and protocol analyzer
211 Summary(pl.UTF-8):      Tekstowy analizator ruchu i protokołów sieciowych
212 Summary(pt_BR.UTF-8):   Analisador modo texto de tráfego de rede (sniffer)
213 Group:          Networking
214 Requires:       %{name}-common = %{version}-%{release}
215 Requires:       libpcap >= 0.4
216 Provides:       tethereal
217 Obsoletes:      tethereal < 1
218
219 %description -n twireshark
220 Twireshark is a network protocol analyzer. It lets you capture packet
221 data from a live network, or read packets from a previously saved
222 capture file, either printing a decoded form of those packets to the
223 standard output or writing the packets to a file. Twireshark's native
224 capture file format is libpcap format, which is also the format used
225 by tcpdump and various other tools.
226
227 %description -n twireshark -l pl.UTF-8
228 Twireshark jest analizatorem protokołów sieciowych. Pozwala na
229 przechwytywanie pakietów z sieci lub wczytywanie danych z pliku.
230 Zdekodowany wynik (a twireshark zna ponad 100 rozmaitych protokołów
231 sieciowych!) jest wyświetlony na ekranie. Natywnym formatem plików
232 tetherala jest format libpcap, tak więc jest on kompatybilny z
233 tcpdumpem i innymi podobnymi narzędziami.
234
235 %description -n twireshark -l pt_BR.UTF-8
236 Esta é uma versão para modo texto do analisador de tráfego de rede
237 Wireshark.
238
239 %package libs
240 Summary:        Wireshark packet capture and dissection libraries
241 Summary(pl.UTF-8):      Biblioteki Wiresharka do przechwytywania i sekcji pakietów
242 Group:          Libraries
243 Requires:       c-ares >= 1.13.0
244 Requires:       glib2 >= 1:2.50.0
245 Requires:       libgcrypt >= 1.8.0
246 Requires:       libnl >= 3.2
247 Requires:       zstd >= 1.0.0
248 Obsoletes:      libwiretap < 2.4.0
249
250 %description libs
251 Wireshark packet capture and dissection libraries.
252
253 %description libs -l pl.UTF-8
254 Biblioteki Wiresharka do przechwytywania i sekcji pakietów.
255
256 %package devel
257 Summary:        Header files for Wireshark libraries
258 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek Wiresharka
259 Group:          Development/Libraries
260 Requires:       %{name}-libs = %{version}-%{release}
261 Requires:       glib2-devel >= 1:2.50.0
262 Requires:       libgcrypt-devel >= 1.8.0
263 Requires:       libnl-devel >= 3.2
264 Obsoletes:      libwiretap-devel < 2.4.0
265
266 %description devel
267 Header files for Wireshark libraries.
268
269 %description devel -l pl.UTF-8
270 Pliki nagłówkowe bibliotek Wiresharka.
271
272 %prep
273 %setup -q
274
275 %build
276 install -d build
277 cd build
278 %cmake .. \
279         -DBUILD_androiddump=ON \
280         -DBUILD_corbaidl2wrs=ON \
281         -DBUILD_dcerpcidl2wrs=ON \
282         -DBUILD_mmdbresolve=ON \
283         -DBUILD_randpktdump=ON \
284         -DBUILD_tfshark=OFF \
285         -DBUILD_wireshark=ON \
286         -DCMAKE_INSTALL_DATADIR:PATH=share/wireshark \
287         -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
288         -DDISABLE_WERROR=ON \
289         -DENABLE_LUA=ON \
290         -DENABLE_NETLINK=ON \
291         -DENABLE_PLUGINS=ON \
292         -DENABLE_PORTAUDIO=ON \
293         -DENABLE_QT5=ON \
294         -DENABLE_SMI=ON
295
296 %{__make}
297
298 %install
299 rm -rf $RPM_BUILD_ROOT
300
301 %{__make} -C build install \
302         DESTDIR=$RPM_BUILD_ROOT
303
304 # used by installed headers, but not installed by cmake
305 cp -p build/config.h $RPM_BUILD_ROOT%{_includedir}/wireshark
306
307 %clean
308 rm -rf $RPM_BUILD_ROOT
309
310 %pre
311 %update_icon_cache hicolor
312 %update_desktop_database
313 %update_mime_database
314
315 %postun
316 %update_icon_cache hicolor
317 %update_desktop_database
318 %update_mime_database
319
320 %pre    common
321 %groupadd -P %{name}-common -g 104 wireshark
322
323 %post   common
324 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
325 exit 0
326
327 %postun common
328 if [ "$1" = "0" ]; then
329         %groupremove wireshark
330 fi
331
332 %post   libs -p /sbin/ldconfig
333 %postun libs -p /sbin/ldconfig
334
335 %if %{with gui}
336 %files
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{_bindir}/wireshark
339 %{_desktopdir}/org.wireshark.Wireshark.desktop
340 %{_datadir}/%{name}
341 %{_datadir}/metainfo/org.wireshark.Wireshark.metainfo.xml
342 %{_datadir}/mime/packages/org.wireshark.Wireshark.xml
343 %{_iconsdir}/hicolor/16x16/apps/org.wireshark.Wireshark.png
344 %{_iconsdir}/hicolor/16x16/mimetypes/org.wireshark.Wireshark-mimetype.png
345 %{_iconsdir}/hicolor/24x24/apps/org.wireshark.Wireshark.png
346 %{_iconsdir}/hicolor/24x24/mimetypes/org.wireshark.Wireshark-mimetype.png
347 %{_iconsdir}/hicolor/32x32/apps/org.wireshark.Wireshark.png
348 %{_iconsdir}/hicolor/32x32/mimetypes/org.wireshark.Wireshark-mimetype.png
349 %{_iconsdir}/hicolor/48x48/apps/org.wireshark.Wireshark.png
350 %{_iconsdir}/hicolor/48x48/mimetypes/org.wireshark.Wireshark-mimetype.png
351 %{_iconsdir}/hicolor/64x64/apps/org.wireshark.Wireshark.png
352 %{_iconsdir}/hicolor/64x64/mimetypes/org.wireshark.Wireshark-mimetype.png
353 %{_iconsdir}/hicolor/128x128/apps/org.wireshark.Wireshark.png
354 %{_iconsdir}/hicolor/128x128/mimetypes/org.wireshark.Wireshark-mimetype.png
355 %{_iconsdir}/hicolor/256x256/apps/org.wireshark.Wireshark.png
356 %{_iconsdir}/hicolor/256x256/mimetypes/org.wireshark.Wireshark-mimetype.png
357 %{_iconsdir}/hicolor/scalable/apps/org.wireshark.Wireshark.svg
358 %{_mandir}/man1/wireshark.1*
359 %endif
360
361 %files common
362 %defattr(644,root,root,755)
363 %doc AUTHORS* ChangeLog NEWS README.md README.linux doc/README.*
364 %dir %{_libdir}/%{name}/extcap
365 %dir %{_libdir}/%{name}/plugins
366 %dir %{_libdir}/%{name}/plugins/%{branch_ver}
367 %dir %{_libdir}/%{name}/plugins/%{branch_ver}/codecs
368 %dir %{_libdir}/%{name}/plugins/%{branch_ver}/epan
369 %dir %{_libdir}/%{name}/plugins/%{branch_ver}/wiretap
370 %attr(755,root,root) %{_libdir}/%{name}/extcap/androiddump
371 %attr(755,root,root) %{_libdir}/%{name}/extcap/ciscodump
372 %attr(755,root,root) %{_libdir}/%{name}/extcap/dpauxmon
373 %attr(755,root,root) %{_libdir}/%{name}/extcap/randpktdump
374 %attr(755,root,root) %{_libdir}/%{name}/extcap/sshdump
375 %attr(755,root,root) %{_libdir}/%{name}/extcap/sdjournal
376 %attr(755,root,root) %{_libdir}/%{name}/extcap/udpdump
377 %attr(755,root,root) %{_libdir}/%{name}/extcap/wifidump
378 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{branch_ver}/codecs/*.so
379 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{branch_ver}/epan/*.so
380 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{branch_ver}/wiretap/*.so
381 %attr(755,root,root) %{_bindir}/capinfos
382 %attr(755,root,root) %{_bindir}/captype
383 %attr(750,root,wireshark) %{_bindir}/dumpcap
384 %attr(755,root,root) %{_bindir}/editcap
385 %attr(755,root,root) %{_bindir}/idl2wrs
386 %attr(755,root,root) %{_bindir}/mergecap
387 %attr(755,root,root) %{_bindir}/mmdbresolve
388 %attr(755,root,root) %{_bindir}/randpkt
389 %attr(755,root,root) %{_bindir}/rawshark
390 %attr(755,root,root) %{_bindir}/reordercap
391 %attr(755,root,root) %{_bindir}/sharkd
392 %attr(755,root,root) %{_bindir}/text2pcap
393 %{_mandir}/man1/androiddump.1*
394 %{_mandir}/man1/capinfos.1*
395 %{_mandir}/man1/captype.1*
396 %{_mandir}/man1/ciscodump.1*
397 %{_mandir}/man1/dftest.1*
398 %{_mandir}/man1/dpauxmon.1*
399 %{_mandir}/man1/dumpcap.1*
400 %{_mandir}/man1/editcap.1*
401 %{_mandir}/man1/etwdump.1.*
402 %{_mandir}/man1/idl2wrs.1*
403 %{_mandir}/man1/mergecap.1*
404 %{_mandir}/man1/mmdbresolve.1*
405 %{_mandir}/man1/rawshark.1*
406 %{_mandir}/man1/randpkt.1*
407 %{_mandir}/man1/randpktdump.1*
408 %{_mandir}/man1/reordercap.1*
409 %{_mandir}/man1/sdjournal.1*
410 %{_mandir}/man1/sshdump.1*
411 %{_mandir}/man1/text2pcap.1*
412 %{_mandir}/man1/udpdump.1*
413 %{_mandir}/man1/wifidump.1*
414 %{_mandir}/man4/extcap.4*
415 %{_mandir}/man4/wireshark-filter.4*
416
417 %files -n twireshark
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_bindir}/tshark
420 %{_mandir}/man1/tshark*.1*
421
422 %files libs
423 %defattr(644,root,root,755)
424 %attr(755,root,root) %{_libdir}/libwireshark.so.*.*.*
425 %attr(755,root,root) %ghost %{_libdir}/libwireshark.so.16
426 %attr(755,root,root) %{_libdir}/libwiretap.so.*.*.*
427 %attr(755,root,root) %ghost %{_libdir}/libwiretap.so.13
428 %attr(755,root,root) %{_libdir}/libwsutil.so.*.*.*
429 %attr(755,root,root) %ghost %{_libdir}/libwsutil.so.14
430 %dir %{_libdir}/%{name}
431
432 %files devel
433 %defattr(644,root,root,755)
434 %doc wiretap/{README,README.airmagnet}
435 %attr(755,root,root) %{_libdir}/libwireshark.so
436 %attr(755,root,root) %{_libdir}/libwiretap.so
437 %attr(755,root,root) %{_libdir}/libwsutil.so
438 %{_includedir}/wireshark
439 %{_pkgconfigdir}/wireshark.pc
440 %{_libdir}/%{name}/cmake
This page took 0.080943 seconds and 4 git commands to generate.