Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > de8bd345fe62a50235d08e169e6bec19 > files > 6

libpcap-1.0.0-7mdv2010.0.src.rpm

%define major 1
%define libname %mklibname pcap %major
%define develname %mklibname pcap -d

Summary:        A system-independent interface for user-level packet capture
Name:		libpcap
Version:	1.0.0
Release:	%mkrel 7
License:	BSD
Group:		System/Libraries
URL:		http://www.tcpdump.org/
Source0:	http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
Source1:	http://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig
Patch0:		libpcap-1.0.0-LDFLAGS.diff
# (misc) fix the -i any, 
# http://sourceforge.net/tracker/?func=detail&aid=2593897&group_id=53067&atid=469577
# commit 8fa17a5a554aaeb85d3ec4118b45a31f1efd6808 from upstream
Patch1:     libpcap-1.0.0-fix_handling_of_any.diff
# (misc) use usbmon to sniff on usb bus, and allow to use tcpdump -i usb0
# patch from debian, applied upstream ( 3866e831 )
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520259
Patch2:     libpcap-1.0.0-fix_usb_network_sniffing.diff
BuildRequires:	bison
BuildRequires:	flex
BuildRequires:	bluez-devel
BuildRequires:	autoconf2.5
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
Libpcap provides a portable framework for low-level network monitoring. Libpcap
can provide network statistics collection, security monitoring and network
debugging.  Since almost every system vendor provides a different interface for
packet capture, the libpcap authors created this system-independent API to ease
in porting and to alleviate the need for several system-dependent packet
capture modules in each application.

%package -n	%{libname}
Summary:	A system-independent interface for user-level packet capture
Group:          System/Libraries
Obsoletes:      %{name} < %{version}-%{release}
Provides:	%{name} = %{version}-%{release}
Provides:       pcap = %{version}-%{release}

%description -n	%{libname}
Libpcap provides a portable framework for low-level network monitoring. Libpcap
can provide network statistics collection, security monitoring and network
debugging.  Since almost every system vendor provides a different interface for
packet capture, the libpcap authors created this system-independent API to ease
in porting and to alleviate the need for several system-dependent packet
capture modules in each application.

%package -n	%{develname}
Summary:	Static library and header files for the pcap library
Group:		Development/C
Requires:	%{libname} = %{version}-%{release}
Provides:	pcap-devel = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Obsoletes:	%{mklibname pcap -d 0}

%description -n	%{develname}
Libpcap provides a portable framework for low-level network monitoring. Libpcap
can provide network statistics collection, security monitoring and network
debugging.  Since almost every system vendor provides a different interface for
packet capture, the libpcap authors created this system-independent API to ease
in porting and to alleviate the need for several system-dependent packet
capture modules in each application.

This package contains the static pcap library and its header files needed to
compile applications such as tcpdump, etc.

%prep

%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -p0

%build
%serverbuild

%configure2_5x \
    --enable-ipv6

%make "CCOPT=$CFLAGS -fPIC" all
%make "CCOPT=$CFLAGS -fPIC" shared

%install
rm -rf %{buildroot}

install -d %{buildroot}%{_bindir}

make DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} install-shared

ln -snf libpcap.so.%{major} %{buildroot}%{_libdir}/libpcap.so

# install additional headers
install -m0644 pcap-int.h %{buildroot}%{_includedir}/
install -m0644 pcap/bluetooth.h %{buildroot}%{_includedir}/pcap/

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%clean
rm -rf %{buildroot}

%files -n %{libname}
%defattr(-,root,root)
%doc README* CREDITS INSTALL.txt LICENSE
%{_libdir}/libpcap.so.%{major}*

