File tcpdump.spec of Package tcpdump.510
#
# spec file for package tcpdump
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: tcpdump
Version: 4.5.1
Release: 0
Url: http://www.tcpdump.org/
Summary: A Packet Sniffer
License: BSD-3-Clause
Group: Productivity/Networking/Diagnostic
Source: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
Source1: tcpdump-qeth
Source2: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig
Source3: http://www.tcpdump.org/tcpdump-workers.asc#/%{name}.keyring
Patch0: tcpdump-4.0.0-prototypes.patch
Patch2: tcpdump-4.0.0-aliasing.patch
Patch3: tcpdump-CVE-2014-8767.patch
Patch4: tcpdump-CVE-2014-8768.patch
Patch5: tcpdump-CVE-2014-8769.patch
Patch6: 0001-Clean-up-error-message-printing.patch
Patch7: tcpdump-CVE-2014-9140.patch
Patch9: 0002-test-case-files-for-CVE-2015-2153-2154-2155.patch
Patch10: 0003-test-case-for-cve2015-0261-corrupted-IPv6-mobility-h.patch
BuildRequires: libpcap-devel
BuildRequires: libsmi-devel
BuildRequires: openssl-devel
%if 0%{?suse_version} >= 1230
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This program can "read" all or only certain packets going over the
ethernet. It can be used to debug specific network problems.
%prep
%setup -q
%patch0
%patch2
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch9 -p1
%patch10 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS -Wall -DGUESS_TSO -fstack-protector -fno-strict-aliasing"
%configure \
--enable-ipv6
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
%ifarch s390 s390x
install -D -m 755 $RPM_SOURCE_DIR/tcpdump-qeth $RPM_BUILD_ROOT%{_sbindir}
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc CHANGES CREDITS LICENSE README* *.awk
%doc %{_mandir}/man?/*
%{_sbindir}/*
%changelog