libpcap/libpcap.spec
Marcus Meissner 6ef0670f31 Accepting request 222227 from home:vitezslav_cizek:branches:Base:System
- added support for netlink (bnc#863823)
  * libpcap-netlink.patch

- update to 1.5.3
  * Don't let packets that don't match the current filter get to the
    application when TPACKET_V3 is used. (GitHub issue #331)
  * Fix handling of pcap_loop()/pcap_dispatch() with a packet count
    of 0 on some platforms (including Linux with TPACKET_V3).
    (GitHub issue #333)
  * Work around TPACKET_V3 deficiency that causes packets to be lost
    when a timeout of 0 is specified. (GitHub issue #335)
  * Man page formatting fixes.
- refreshed libpcap-1.5.2-filter-fix.patch

OBS-URL: https://build.opensuse.org/request/show/222227
OBS-URL: https://build.opensuse.org/package/show/Base:System/libpcap?expand=0&rev=36
2014-02-15 10:08:40 +00:00

136 lines
3.8 KiB
RPMSpec

#
# spec file for package libpcap
#
# Copyright (c) 2014 SUSE LINUX Products 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: libpcap
Version: 1.5.3
Release: 0
Summary: A Library for Network Sniffers
License: BSD-3-Clause
Group: System/Libraries
Url: http://www.tcpdump.org/
Source: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
Source2: baselibs.conf
Source3: http://www.tcpdump.org/tcpdump-workers.asc#/%{name}.keyring
Source4: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig
Patch0: libpcap-1.5.2-filter-fix.patch
Patch1: libpcap-1.0.0-pcap-bpf.patch
Patch2: libpcap-1.0.0-ppp.patch
Patch3: libpcap-1.0.0-s390.patch
Patch4: libpcap-ocloexec.patch
Patch5: libpcap-netlink.patch
BuildRequires: automake
BuildRequires: bison
BuildRequires: bluez-devel
BuildRequires: dbus-1-devel
BuildRequires: flex
BuildRequires: libusb-devel
BuildRequires: pkg-config
%if %{?suse_version} >= 1210
BuildRequires: libnl3-devel
%endif
%if 0%{?suse_version} >= 1230
BuildRequires: gpg-offline
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
libpcap is a library used by packet sniffer programs. It provides an
interface for them to capture and analyze packets from network devices.
This package is only needed if you plan to compile or write such a
program yourself.
%package -n libpcap1
Summary: A Library for Network Sniffers
Group: System/Libraries
# bug437293
%ifarch ppc64
Obsoletes: libpcap-64bit
%endif
#
%if 0%{?suse_version} > 1100
Provides: libpcap = %{version}
Obsoletes: libpcap < %{version}
%endif
%description -n libpcap1
libpcap is a library used by packet sniffer programs. It provides an
interface for them to capture and analyze packets from network devices.
This package is only needed if you plan to compile or write such a
program yourself.
%package devel
Summary: A Library for Network Sniffers
Group: Development/Libraries/C and C++
Requires: bluez-devel
Requires: libpcap1 = %{version}
Requires: libusb-devel
%if %{?suse_version} >= 1210
Requires: libnl3-devel
%endif
%description devel
libpcap is a library used by packet sniffer programs. It provides an
interface for them to capture and analyze packets from network devices.
This package is only needed if you plan to compile or write such a
program yourself.
%prep
%{?gpg_verify: %gpg_verify %{S:4}}
%setup -q
%patch0 -p1
%patch1
%patch2
%patch3
%patch4 -p1
%patch5 -p1
%build
%ifarch %sparc
pic="PIC"
%else
pic="pic"
%endif
autoreconf -fiv
export CFLAGS="%{optflags} -f$pic" CXXFLAGS="%{optflags} -f$pic"
%configure \
--enable-ipv6
make %{?_smp_mflags} all shared
%install
mkdir -p %{buildroot}%{_bindir}
make DESTDIR=%{buildroot} install install-shared
%post -n libpcap1 -p /sbin/ldconfig
%postun -n libpcap1 -p /sbin/ldconfig
%files -n libpcap1
%defattr(-, root, root)
%doc CHANGES CREDITS LICENSE README README.linux TODO
%{_libdir}/*.so.*
%doc %{_mandir}/man7/*
%files devel
%defattr(-, root, root)
%doc %{_mandir}/man[1-6]/*
%{_includedir}/*
%{_bindir}/pcap-config
%{_libdir}/*.so
%{_libdir}/*.*a
%changelog