Name: ngrep Summary: Network layer grep tool Version: 1.45 Release: 1 Group: Applications/Internet License: BSD with advertising URL: http://ngrep.sourceforge.net/ Source0: http://download.sourceforge.net/ngrep/%{name}-%{version}.tar.bz2 Patch0: %{name}-system-pcre.patch Patch1: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: autoconf >= 2.57 BuildRequires: pcre-devel >= 7.9 BuildRequires: libpcap-devel >= 0.9.8 BuildRequires: patch Requires: pcre >= 7.9 Requires: libpcap >= 0.9.8 %ifos aix5.3 Requires: AIX-rpm >= 5.3.0.0 %endif %description ngrep strives to provide most of GNU grep's common features, applying them to the network layer. ngrep is a pcap-aware tool that will allow you to specify extended regular or hexadecimal expressions to match against data payloads of packets. It currently recognizes TCP, UDP, ICMP, IGMP and Raw protocols across Ethernet, PPP, SLIP, FDDI, Token Ring, 802.11 and null interfaces, and understands bpf filter logic in the same fashion as more common packet sniffing tools, such as tcpdump and snoop. %prep %setup -q export PATH=/opt/freeware/bin:$PATH %patch0 -p1 %patch1 autoconf %build export EXTRA_INCLUDES=$(pcre-config --cflags) export EXTRA_LIBS=$(pcre-config --libs) ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ %ifos aix5.3 --enable-ipv6 \ %else --disable-ipv6 \ %endif --enable-pcre \ --with-pcap-includes=%{_includedir} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make install DESTDIR=${RPM_BUILD_ROOT} BINDIR_INSTALL=%{_sbindir} /usr/bin/strip ${RPM_BUILD_ROOT}%{_sbindir}/* || : 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 doc/CHANGES.txt doc/CREDITS.txt doc/README.txt LICENSE.txt %{_sbindir}/%{name} %{_mandir}/man8/ngrep.8* /usr/sbin/%{name} %changelog * Fri Jul 30 2010 Michael Perzl - 1.45-1 - first version for AIX V5.1 and higher