Name: libpcap Version: 0.9.8 Release: 2 Summary: A system-independent interface for user-level packet capture Group: Development/Libraries License: BSD URL: http://www.tcpdump.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Source0: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-aix.patch %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. Install libpcap if you need to do low-level network traffic monitoring on your network. The library is available as 32-bit and 64-bit. %package devel Summary: Libraries and header files for the libpcap library Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel 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 provides the libraries, include files, and other resources needed for developing libpcap applications. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep %setup -q %patch -p0 %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" # first build the 64-bit version export CC="cc -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_prefix}/man \ --with-pcap=bpf make %{?_smp_mflags} CreateExportList -X64 libpcap.exp libpcap.a ${CC} -qmkshrobj libpcap.a -o libpcap.so.0.9.8 -bE:libpcap.exp -lodm -lcfg rm -f libpcap.exp libpcap.a ${AR} -rv tmp_libpcap.a libpcap.so.0.9.8 make distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_prefix}/man \ --with-pcap=bpf make %{?_smp_mflags} CreateExportList -X32 libpcap.exp libpcap.a ${CC} -qmkshrobj libpcap.a -o libpcap.so.0.9.8 -bE:libpcap.exp -lodm -lcfg rm -f libpcap.exp libpcap.a ${AR} -q tmp_libpcap.a libpcap.so.0.9.8 mv -f tmp_libpcap.a libpcap.a %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system) %doc LICENSE README CHANGES CREDITS doc/pcap.txt %{_libdir}/libpcap.a %files devel %defattr(-,root,system) %{_includedir}/pcap*.h %{_mandir}/man3/pcap.3* %changelog * Thu Jan 03 2008 Michael Perzl - 0.9.8-2 - included both 32-bit and 64-bit shared objects * Tue Oct 16 2007 Michael Perzl - 0.9.8-1 - first version for AIX V5.1 and higher