Name: ngrep Summary: Network layer grep tool Version: 1.46.1 Release: 1 Group: Applications/Internet License: BSD with advertising URL: https://github.com/jpr5/ngrep Source0: https://github.com/jpr5/ngrep/archive/%{name}-1_46_1.tar.gz Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: libpcap-devel >= 1.8.1-3 BuildRequires: pcre-devel >= 8.43-1 BuildRequires: make Requires: libpcap >= 1.8.1-3 Requires: pcre >= 8.43-1 %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 -n %{name}-1_46_1 %patch0 %build export CC=xlc_r ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ %ifos aix5.3 --enable-ipv6 \ %else --disable-ipv6 \ %endif --enable-pcre \ --with-pcap-includes=%{_includedir} gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake 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 * Mon Jun 03 2019 Michael Perzl - 1.46.1-1 - updated to version 1.46.1 * Mon Jun 03 2019 Michael Perzl - 1.46-1 - updated to version 1.46 * Fri Jul 30 2010 Michael Perzl - 1.45-1 - first version for AIX V5.1 and higher