Summary: The GNU versions of grep pattern matching utilities Name: grep Version: 2.7 Release: 1 License: GPL Group: Applications/Text Source0: ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source1: ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz.sig Patch0: %{name}-%{version}-aix-memory.patch URL: http://www.gnu.org/software/grep/ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gettext, info, pcre-devel >= 7.9 Requires: /sbin/install-info Requires: gettext, info, pcre >= 7.9 %description The GNU versions of commonly used grep utilities. Grep searches through textual input for lines which contain a match to a specified pattern and then prints the matching lines. GNU's grep utilities include grep, egrep and fgrep. You should install grep on your system, because it is a very useful utility for searching through text. %prep %setup -q %patch0 %build ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-largefile \ --with-libintl-prefix=%{_prefix} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : gzip --best ${RPM_BUILD_ROOT}%{_infodir}/%{name}* rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir # Use symlinks for egrep and fgrep ln -sf grep ${RPM_BUILD_ROOT}%{_bindir}/egrep ln -sf grep ${RPM_BUILD_ROOT}%{_bindir}/fgrep ( cd ${RPM_BUILD_ROOT} for dir in bin do mkdir -p usr/linux/${dir} cd usr/linux/${dir} ln -sf ../../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %post /sbin/install-info %{_infodir}/grep.info.gz %{_infodir}/dir || : %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/grep.info.gz %{_infodir}/dir || : fi %files %defattr(-,root,system) %doc ABOUT-NLS AUTHORS THANKS TODO NEWS README ChangeLog COPYING %{_bindir}/* %{_infodir}/*.info*.gz %{_mandir}/man1/* %{_datadir}/locale/*/*/* /usr/linux/bin/* %changelog * Thu Sep 30 2010 Michael Perzl - 2.7-1 - updated to version 2.7 * Fri Jul 02 2010 Michael Perzl - 2.6.3-2 - removed dependency on gettext >= 0.17 - fixed memory exhausted error * Fri May 28 2010 Michael Perzl - 2.6.3-1 - updated to version 2.6.3 * Thu Feb 12 2009 Michael Perzl - 2.5.4-1 - updated to version 2.5.4 * Wed Mar 26 2008 Michael Perzl - 2.5.3-1 - first version for AIX V5.1 and higher