]> git.pld-linux.org Git - packages/wireshark.git/blob - wireshark.spec
- add required qt vars to configure
[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:        1.12.4
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:  acfa156fd35cb66c867b1ace992e4b5b
30 Patch0:         %{name}-Werror.patch
31 Patch1:         %{name}-gcc43.patch
32 Patch2:         %{name}-ac.patch
33 Patch3:         %{name}-desktop.patch
34 URL:            http://www.wireshark.org/
35 BuildRequires:  GeoIP-devel
36 BuildRequires:  asciidoc
37 BuildRequires:  autoconf >= 2.60
38 BuildRequires:  automake >= 1:1.9
39 BuildRequires:  bison
40 BuildRequires:  c-ares-devel
41 BuildRequires:  doxygen
42 BuildRequires:  flex
43 BuildRequires:  glib2-devel >= 1:2.14.0
44 BuildRequires:  gnutls-devel >= 1.2.0
45 %if %{with gui}
46 %{!?with_gtk3:BuildRequires:    gtk+2-devel >= 2:2.12.0}
47 %{?with_gtk3:BuildRequires:     gtk+3-devel}
48 %endif
49 %{?with_kerberos5:BuildRequires:        heimdal-devel}
50 BuildRequires:  libcap-devel
51 BuildRequires:  libgcrypt-devel >= 1.1.92
52 BuildRequires:  libnl-devel >= 3.2
53 BuildRequires:  libpcap-devel >= 2:1.0.0-4
54 BuildRequires:  libsmi-devel
55 BuildRequires:  libtool
56 BuildRequires:  libxslt-progs
57 BuildRequires:  lua52-devel
58 %{?with_snmp:BuildRequires:     net-snmp-devel}
59 %{?with_kerberos5:BuildRequires:        openssl-devel}
60 BuildRequires:  perl-tools-pod
61 BuildRequires:  pkgconfig
62 %{?with_gui:BuildRequires:      portaudio-devel}
63 BuildRequires:  rpmbuild(macros) >= 1.527
64 %if %{with qt}
65 BuildRequires:  QtCore-devel >= 4.6.0
66 BuildRequires:  QtGui-devel
67 BuildRequires:  qt4-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
189 %description qt
190 An initial port to Qt (aka QtShark).
191
192 %description qt -l pl.UTF-8
193 Wstępna wersja analizatora wireshark oparta na Qt (znana też pod nazwą
194 QtShark).
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 -n libwiretap
227 Summary:        Packet capture and analysis library
228 Summary(pl.UTF-8):      Biblioteka do przechwytywania i analizy pakietów
229 Group:          Libraries
230 Requires:       glib2 >= 1:2.22.0
231 Requires:       libnl >= 3.2
232
233 %description -n libwiretap
234 Wiretap is a library that is being developed as a future replacement
235 for libpcap, the current standard Unix library for packet capturing.
236
237 %description -n libwiretap -l pl.UTF-8
238 Biblioteka Wiretap rozwijana jest jako przyszły następca biblioteki
239 libpcap, obecnie standardu przechwytywania pakietów w systemach Unix.
240
241 %package -n libwiretap-devel
242 Summary:        Header files for libwiretap packet capture library
243 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libwiretap do przechwytywania pakietów
244 Group:          Development/Libraries
245 Requires:       glib2-devel >= 1:2.14.0
246 Requires:       libnl-devel >= 3.2
247 Requires:       libwiretap = %{version}-%{release}
248
249 %description -n libwiretap-devel
250 Header files for libwiretap packet capture library.
251
252 %description -n libwiretap-devel -l pl.UTF-8
253 Pliki nagłówkowe biblioteki libwiretap służącej do przechwytywania
254 pakietów.
255
256 %prep
257 %setup -q
258 %patch0 -p1
259 %patch1 -p1
260 %patch2 -p1
261 %patch3 -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 %configure \
270 %if %{with qt}
271         MOC=moc-qt4 \
272         UIC=uic-qt4 \
273 %endif
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 cp -p wireshark.desktop $RPM_BUILD_ROOT%{_desktopdir}
302
303 cp -a wiretap/*.h $RPM_BUILD_ROOT%{_includedir}/wiretap
304
305 # plugins *.la are useless - *.so are loaded through gmodule
306 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/%{version}*/*.la
307
308 # no headers installed for this library
309 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libwireshark.{so,la}
310
311 %clean
312 rm -rf $RPM_BUILD_ROOT
313
314 %pre    common
315 %groupadd -P %{name}-common -g 104 wireshark
316
317 %post   common
318 /sbin/ldconfig
319 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
320 exit 0
321
322 %postun common
323 /sbin/ldconfig
324 if [ "$1" = "0" ]; then
325         %groupremove wireshark
326 fi
327
328 %post   -n libwiretap -p /sbin/ldconfig
329 %postun -n libwiretap -p /sbin/ldconfig
330
331 %if %{with gui}
332 %files
333 %defattr(644,root,root,755)
334 %attr(755,root,root) %{_bindir}/wireshark
335 %{_datadir}/%{name}
336 %{_desktopdir}/%{name}.desktop
337 %{_pixmapsdir}/%{name}.png
338 %{_mandir}/man1/wireshark.1*
339 %endif
340
341 %files common
342 %defattr(644,root,root,755)
343 %doc AUTHORS* ChangeLog NEWS README{,.[lv]*} doc/{randpkt.txt,README.*}
344 %dir %{_libdir}/%{name}
345 %dir %{_libdir}/%{name}/plugins
346 %dir %{_libdir}/%{name}/plugins/%{version}*
347 %attr(755,root,root) %{_libdir}/%{name}/plugins/%{version}*/*.so
348 %attr(755,root,root) %{_bindir}/capinfos
349 %attr(755,root,root) %{_bindir}/captype
350 %attr(755,root,root) %{_bindir}/dftest
351 %attr(750,root,wireshark) %{_bindir}/dumpcap
352 %attr(755,root,root) %{_bindir}/editcap
353 %attr(755,root,root) %{_bindir}/mergecap
354 %attr(755,root,root) %{_bindir}/randpkt
355 %attr(755,root,root) %{_bindir}/rawshark
356 %attr(755,root,root) %{_bindir}/reordercap
357 %attr(755,root,root) %{_bindir}/text2pcap
358 %attr(755,root,root) %{_libdir}/libwireshark.so.*.*.*
359 %attr(755,root,root) %ghost %{_libdir}/libwireshark.so.5
360 %{_mandir}/man1/capinfos.1*
361 %{_mandir}/man1/dftest.1*
362 %{_mandir}/man1/dumpcap.1*
363 %{_mandir}/man1/editcap.1*
364 %{_mandir}/man1/mergecap.1*
365 %{_mandir}/man1/rawshark.1*
366 %{_mandir}/man1/randpkt.1*
367 %{_mandir}/man1/reordercap.1*
368 %{_mandir}/man1/text2pcap.1*
369 %{_mandir}/man4/wireshark-filter.4*
370
371 %if %{with qt}
372 %files qt
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_bindir}/wireshark-qt
375 %endif
376
377 %files -n twireshark
378 %defattr(644,root,root,755)
379 %attr(755,root,root) %{_bindir}/tshark
380 %{_mandir}/man1/tshark*.1*
381
382 %files -n libwiretap
383 %defattr(644,root,root,755)
384 %doc wiretap/{README*,AUTHORS}
385 %attr(755,root,root) %{_libdir}/libfiletap.so.*.*.*
386 %attr(755,root,root) %ghost %{_libdir}/libfiletap.so.0
387 %attr(755,root,root) %{_libdir}/libwiretap.so.*.*.*
388 %attr(755,root,root) %ghost %{_libdir}/libwiretap.so.4
389 %attr(755,root,root) %{_libdir}/libwsutil.so.*.*.*
390 %attr(755,root,root) %ghost %{_libdir}/libwsutil.so.4
391
392 %files -n libwiretap-devel
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/libfiletap.so
395 %attr(755,root,root) %{_libdir}/libwiretap.so
396 %attr(755,root,root) %{_libdir}/libwsutil.so
397 %{_libdir}/libfiletap.la
398 %{_libdir}/libwiretap.la
399 %{_libdir}/libwsutil.la
400 %{_includedir}/wiretap
This page took 1.407446 seconds and 4 git commands to generate.