LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libpcap.spec of Package libpcap (Project home:Friseer:openSUSE:server)

#
# spec file for package libpcap
#
# Copyright (c) 2011 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.1.1
Release:        9
License:        BSD3c(or similar)
Summary:        A Library for Network Sniffers
Url:            http://www.tcpdump.org/
Group:          System/Libraries
Source:         %{name}-%{version}.tar.bz2
Source2:        baselibs.conf
Patch0:         libpcap-1.0.0-filter-fix.patch
Patch1:         libpcap-1.0.0-fcode.patch
Patch2:         libpcap-1.0.0-pcap-bpf.patch
Patch3:         libpcap-1.0.0-ppp.patch
Patch4:         libpcap-1.0.0-s390.patch
Patch5:         libpcap-1.0.0-man.patch
Patch6:         libpcap-1.0.0-mac_syntax.patch
Patch7:         libpcap-1.1.1-scanif.patch
Patch8:         libpcap-fix-calculation-of-frame-size.patch
BuildRequires:  bison
BuildRequires:  bluez-devel
BuildRequires:  flex
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
License:        BSD3c(or similar)
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
License:        BSD3c(or similar)
Summary:        A Library for Network Sniffers
Group:          Development/Libraries/C and C++
Requires:       libpcap1 = %{version}

%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
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8 -p1

%build
%ifarch %sparc
pic="PIC"
%else
pic="pic"
%endif
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