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