1 |
%define Werror_cflags %{nil} |
2 |
|
3 |
%define major 7 |
4 |
%define wiretapmajor 5 |
5 |
%define wsutilmajor 6 |
6 |
%define libname %mklibname wireshark %{major} |
7 |
%define libwiretap %mklibname wiretap %{wiretapmajor} |
8 |
%define libwsutil %mklibname wsutil %{wsutilmajor} |
9 |
%define libname_devel %mklibname -d wireshark |
10 |
|
11 |
Summary: Network traffic analyzer |
12 |
Name: wireshark |
13 |
Version: 2.0.15 |
14 |
Release: %mkrel 1 |
15 |
License: GPLv2+ and GPLv3 |
16 |
Group: Monitoring |
17 |
URL: http://www.wireshark.org |
18 |
Source0: http://www.wireshark.org/download/src/%{name}-%{version}.tar.bz2 |
19 |
Source10: README.urpmi |
20 |
Patch0: wireshark_help_browser.patch |
21 |
Patch4: wireshark-plugindir.patch |
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 %{libwsutil} |
77 |
Summary: Network packet dissection utilities library |
78 |
Group: System/Libraries |
79 |
Conflicts: %{_lib}wireshark3 < 1.10.1 |
80 |
|
81 |
%description -n %{libwsutil} |
82 |
The libwsutil library provides utility functions for wireshark. |
83 |
|
84 |
%package -n %{libname_devel} |
85 |
Summary: Development files for %{name} |
86 |
Group: Development/Other |
87 |
Provides: lib%{name}-devel = %{version}-%{release} |
88 |
Provides: wireshark-devel = %{version}-%{release} |
89 |
Requires: %{libname} = %{version}-%{release} |
90 |
Requires: %{libwiretap} = %{version}-%{release} |
91 |
Requires: %{libwsutil} = %{version}-%{release} |
92 |
|
93 |
%description -n %{libname_devel} |
94 |
This package contains files used for development with %{name}. |
95 |
|
96 |
%package tools |
97 |
Summary: Tools for manipulating capture files |
98 |
Group: Monitoring |
99 |
|
100 |
%description tools |
101 |
Set of tools for manipulating capture files. Contains: |
102 |
|
103 |
- editcap - Edit and/or translate the format of capture files |
104 |
- mergecap - Merges two capture files into one |
105 |
- text2cap - Generate a capture file from an ASCII hexdump of packets |
106 |
|
107 |
%package -n tshark |
108 |
Summary: Text-mode network traffic and protocol analyzer |
109 |
Group: Monitoring |
110 |
Requires: dumpcap |
111 |
|
112 |
%description -n tshark |
113 |
Tshark is a network protocol analyzer. It lets you capture packet data from a |
114 |
live network, or read packets from a previously saved capture file, either |
115 |
printing a decoded form of those packets to the standard output or writing the |
116 |
packets to a file. Twireshark's native capture file format is libpcap format, |
117 |
which is also the format used by tcpdump and various other tools. |
118 |
|
119 |
%package -n rawshark |
120 |
Summary: Dump and analyze raw libpcap data |
121 |
Group: Monitoring |
122 |
|
123 |
%description -n rawshark |
124 |
Rawshark reads a stream of packets from a file or pipe, and prints a line |
125 |
describing its output, followed by a set of matching fields for each packet on |
126 |
stdout. |
127 |
|
128 |
%package -n dumpcap |
129 |
Summary: Network traffic dump tool |
130 |
Group: Monitoring |
131 |
|
132 |
%description -n dumpcap |
133 |
Dumpcap is a network traffic dump tool. It lets you capture packet data from a |
134 |
live network and write the packets to a file. Many wireshark utilities require it. |
135 |
|
136 |
%prep |
137 |
%setup -q |
138 |
%patch0 -p0 |
139 |
%patch4 -p0 -b .plugindir |
140 |
%patch5 -p1 |
141 |
|
142 |
# README.urpmi |
143 |
install -Dm644 %{SOURCE10} . |
144 |
|
145 |
%build |
146 |
./autogen.sh |
147 |
export PATH=$PATH:%{_qt5_bindir} |
148 |
export CFLAGS="%{optflags} -fPIC" |
149 |
export CXXFLAGS="%{optflags} -fPIC" |
150 |
%configure2_5x \ |
151 |
--disable-static \ |
152 |
--disable-warnings-as-errors \ |
153 |
--enable-warnings-as-errors=no \ |
154 |
--disable-usr-local \ |
155 |
--enable-wireshark \ |
156 |
--enable-packet-editor \ |
157 |
--enable-tshark \ |
158 |
--enable-editcap \ |
159 |
--enable-capinfos \ |
160 |
--enable-mergecap \ |
161 |
--enable-text2pcap \ |
162 |
--enable-dftest \ |
163 |
--enable-randpkt \ |
164 |
--enable-airpcap \ |
165 |
--enable-dumpcap \ |
166 |
--enable-rawshark \ |
167 |
--enable-ipv6 \ |
168 |
--enable-setuid-install \ |
169 |
--with-gnutls=yes \ |
170 |
--with-gcrypt=yes \ |
171 |
--with-geoip=yes \ |
172 |
--with-krb5 \ |
173 |
--with-adns=no \ |
174 |
--with-gtk3=no \ |
175 |
--with-qt=yes \ |
176 |
--with-libnl=3 \ |
177 |
--with-libsmi=%{_prefix} \ |
178 |
--with-pcap=%{_prefix} \ |
179 |
--with-zlib=%{_prefix} \ |
180 |
--with-lua=%{_prefix} \ |
181 |
--with-portaudio=%{_prefix} \ |
182 |
--with-libcap=%{_prefix} \ |
183 |
--with-ssl=%{_prefix} \ |
184 |
--with-plugins=%{_libdir}/%{name} |
185 |
|
186 |
%make |
187 |
|
188 |
%install |
189 |
%makeinstall_std |
190 |
|
191 |
# link to main executable |
192 |
mv %{buildroot}%{_bindir}/wireshark %{buildroot}%{_bindir}/wireshark-qt |
193 |
ln -s wireshark-qt %{buildroot}%{_bindir}/wireshark |
194 |
|
195 |
# icons |
196 |
install -Dpm0644 image/wsicon16.png %{buildroot}%{_miconsdir}/%{name}.png |
197 |
install -Dpm0644 image/wsicon32.png %{buildroot}%{_iconsdir}/%{name}.png |
198 |
install -Dpm0644 image/wsicon48.png %{buildroot}%{_liconsdir}/%{name}.png |
199 |
|
200 |
# XDG menu |
201 |
install -d %{buildroot}%{_datadir}/applications/ |
202 |
install -m 644 %{name}.desktop %{buildroot}%{_datadir}/applications/ |
203 |
|
204 |
# remove uneeded files |
205 |
find %{buildroot} -name "*.la" -delete |
206 |
|
207 |
# install includes |
208 |
mkdir -p %{buildroot}%{_includedir}/wireshark |
209 |
for include in `find epan -type f -name '*.h'`; do |
210 |
mkdir -p %{buildroot}%{_includedir}/wireshark/`dirname $include` |
211 |
install -m 0644 $include %{buildroot}%{_includedir}/wireshark/`dirname $include` |
212 |
done |
213 |
|
214 |
# remaining include files |
215 |
install -m 0644 *.h %{buildroot}%{_includedir}/wireshark |
216 |
mkdir -p %{buildroot}%{_includedir}/wireshark/wiretap |
217 |
install -m 0644 wiretap/*.h %{buildroot}%{_includedir}/wireshark/wiretap |
218 |
mkdir -p %{buildroot}%{_includedir}/wireshark/wsutil |
219 |
install -m 0644 wsutil/*.h %{buildroot}%{_includedir}/wireshark/wsutil |
220 |
|
221 |
chmod a+r %{buildroot}%{_bindir}/dumpcap |
222 |
|
223 |
%pre -n dumpcap |
224 |
if ! getent group wireshark > /dev/null ;then |
225 |
%{_sbindir}/groupadd -r -f wireshark |
226 |
fi |
227 |
|
228 |
%files -n dumpcap |
229 |
%attr(4750, root, wireshark) %{_bindir}/dumpcap |
230 |
%{_mandir}/man1/dumpcap.1* |
231 |
|
232 |
%files |
233 |
%doc README.urpmi |
234 |
%{_bindir}/%{name} |
235 |
%{_bindir}/%{name}-qt |
236 |
%dir %{_libdir}/%{name} |
237 |
%{_libdir}/%{name}/*.so |
238 |
%{_datadir}/%{name} |
239 |
%{_iconsdir}/*.png |
240 |
%{_miconsdir}/*.png |
241 |
%{_liconsdir}/*.png |
242 |
%{_iconsdir}/hicolor/*/*/*.png |
243 |
%{_iconsdir}/hicolor/*/*/*.svg |
244 |
%{_mandir}/man1/%{name}.1* |
245 |
%{_mandir}/man4/%{name}-filter.4* |
246 |
%{_datadir}/applications/*.desktop |
247 |
%{_datadir}/appdata/%{name}.appdata.xml |
248 |
%{_datadir}/mime/packages/%{name}.xml |
249 |
|
250 |
%files tools |
251 |
%{_bindir}/androiddump |
252 |
%{_bindir}/capinfos |
253 |
%{_bindir}/captype |
254 |
%{_bindir}/dftest |
255 |
%{_bindir}/editcap |
256 |
%{_bindir}/idl2wrs |
257 |
%{_bindir}/mergecap |
258 |
%{_bindir}/randpkt |
259 |
%{_bindir}/reordercap |
260 |
%{_bindir}/text2pcap |
261 |
%{_mandir}/man1/androiddump* |
262 |
%{_mandir}/man1/capinfo* |
263 |
%{_mandir}/man1/dftest* |
264 |
%{_mandir}/man1/editcap* |
265 |
%{_mandir}/man1/mergecap* |
266 |
%{_mandir}/man1/randpkt* |
267 |
%{_mandir}/man1/reordercap* |
268 |
%{_mandir}/man1/text2pcap* |
269 |
|
270 |
%files -n tshark |
271 |
%doc README.urpmi |
272 |
%{_bindir}/tshark |
273 |
%{_mandir}/man1/tshark* |
274 |
|
275 |
%files -n rawshark |
276 |
%{_bindir}/rawshark |
277 |
%{_mandir}/man1/rawshark.1* |
278 |
|
279 |
%files -n %{libname} |
280 |
%doc AUTHORS NEWS README{,.[lv]*} doc/{randpkt.txt,README.*} |
281 |
%{_libdir}/libwireshark.so.%{major}* |
282 |
|
283 |
%files -n %{libwiretap} |
284 |
%{_libdir}/libwiretap.so.%{wiretapmajor}* |
285 |
|
286 |
%files -n %{libwsutil} |
287 |
%{_libdir}/libwsutil.so.%{wsutilmajor}* |
288 |
|
289 |
%files -n %{libname_devel} |
290 |
%doc ChangeLog |
291 |
%{_includedir}/wireshark |
292 |
%{_libdir}/libwireshark.so |
293 |
%{_libdir}/libwiretap.so |
294 |
%{_libdir}/libwsutil.so |