1 |
%define Werror_cflags %{nil} |
2 |
|
3 |
%define major 8 |
4 |
%define wiretapmajor 6 |
5 |
%define wscodecsmajor 1 |
6 |
%define wsutilmajor 7 |
7 |
%define libname %mklibname wireshark %{major} |
8 |
%define libwiretap %mklibname wiretap %{wiretapmajor} |
9 |
%define libwscodecs %mklibname wscodecs %{wscodecsmajor} |
10 |
%define libwsutil %mklibname wsutil %{wsutilmajor} |
11 |
%define libname_devel %mklibname -d wireshark |
12 |
|
13 |
Summary: Network traffic analyzer |
14 |
Name: wireshark |
15 |
Version: 2.2.9 |
16 |
Release: %mkrel 1 |
17 |
License: GPLv2+ and GPLv3 |
18 |
Group: Monitoring |
19 |
URL: http://www.wireshark.org |
20 |
Source0: http://www.wireshark.org/download/src/%{name}-%{version}.tar.bz2 |
21 |
Source10: README.urpmi |
22 |
Patch5: wireshark-1.12.0-do-not-fail-on-chgrp-chmod.patch |
23 |
Requires: dumpcap |
24 |
Requires: xdg-utils |
25 |
BuildRequires: doxygen |
26 |
BuildRequires: pkgconfig(Qt5PrintSupport) |
27 |
BuildRequires: pkgconfig(Qt5MultimediaWidgets) |
28 |
BuildRequires: pkgconfig(Qt5Help) |
29 |
BuildRequires: krb5-devel |
30 |
BuildRequires: libcap-devel |
31 |
BuildRequires: libelf-devel |
32 |
BuildRequires: libpcap-devel >= 0.7.2 |
33 |
BuildRequires: libsmi-devel |
34 |
BuildRequires: openssl-devel |
35 |
BuildRequires: pcre-devel |
36 |
BuildRequires: lua5.2-devel |
37 |
BuildRequires: portaudio-devel |
38 |
BuildRequires: libgcrypt-devel >= 1.1.92 |
39 |
BuildRequires: libgnutls-devel >= 1.2.0 |
40 |
BuildRequires: pkgconfig(libnl-3.0) |
41 |
BuildRequires: zlib-devel |
42 |
BuildRequires: bison |
43 |
BuildRequires: flex |
44 |
BuildRequires: geoip-devel |
45 |
BuildRequires: libtool |
46 |
Obsoletes: wireshark-gtk < 2.0.0 |
47 |
Obsoletes: wireshark-common < 2.0.0 |
48 |
Conflicts: wireshark-common < 2.0.0 |
49 |
|
50 |
%description |
51 |
Wireshark is a network traffic analyzer for Unix-ish operating systems. It is |
52 |
based on Qt, a graphical user interface library, and libpcap, a packet |
53 |
capture and filtering library. |
54 |
|
55 |
%package -n %{libname} |
56 |
Summary: Network traffic and protocol analyzer libraries |
57 |
Group: System/Libraries |
58 |
Conflicts: %{_lib}wireshark3 < 1.10.1 |
59 |
|
60 |
%description -n %{libname} |
61 |
Wireshark is a network traffic analyzer for Unix-ish operating systems. It is |
62 |
based on Qt, a graphical user interface library, and libpcap, a packet |
63 |
capture and filtering library. |
64 |
|
65 |
%package -n %{libwiretap} |
66 |
Summary: Packet-capture library for %{name} |
67 |
Group: System/Libraries |
68 |
Conflicts: %{_lib}wireshark3 < 1.10.1 |
69 |
|
70 |
%description -n %{libwiretap} |
71 |
The wiretap library is a packet-capture library currently under development |
72 |
parallel to wireshark. |
73 |
|
74 |
Wiretap is used in wireshark for its ability to read multiple file types. |
75 |
|
76 |
%package -n %{libwscodecs} |
77 |
Summary: Network packet dissection codecs library |
78 |
Group: System/Libraries |
79 |
|
80 |
%description -n %{libwscodecs} |
81 |
The libwscodecs library provides a codecs interface for wireshark. |
82 |
|
83 |
%package -n %{libwsutil} |
84 |
Summary: Network packet dissection utilities library |
85 |
Group: System/Libraries |
86 |
Conflicts: %{_lib}wireshark3 < 1.10.1 |
87 |
|
88 |
%description -n %{libwsutil} |
89 |
The libwsutil library provides utility functions for wireshark. |
90 |
|
91 |
%package -n %{libname_devel} |
92 |
Summary: Development files for %{name} |
93 |
Group: Development/Other |
94 |
Provides: lib%{name}-devel = %{version}-%{release} |
95 |
Provides: wireshark-devel = %{version}-%{release} |
96 |
Requires: %{libname} = %{version}-%{release} |
97 |
Requires: %{libwiretap} = %{version}-%{release} |
98 |
Requires: %{libwscodecs} = %{version}-%{release} |
99 |
Requires: %{libwsutil} = %{version}-%{release} |
100 |
|
101 |
%description -n %{libname_devel} |
102 |
This package contains files used for development with %{name}. |
103 |
|
104 |
%package tools |
105 |
Summary: Tools for manipulating capture files |
106 |
Group: Monitoring |
107 |
|
108 |
%description tools |
109 |
Set of tools for manipulating capture files. Contains: |
110 |
|
111 |
- editcap - Edit and/or translate the format of capture files |
112 |
- mergecap - Merges two capture files into one |
113 |
- text2cap - Generate a capture file from an ASCII hexdump of packets |
114 |
|
115 |
%package -n tshark |
116 |
Summary: Text-mode network traffic and protocol analyzer |
117 |
Group: Monitoring |
118 |
Requires: dumpcap |
119 |
|
120 |
%description -n tshark |
121 |
Tshark is a network protocol analyzer. It lets you capture packet data from a |
122 |
live network, or read packets from a previously saved capture file, either |
123 |
printing a decoded form of those packets to the standard output or writing the |
124 |
packets to a file. Twireshark's native capture file format is libpcap format, |
125 |
which is also the format used by tcpdump and various other tools. |
126 |
|
127 |
%package -n rawshark |
128 |
Summary: Dump and analyze raw libpcap data |
129 |
Group: Monitoring |
130 |
|
131 |
%description -n rawshark |
132 |
Rawshark reads a stream of packets from a file or pipe, and prints a line |
133 |
describing its output, followed by a set of matching fields for each packet on |
134 |
stdout. |
135 |
|
136 |
%package -n dumpcap |
137 |
Summary: Network traffic dump tool |
138 |
Group: Monitoring |
139 |
|
140 |
%description -n dumpcap |
141 |
Dumpcap is a network traffic dump tool. It lets you capture packet data from a |
142 |
live network and write the packets to a file. Many wireshark utilities require it. |
143 |
|
144 |
%prep |
145 |
%setup -q |
146 |
%patch5 -p1 |
147 |
|
148 |
# README.urpmi |
149 |
install -Dm644 %{SOURCE10} . |
150 |
|
151 |
%build |
152 |
./autogen.sh |
153 |
export PATH=$PATH:%{_qt5_bindir} |
154 |
export CFLAGS="%{optflags} -fPIC" |
155 |
export CXXFLAGS="%{optflags} -fPIC" |
156 |
%configure2_5x \ |
157 |
--disable-static \ |
158 |
--disable-warnings-as-errors \ |
159 |
--enable-warnings-as-errors=no \ |
160 |
--disable-usr-local \ |
161 |
--enable-wireshark \ |
162 |
--enable-packet-editor \ |
163 |
--enable-tshark \ |
164 |
--enable-editcap \ |
165 |
--enable-capinfos \ |
166 |
--enable-mergecap \ |
167 |
--enable-text2pcap \ |
168 |
--enable-dftest \ |
169 |
--enable-randpkt \ |
170 |
--enable-airpcap \ |
171 |
--enable-dumpcap \ |
172 |
--enable-rawshark \ |
173 |
--enable-ipv6 \ |
174 |
--enable-setuid-install \ |
175 |
--with-gnutls=yes \ |
176 |
--with-gcrypt=yes \ |
177 |
--with-geoip=yes \ |
178 |
--with-krb5 \ |
179 |
--with-adns=no \ |
180 |
--with-gtk3=no \ |
181 |
--with-qt=yes \ |
182 |
--with-libnl=3 \ |
183 |
--with-libsmi=%{_prefix} \ |
184 |
--with-pcap=%{_prefix} \ |
185 |
--with-zlib=%{_prefix} \ |
186 |
--with-lua=%{_prefix} \ |
187 |
--with-portaudio=%{_prefix} \ |
188 |
--with-libcap=%{_prefix} \ |
189 |
--with-ssl=%{_prefix} \ |
190 |
--with-plugins=%{_libdir}/%{name} |
191 |
|
192 |
%make |
193 |
|
194 |
%install |
195 |
%make_install |
196 |
|
197 |
# link to main executable |
198 |
mv %{buildroot}%{_bindir}/wireshark %{buildroot}%{_bindir}/wireshark-qt |
199 |
ln -s wireshark-qt %{buildroot}%{_bindir}/wireshark |
200 |
|
201 |
# icons |
202 |
install -Dpm0644 image/wsicon16.png %{buildroot}%{_miconsdir}/%{name}.png |
203 |
install -Dpm0644 image/wsicon32.png %{buildroot}%{_iconsdir}/%{name}.png |
204 |
install -Dpm0644 image/wsicon48.png %{buildroot}%{_liconsdir}/%{name}.png |
205 |
|
206 |
# XDG menu |
207 |
install -d %{buildroot}%{_datadir}/applications/ |
208 |
install -m 644 %{name}.desktop %{buildroot}%{_datadir}/applications/ |
209 |
|
210 |
# remove uneeded files |
211 |
find %{buildroot} -name "*.la" -delete |
212 |
|
213 |
# install includes |
214 |
mkdir -p %{buildroot}%{_includedir}/wireshark |
215 |
for include in `find epan -type f -name '*.h'`; do |
216 |
mkdir -p %{buildroot}%{_includedir}/wireshark/`dirname $include` |
217 |
install -m 0644 $include %{buildroot}%{_includedir}/wireshark/`dirname $include` |
218 |
done |
219 |
|
220 |
# remaining include files |
221 |
install -m 0644 *.h %{buildroot}%{_includedir}/wireshark |
222 |
mkdir -p %{buildroot}%{_includedir}/wireshark/wiretap |
223 |
install -m 0644 wiretap/*.h %{buildroot}%{_includedir}/wireshark/wiretap |
224 |
mkdir -p %{buildroot}%{_includedir}/wireshark/codecs |
225 |
install -m 0644 codecs/*.h %{buildroot}%{_includedir}/wireshark/codecs |
226 |
mkdir -p %{buildroot}%{_includedir}/wireshark/wsutil |
227 |
install -m 0644 wsutil/*.h %{buildroot}%{_includedir}/wireshark/wsutil |
228 |
|
229 |
chmod a+r %{buildroot}%{_bindir}/dumpcap |
230 |
|
231 |
# pkg-config support |
232 |
install -d %{buildroot}%{_libdir}/pkgconfig/ |
233 |
cat > %{buildroot}%{_libdir}/pkgconfig/wireshark.pc << EOF |
234 |
prefix=%{_prefix} |
235 |
exec_prefix=%{_prefix} |
236 |
libdir=%{_libdir} |
237 |
includedir=%{_includedir}/wireshark |
238 |
plugindir=%{_libdir}/wireshark |
239 |
|
240 |
Name: wireshark |
241 |
Description: wireshark network packet dissection library |
242 |
Version: %{version} |
243 |
|
244 |
Requires: |
245 |
Libs: -L\${libdir} -lwireshark |
246 |
Cflags: -I\${includedir} |
247 |
EOF |
248 |
|
249 |
%pre -n dumpcap |
250 |
if ! getent group wireshark > /dev/null ;then |
251 |
%{_sbindir}/groupadd -r -f wireshark |
252 |
fi |
253 |
|
254 |
%files -n dumpcap |
255 |
%attr(4750, root, wireshark) %{_bindir}/dumpcap |
256 |
%{_mandir}/man1/dumpcap.1* |
257 |
|
258 |
%files |
259 |
%doc README.urpmi |
260 |
%{_bindir}/%{name} |
261 |
%{_bindir}/%{name}-qt |
262 |
%dir %{_libdir}/%{name} |
263 |
%{_libdir}/%{name}/*.so |
264 |
%{_datadir}/%{name} |
265 |
%{_iconsdir}/*.png |
266 |
%{_miconsdir}/*.png |
267 |
%{_liconsdir}/*.png |
268 |
%{_iconsdir}/hicolor/*/*/*.png |
269 |
%{_iconsdir}/hicolor/*/*/*.svg |
270 |
%{_mandir}/man1/%{name}.1* |
271 |
%{_mandir}/man4/%{name}-filter.4* |
272 |
%{_datadir}/applications/*.desktop |
273 |
%{_datadir}/appdata/%{name}.appdata.xml |
274 |
%{_datadir}/mime/packages/%{name}.xml |
275 |
|
276 |
%files tools |
277 |
%{_bindir}/capinfos |
278 |
%{_bindir}/captype |
279 |
%{_bindir}/dftest |
280 |
%{_bindir}/editcap |
281 |
%{_bindir}/idl2wrs |
282 |
%{_bindir}/mergecap |
283 |
%{_bindir}/randpkt |
284 |
%{_bindir}/reordercap |
285 |
%{_bindir}/text2pcap |
286 |
%{_libdir}/%{name}/extcap/androiddump |
287 |
%{_libdir}/%{name}/extcap/randpktdump |
288 |
%{_mandir}/man1/androiddump* |
289 |
%{_mandir}/man1/capinfo* |
290 |
%{_mandir}/man1/dftest* |
291 |
%{_mandir}/man1/editcap* |
292 |
%{_mandir}/man1/mergecap* |
293 |
%{_mandir}/man1/randpkt* |
294 |
%{_mandir}/man1/reordercap* |
295 |
%{_mandir}/man1/text2pcap* |
296 |
%{_mandir}/man4/extcap* |
297 |
|
298 |
%files -n tshark |
299 |
%doc README.urpmi |
300 |
%{_bindir}/tshark |
301 |
%{_mandir}/man1/tshark* |
302 |
|
303 |
%files -n rawshark |
304 |
%{_bindir}/rawshark |
305 |
%{_mandir}/man1/rawshark.1* |
306 |
|
307 |
%files -n %{libname} |
308 |
%doc AUTHORS NEWS README{,.[lv]*} doc/{randpkt.txt,README.*} |
309 |
%{_libdir}/libwireshark.so.%{major}* |
310 |
|
311 |
%files -n %{libwiretap} |
312 |
%{_libdir}/libwiretap.so.%{wiretapmajor}* |
313 |
|
314 |
%files -n %{libwscodecs} |
315 |
%{_libdir}/libwscodecs.so.%{wscodecsmajor}* |
316 |
|
317 |
%files -n %{libwsutil} |
318 |
%{_libdir}/libwsutil.so.%{wsutilmajor}* |
319 |
|
320 |
%files -n %{libname_devel} |
321 |
%doc ChangeLog |
322 |
%{_includedir}/wireshark |
323 |
%{_libdir}/libwireshark.so |
324 |
%{_libdir}/libwiretap.so |
325 |
%{_libdir}/libwscodecs.so |
326 |
%{_libdir}/libwsutil.so |
327 |
%{_libdir}/pkgconfig/*.pc |
328 |
|