%files -n %{develname}
%defattr(-,root,root)
%doc CHANGES TODO
%{_bindir}/pcap-config
%dir %{_includedir}/pcap
%{_includedir}/pcap/*.h
%{_includedir}/*.h
%{_libdir}/libpcap.so
%{_libdir}/libpcap.a
%{_mandir}/man?/*


%changelog
* Wed Sep 02 2009 Christophe Fergeau <cfergeau@mandriva.com> 1.0.0-7mdv2010.0
+ Revision: 425689
- rebuild

* Wed Apr 15 2009 Michael Scherer <misc@mandriva.org> 1.0.0-6mdv2009.1
+ Revision: 367359
- add patch from upstream to be able to dump on usb0 ( ethernet over usb )
  instead of sniffing on usb bus with usbmon.

* Mon Apr 06 2009 Michael Scherer <misc@mandriva.org> 1.0.0-5mdv2009.1
+ Revision: 364476
- add patch 1, from upstream, to fix the handling of -i any on linux

* Thu Dec 18 2008 Oden Eriksson <oeriksson@mandriva.com> 1.0.0-4mdv2009.1
+ Revision: 315592
- bump release
- make it use LDFLAGS (P0)

* Wed Oct 29 2008 Oden Eriksson <oeriksson@mandriva.com> 1.0.0-3mdv2009.1
+ Revision: 298207
- also provide the pcap/bluetooth.h header (duh!)
- enable bluetooth support

* Wed Oct 29 2008 Oden Eriksson <oeriksson@mandriva.com> 1.0.0-1mdv2009.1
+ Revision: 298169
- 1.0.0
- fix devel package naming
- misc spec file fixes

* Wed Aug 06 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.9.8-3mdv2009.0
+ Revision: 264864
- rebuild early 2009.0 package (before pixel changes)

* Thu Jun 12 2008 Oden Eriksson <oeriksson@mandriva.com> 0.9.8-2mdv2009.0
+ Revision: 218474
- rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Thu Oct 25 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.8-1mdv2008.1
+ Revision: 102099
- 0.9.8

* Wed Sep 05 2007 David Walluck <walluck@mandriva.org> 0.9.7-2mdv2008.0
+ Revision: 79646
- bump release
- provide pcap = %%{version}-%%{release}
- provide pcap-devel = %%{version}-%%{release}

* Wed Jul 25 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.7-1mdv2008.0
+ Revision: 55564
- 0.9.7

* Wed Jul 25 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.5-4mdv2008.0
+ Revision: 55558
- use the new %%serverbuild macro

* Wed Jun 27 2007 Andreas Hasenack <andreas@mandriva.com> 0.9.5-3mdv2008.0
+ Revision: 45068
- stack-protector is default now, no need to specify it manually

* Fri Jun 22 2007 Andreas Hasenack <andreas@mandriva.com> 0.9.5-2mdv2008.0
+ Revision: 43309
- using -fstack-protector


* Wed Nov 22 2006 Oden Eriksson <oeriksson@mandriva.com> 0.9.5-1mdv2007.0
+ Revision: 86095
- Import libpcap

* Wed Nov 22 2006 Oden Eriksson <oeriksson@mandriva.com> 0.9.5-1mdv2007.1
- 0.9.5

* Sun Jan 01 2006 Mandriva Linux Team <http://www.mandrivaexpert.com/> 0.9.1-2mdk
- Rebuild

* Thu Jul 14 2005 Oden Eriksson <oeriksson@mandriva.com> 0.9.1-1mdk
- 0.9.1
- bump minor to 9
- install additional headers

* Sun Dec 26 2004 Abel Cheung <deaddog@mandrake.org> 0.8.3-3mdk
- Adds signature
- Various spec fixes and cleanup

* Sun Apr 18 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 0.8.3-2mdk
- fix buildrequires
- drop redundant provides
- drop patch that wasn't applied

* Fri Apr 16 2004 Michael Scherer <mscherer@mandrakesoft.com> 0.8.3-1mdk
- New release 0.8.3
- remove patch #1
- force autoconf2.5

* Tue Jan 27 2004 Warly <warly@mandrakesoft.com> 0.8.1-1mdk
- new version