Summary: A network traffic monitoring tool Name: tcpslice Version: 1.2a3 Release: 1 License: BSD URL: http://www.tcpdump.org/related.html Group: Applications/Internet Source0: ftp://ftp.ee.lbl.gov/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-time.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: libpcap-devel >= 0.9.8 BuildRequires: patch, automake, autoconf, m4, gcc >= 4.2.3-2, sed Requires: libpcap >= 0.9.8, libgcc >= 4.2.3-2 %description Tcpslice is a tool for extracting portions of packet trace files generated using tcpdump's -w flag. Tcpslice uses libpcap, a system-independent interface for user-level packet capture. %prep %setup -q export PATH=/opt/freeware/bin:$PATH %patch0 -p1 -b .time find . -name '*.c' -o -name '*.h' | xargs chmod 644 %build # setup GNU GCC build environment export CC="gcc" export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" export CXX=g++ export CXXFLAGS=$CFLAGS export LD=ld export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" # update config.{guess,sub} automake -a -c -f 2> /dev/null || : ./configure \ --prefix=%{_prefix} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} cp %{name} ${RPM_BUILD_ROOT}%{_sbindir} chmod 0755 ${RPM_BUILD_ROOT}%{_sbindir}/%{name} /usr/bin/strip ${RPM_BUILD_ROOT}%{_sbindir}/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 cp %{name}.1 ${RPM_BUILD_ROOT}%{_mandir}/man8/%{name}.8 chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man8/%{name}.8 # fix section numbers /opt/freeware/bin/sed -i 's/\(\.TH[a-zA-Z ]*\)[1-9]\(.*\)/\18\2/' \ ${RPM_BUILD_ROOT}%{_mandir}/man8/* cd ${RPM_BUILD_ROOT} mkdir -p usr/sbin cd usr/sbin ln -sf ../..%{_sbindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc README CHANGES %{_sbindir}/* %{_mandir}/man8/* /usr/sbin/* %changelog * Wed Apr 14 2010 Michael Perzl - 1.2a3-1 - first version for AIX V5.1 and higher