Summary: Library used for packet capture and playback. Used by tcpdump. Name: libpcap Version: 0.8.3 Release: 1 License: IBM_ILA Group: System Environment/Libraries URL: http://www.tcpdump.org Source: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz Source1: IBM_ILA #Source2 is the license text Source2: %{name}.txt Buildroot: /var/tmp/libpcap-root Prefix: %{_prefix} %define DEFCC xlc %description Libpcap is a library for packet capture and playback. It is used by several other network analysis tools such as tcpdump and ethereal. libpcap requires the installation of the bos.net.tcp.server fileset on AIX. %prep %setup -q # Add license info cat $RPM_SOURCE_DIR/IBM_ILA > LICENSE cat $RPM_SOURCE_DIR/%{name}.txt >> LICENSE %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if test "X$CC" != "Xgcc" then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` export RPM_OPT_FLAGS=" " fi export CFLAGS="$RPM_OPT_FLAGS" %configure --with-pcap=bpf%configure --with-pcap=bpf make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{prefix}/lib \ $RPM_BUILD_ROOT%{prefix}/include/net \ $RPM_BUILD_ROOT%{prefix}/man/man3 make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/linux/lib mkdir -p $RPM_BUILD_ROOT/usr/linux/include cd $RPM_BUILD_ROOT/usr/linux/lib ln -sf ../../..%{prefix}/lib/* . cd $RPM_BUILD_ROOT/usr/linux/include ln -sf ../../..%{prefix}/include/* . %ifarch ppc || %ifarch rs6000 && %ifnarch linux ( cd $RPM_BUILD_ROOT/%{prefix}/lib # Create a compatibility member to mitigate differences with Bull Freeware # offering COMPATMEMBER=shr.o for lib in *.a do echo "#!" > tmp.exp /bin/dump -g $lib | sed -n -e \ 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$/\1/p' \ >> tmp.exp libbase=`print $lib | sed -e 's/.a$//' -e 's/^lib//'` ld -L. -bI:tmp.exp -bE:tmp.exp -l$libbase -bM:SRE -bnoentry -lc -lcfg \ -lodm -o $COMPATMEMBER /usr/bin/strip -e $COMPATMEMBER # Make shr.o a load-only module /usr/bin/ar -r $lib $COMPATMEMBER rm -f $COMPATMEMBER tmp.exp done ) %endif %files %defattr(-,root,system) %doc LICENSE %{prefix}/lib/* /usr/linux/lib/* %{prefix}/man/man3/* %{prefix}/include/pcap* /usr/linux/include/pcap* %clean rm -rf $RPM_BUILD_ROOT %changelog * Thu Aug 19 2004 David Clissold 0.8.3-1 - Update to version 0.8.3 * Mon Jan 19 2004 David Clissold 0.8.1-1 - Update to version 0.8.1 * Fri Nov 22 2002 David Clissold - Add IBM ILA license. * Mon Nov 05 2001 Marc Stephenson - Squash /usr/lib link due to conflict with bos.net.tcp.server * Wed Jun 27 2001 Marc Stephenson - Ship the include files * Tue May 22 2001 Olof Johansson - Added IA64 hooks * Mon May 21 2001 Olof Johansson - First version