]> git.pld-linux.org Git - packages/wireshark.git/blob - wireshark.spec
- up to 2.0.1
[packages/wireshark.git] / wireshark.spec
1 # TODO
2 # - gtk+3 bcond?
3 # - use policykit to gain root
4 # - use %caps when rpm supports it: %attr(750,root,wireshark) %caps(cap_net_raw,cap_net_admin=eip) %{_sbindir}/dumpcap
5 #
6 # Conditional build:
7 %bcond_without  gui             # build without any GUI support
8 %bcond_without  gtk3            # build without GTK+3 support
9 %bcond_without  kerberos5       # build without Kerberos V support
10 %bcond_without  snmp            # build without snmp support
11 %bcond_without  qt              # build without Qt support
12
13 %if %{without gui}
14 %undefine with_qt
15 %endif
16
17 Summary:        Network traffic and protocol analyzer
18 Summary(es.UTF-8):      Analizador de tráfico de red
19 Summary(pl.UTF-8):      Analizator ruchu i protokołów sieciowych
20 Summary(pt_BR.UTF-8):   Analisador de tráfego de rede
21 Summary(ru.UTF-8):      Анализатор сетевого траффика
22 Summary(uk.UTF-8):      Аналізатор мережевого трафіку
23 Name:           wireshark
24 Version:        2.0.1
25 Release:        1
26 License:        GPL v2+
27 Group:          Networking/Utilities
28 Source0:        http://www.wireshark.org/download/src/%{name}-%{version}.tar.bz2
29 # Source0-md5:  c1610ab2238965363b811e5188750fb1
30 Patch0:         %{name}-Werror.patch
31 Patch1:         %{name}-ac.patch
32 Patch2:         %{name}-desktop.patch
33 URL:            http://www.wireshark.org/
34 BuildRequires:  GeoIP-devel
35 BuildRequires:  asciidoc
36 BuildRequires:  autoconf >= 2.60
37 BuildRequires:  automake >= 1:1.9
38 BuildRequires:  bison
39 BuildRequires:  c-ares-devel
40 BuildRequires:  doxygen
41 BuildRequires:  flex
42 BuildRequires:  glib2-devel >= 1:2.14.0
43 BuildRequires:  gnutls-devel >= 1.2.0
44 %if %{with gui}
45 %{!?with_gtk3:BuildRequires:    gtk+2-devel >= 2:2.12.0}
46 %{?with_gtk3:BuildRequires:     gtk+3-devel}
47 %endif
48 %{?with_kerberos5:BuildRequires:        heimdal-devel}
49 BuildRequires:  libcap-devel
50 BuildRequires:  libgcrypt-devel >= 1.1.92
51 BuildRequires:  libnl-devel >= 3.2
52 BuildRequires:  libpcap-devel >= 2:1.0.0-4
53 BuildRequires:  libsmi-devel
54 BuildRequires:  libtool
55 BuildRequires:  libxslt-progs
56 BuildRequires:  lua52-devel
57 %{?with_snmp:BuildRequires:     net-snmp-devel}
58 %{?with_kerberos5:BuildRequires:        openssl-devel}
59 BuildRequires:  perl-tools-pod
60 BuildRequires:  pkgconfig
61 %{?with_gui:BuildRequires:      portaudio-devel}
62 BuildRequires:  rpmbuild(macros) >= 1.527
63 %if %{with qt}
64 BuildRequires:  Qt5Core-devel
65 BuildRequires:  Qt5PrintSupport-devel
66 BuildRequires:  Qt5Widgets-devel
67 BuildRequires:  qt5-build
68 %endif
69 BuildRequires:  sed >= 4.0
70 BuildRequires:  zlib-devel
71 Requires:       %{name}-common = %{version}-%{release}
72 %if %{with gui}
73 Requires:       gtk+2 >= 2:2.12.0
74 %endif
75 Requires:       libpcap >= 0.4
76 Provides:       ethereal
77 Provides:       ethereal-gnome
78 Obsoletes:      ethereal
79 Obsoletes:      ethereal-gnome
80 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81
82 %description
83 Wireshark is the name for powerful graphical network sniffer, traffic
84 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
85 capture and interactively browse the contents of network frames with
86 vast knowledge of more than 100 network protocols. Wireshark has
87 severeal useful features, including a rich display filter language,
88 the ability to view the ASCII contents of a TCP connection and plug-in
89 capabilities.
90
91 %description -l es.UTF-8
92 Analizador de tráfico de red.
93
94 %description -l pl.UTF-8
95 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
96 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
97 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
98 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
99 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
100 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
101 wtyczek (plug-ins).
102
103 %description -l pt_BR.UTF-8
104 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
105
106 %description -l ru.UTF-8
107 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
108 базируется на GTK+ и libpcap.
109
110 %description -l uk.UTF-8
111 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
112 базується на GTK+ та libpcap.
113
114 %package common
115 Summary:        Network traffic and protocol analyzer - common files
116 Summary(pl.UTF-8):      Analizator ruchu i protokołów sieciowych - wspólne pliki
117 Group:          Networking
118 Requires:       libwiretap = %{version}-%{release}
119 Provides:       %{name}-tools
120 Provides:       ethereal-common
121 Provides:       group(wireshark)
122 Obsoletes:      ethereal-common
123 Obsoletes:      wireshark-tools
124 Requires(post,postun):  /sbin/ldconfig
125 Requires(post,postun):  /sbin/setcap
126
127 %description common
128 Wireshark is the name for powerful graphical network sniffer, traffic
129 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
130 capture and interactively browse the contents of network frames with
131 vast knowledge of more than 100 network protocols. Wireshark has
132 severeal useful features, including a rich display filter language,
133 the ability to view the ASCII contents of a TCP connection and plug-in
134 capabilities.
135
136 This package provides set of tools for manipulating capture files. It
137 contains:
138 - capinfos - prints informatio about binary capture files,
139 - captype - prints the file types of capture files,
140 - dftest - shows display filter byte-code,
141 - dumpcap - dumps network traffic to a file,
142 - editcap - edit and/or translate the format of capture files,
143 - mergecap - merges two capture files into one,
144 - randpkt - generates libpcap trace file full of random packets,
145 - rawshark - dumps and analyzes raw libpcap data,
146 - text2cap - generate a capture file from an ASCII hexdump of packets.
147
148 %description common -l es.UTF-8
149 Analizador de tráfico de red.
150
151 %description common -l pl.UTF-8
152 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
153 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
154 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
155 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
156 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
157 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
158 wtyczek (plug-ins).
159
160 Pakiet ten dostarcza także zestaw narzędzi do obróbki plików z
161 przechwyconymi pakietami, obejmujący:
162 - capinfos - do wyświetlania informacji o binarnych plikach zrzutu,
163 - captype - do wyświetlania rodzaju plików zrzutu,
164 - dftest - do pokazywania bajtkodu filtrów wyświetlania,
165 - dumpcap - do zrzucania ruchu sieciowego do pliku,
166 - editcap - do edycji plików i tłumaczenia ich na inne formaty,
167 - mergecap - do łączenia dwóch plików w jeden,
168 - randpkt - do generowania plikow cap z losowymi danymi,
169 - rawshark - do obróbki plików cap,
170 - text2cap - do generowania pliku cap z szesnastkowego zrzutu ASCII
171   pakietów.
172
173 %description common -l pt_BR.UTF-8
174 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
175
176 %description common -l ru.UTF-8
177 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
178 базируется на GTK+ и libpcap.
179
180 %description common -l uk.UTF-8
181 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
182 базується на GTK+ та libpcap.
183
184 %package qt
185 Summary:        Qt-based network traffic and protocol analyzer
186 Summary(pl.UTF-8):      Analizator ruchu i protokołów sieciowych oparty na Qt
187 Group:          Networking
188 Requires:       Qt5Gui-platform-xcb
189
190 %description qt
191 An initial port to Qt (aka QtShark).
192
193 %description qt -l pl.UTF-8
194 Wstępna wersja analizatora wireshark oparta na Qt (znana też pod nazwą
195 QtShark).
196
197 %package -n twireshark
198 Summary:        Text-mode network traffic and protocol analyzer
199 Summary(pl.UTF-8):      Tekstowy analizator ruchu i protokołów sieciowych
200 Summary(pt_BR.UTF-8):   Analisador modo texto de tráfego de rede (sniffer)
201 Group:          Networking
202 Requires:       %{name}-common = %{version}-%{release}
203 Requires:       libpcap >= 0.4
204 Provides:       tethereal
205 Obsoletes:      tethereal
206
207 %description -n twireshark
208 Twireshark is a network protocol analyzer. It lets you capture packet
209 data from a live network, or read packets from a previously saved
210 capture file, either printing a decoded form of those packets to the
211 standard output or writing the packets to a file. Twireshark's native
212 capture file format is libpcap format, which is also the format used
213 by tcpdump and various other tools.
214
215 %description -n twireshark -l pl.UTF-8
216 Twireshark jest analizatorem protokołów sieciowych. Pozwala na
217 przechwytywanie pakietów z sieci lub wczytywanie danych z pliku.
218 Zdekodowany wynik (a twireshark zna ponad 100 rozmaitych protokołów
219 sieciowych!) jest wyświetlony na ekranie. Natywnym formatem plików
220 tetherala jest format libpcap, tak więc jest on kompatybilny z
221 tcpdumpem i innymi podobnymi narzędziami.
222
223 %description -n twireshark -l pt_BR.UTF-8
224 Esta é uma versão para modo texto do analisador de tráfego de rede
225 Wireshark.
226
227 %package -n libwiretap
228 Summary:        Packet capture and analysis library
229 Summary(pl.UTF-8):      Biblioteka do przechwytywania i analizy pakietów
230 Group:          Libraries
231 Requires:       glib2 >= 1:2.22.0
232 Requires:       libnl >= 3.2
233
234 %description -n libwiretap
235 Wiretap is a library that is being developed as a future replacement
236 for libpcap, the current standard Unix library for packet capturing.
237
238 %description -n libwiretap -l pl.UTF-8
239 Biblioteka Wiretap rozwijana jest jako przyszły następca biblioteki
240 libpcap, obecnie standardu przechwytywania pakietów w systemach Unix.
241
242 %package -n libwiretap-devel
243 Summary:        Header files for libwiretap packet capture library
244 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libwiretap do przechwytywania pakietów
245 Group:          Development/Libraries
246 Requires:       glib2-devel >= 1:2.14.0
247 Requires:       libnl-devel >= 3.2
248 Requires:       libwiretap = %{version}-%{release}
249
250 %description -n libwiretap-devel
251 Header files for libwiretap packet capture library.
252
253 %description -n libwiretap-devel -l pl.UTF-8
254 Pliki nagłówkowe biblioteki libwiretap służącej do przechwytywania
255 pakietów.
256
257 %prep
258 %setup -q
259 %patch0 -p1
260 %patch1 -p1
261 %patch2 -p1
262 find -name Makefile.am | xargs sed -i -e 's/-Werror//g'
263
264 %build
265 %{__libtoolize}
266 %{__aclocal} -I aclocal-fallback
267 %{__autoconf}
268 %{__automake}
269 %if %{with qt}
270 MOC=moc-qt5 \
271 UIC=uic-qt5 \
272 %endif
273 %configure \
274         --enable-dftest \
275         --enable-packet-editor \
276         --enable-randpkt \
277         --disable-silent-rules \
278         --disable-usr-local \
279 %if %{with gui}
280         %{?with_gtk3:--with-gtk3 --without-gtk2}%{!?with_gtk3:--with-gtk2 --without-gtk3} \
281 %endif
282         %{__with_without qt} \
283         %{__enable_disable gui wireshark} \
284         --with-lua \
285 %if %{with kerberos5}
286         --with-krb5 \
287         --with-ssl \
288 %endif
289         %{!?with_snmp:--without-net-snmp --without-ucdsnmp}
290
291 %{__make}
292
293 %install
294 rm -rf $RPM_BUILD_ROOT
295 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_includedir}/wiretap}
296
297 %{__make} install \
298         DESTDIR=$RPM_BUILD_ROOT
299
300 cp -p image/hi48-app-wireshark.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
301 %{?with_qt:cp -p wireshark-gtk.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark.desktop}
302 %{?with_gtk3:cp -p wireshark.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark-qt.desktop}
303 %{__rm} -f $RPM_BUILD_ROOT%{_desktopdir}/wireshark-gtk.desktop
304
305 cp -a wiretap/*.h $RPM_BUILD_ROOT%{_includedir}/wiretap
306
307 # plugins *.la are useless - *.so are loaded through gmodule
308 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/%{version}*/*.la
309
310 # no headers installed for this library
311 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libwireshark.{so,la}
312
313 %{?with_qt:mv $RPM_BUILD_ROOT%{_bindir}/wireshark{,-qt}}
314 %{?with_gtk3:mv $RPM_BUILD_ROOT%{_bindir}/wireshark{-gtk,}}
315
316 %clean
317 rm -rf $RPM_BUILD_ROOT
318
319 %pre    common
320 %groupadd -P %{name}-common -g 104 wireshark
321
322 %post   common
323 /sbin/ldconfig
324 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
325 %update_mime_database
326 exit 0
327
328 %postun common
329 /sbin/ldconfig
330 if [ "$1" = "0" ]; then
331         %groupremove wireshark
332 fi
333 %update_mime_database
334
335 %post   -n libwiretap -p /sbin/ldconfig
336 %postun -n libwiretap -p /sbin/ldconfig
337
338 %if %{with gui}
339 %files
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_bindir}/wireshark
342 %{_datadir}/%{name}
343 %{_desktopdir}/*.desktop
344 %{_pixmapsdir}/%{name}.png
345 %{_iconsdir}/hicolor/16x16/apps/%{name}.png
346 %{_iconsdir}/hicolor/16x16/mimetypes/application-%{name}-doc.png
347 %{_iconsdir}/hicolor/24x24/apps/%{name}.png
348 %{_iconsdir}/hicolor/24x24/mimetypes/application-%{name}-doc.png
349 %{_iconsdir}/hicolor/32x32/apps/%{name}.png
350 %{_iconsdir}/hicolor/32x32/mimetypes/application-%{name}-doc.png
351 %{_iconsdir}/hicolor/48x48/apps/%{name}.png
352 %{_iconsdir}/hicolor/48x48/mimetypes/application-%{name}-doc.png
353 %{_iconsdir}/hicolor/64x64/apps/%{name}.png
354 %{_iconsdir}/hicolor/64x64/mimetypes/application-%{name}-doc.png
355 %{_iconsdir}/hicolor/128x128/apps/%{name}.png
356 %{_iconsdir}/hicolor/128x128/mimetypes/application-%{name}-doc.png
357 %{_iconsdir}/hicolor/256x256/apps/%{name}.png
358 %{_iconsdir}/hicolor/256x256/mimetypes/application-%{name}-doc.png
359 %{_iconsdir}/hicolor/scalable/apps/%{name}.svg
360 %{_mandir}/man1/wireshark.1*
361 %endif
362
363 %files common
364 %defattr(644,root,root,755)
365 %doc AUTHORS* ChangeLog NEWS README{,.[lv]*} doc/{randpkt.txt,README.*}
366 %dir %{_libdir}/%{name}
367 %dir %{_libdir}/%{name}/plugins
368 %dir %{_libdir}/%{name}/plugins/%{version}*
369 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{version}*/*.so
370 %attr(755,root,root) %{_bindir}/androiddump
371 %attr(755,root,root) %{_bindir}/capinfos
372 %attr(755,root,root) %{_bindir}/captype
373 %attr(755,root,root) %{_bindir}/dftest
374 %attr(750,root,wireshark) %{_bindir}/dumpcap
375 %attr(755,root,root) %{_bindir}/editcap
376 %attr(755,root,root) %{_bindir}/idl2wrs
377 %attr(755,root,root) %{_bindir}/mergecap
378 %attr(755,root,root) %{_bindir}/randpkt
379 %attr(755,root,root) %{_bindir}/rawshark
380 %attr(755,root,root) %{_bindir}/reordercap
381 %attr(755,root,root) %{_bindir}/text2pcap
382 %attr(755,root,root) %{_libdir}/libwireshark.so.*.*.*
383 %attr(755,root,root) %ghost %{_libdir}/libwireshark.so.6
384 %{_datadir}/appdata/wireshark.appdata.xml
385 %{_datadir}/mime/packages/wireshark.xml
386 %{_mandir}/man1/capinfos.1*
387 %{_mandir}/man1/dftest.1*
388 %{_mandir}/man1/dumpcap.1*
389 %{_mandir}/man1/editcap.1*
390 %{_mandir}/man1/mergecap.1*
391 %{_mandir}/man1/rawshark.1*
392 %{_mandir}/man1/randpkt.1*
393 %{_mandir}/man1/reordercap.1*
394 %{_mandir}/man1/text2pcap.1*
395 %{_mandir}/man4/wireshark-filter.4*
396
397 %if %{with qt}
398 %files qt
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_bindir}/wireshark-qt
401 %endif
402
403 %files -n twireshark
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_bindir}/tshark
406 %{_mandir}/man1/tshark*.1*
407
408 %files -n libwiretap
409 %defattr(644,root,root,755)
410 %doc wiretap/README*
411 %attr(755,root,root) %{_libdir}/libwiretap.so.*.*.*
412 %attr(755,root,root) %ghost %{_libdir}/libwiretap.so.5
413 %attr(755,root,root) %{_libdir}/libwsutil.so.*.*.*
414 %attr(755,root,root) %ghost %{_libdir}/libwsutil.so.6
415
416 %files -n libwiretap-devel
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_libdir}/libwiretap.so
419 %attr(755,root,root) %{_libdir}/libwsutil.so
420 %{_libdir}/libwiretap.la
421 %{_libdir}/libwsutil.la
422 %{_includedir}/wiretap
This page took 0.102893 seconds and 4 git commands to generate.