%define major 0 %define minor 9 %define libname %mklibname pcap %major %define libdevel %libname-devel Summary: A system-independent interface for user-level packet capture Name: libpcap Version: 0.9.8 Release: %mkrel 3 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 BuildRequires: bison BuildRequires: flex 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 %{libdevel} Summary: Static library and header files for the pcap library Group: Development/C Obsoletes: %{name}-devel < %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: pcap-devel = %{version}-%{release} Requires: %{libname} = %{version}-%{release} %description -n %libdevel 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 %build %serverbuild %configure2_5x --enable-ipv6 %make "CCOPT=$CFLAGS -fPIC" # nah, doing it the hard way instead... #%%make "CCOPT=$RPM_OPT_FLAGS -fPIC" shared # # (fg) FIXME - UGLY - HACK - but libpcap's Makefile doesn't allow to build a # shared lib... # gcc -Wl,-soname,libpcap.so.%{major} -shared -fPIC -o libpcap.so.%{major}.%{minor} *.o %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %makeinstall_std install -m755 libpcap.so.%{major}.%{minor} %{buildroot}%{_libdir} pushd %{buildroot}%{_libdir} && { ln -s libpcap.so.%{major}.%{minor} libpcap.so.0 ln -s libpcap.so.%{major}.%{minor} libpcap.so } && popd # install additional headers install -m0644 pcap-int.h %{buildroot}%{_includedir}/ %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %if %mdkversion < 200900 %post -n %{libname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{libname} -p /sbin/ldconfig %endif %files -n %{libname} %defattr(-,root,root) %doc README* CREDITS FILES INSTALL.txt LICENSE VERSION doc %{_libdir}/libpcap.so.* %files -n %{libdevel} %defattr(-,root,root) %doc CHANGES TODO %{_includedir}/* %{_libdir}/libpcap.so %{_libdir}/libpcap.a %{_mandir}/man3/pcap.3* %changelog * 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