%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif Summary: The GNU versions of grep pattern matching utilities Name: grep Version: 2.25 %if %{p7build} Release: 1.p7 %else Release: 1 %endif License: GPL Group: Applications/Text # the AIX V3 rpm does not understand ".xz" files, thus converted to bz2 Source0: ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.bz2 Source1: ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.xz.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 >= 8.38-2 BuildRequires: libiconv >= 1.14-3 Requires: /sbin/install-info Requires: gettext, info, pcre >= 8.38-2 Requires: libiconv >= 1.14-3 %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %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 export CC="xlc_r" ./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 ) %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 %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %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 * Fri Apr 22 2016 Michael Perzl - 2.25-1 - updated to version 2.25 * Fri Mar 11 2016 Michael Perzl - 2.24-1 - updated to version 2.24 * Sat Feb 06 2016 Michael Perzl - 2.23-1 - updated to version 2.23 * Mon Nov 02 2015 Michael Perzl - 2.22-1 - updated to version 2.22 * Mon Nov 24 2014 Michael Perzl - 2.21-1 - updated to version 2.21 * Wed Jun 04 2014 Michael Perzl - 2.20-1 - updated to version 2.20 * Fri May 23 2014 Michael Perzl - 2.19-1 - updated to version 2.19 * Sun Feb 23 2014 Michael Perzl - 2.18-1 - updated to version 2.18 * Tue Feb 18 2014 Michael Perzl - 2.17-1 - updated to version 2.17 * Thu Jan 02 2014 Michael Perzl - 2.16-1 - updated to version 2.16 * Sun Oct 27 2013 Michael Perzl - 2.15-1 - updated to version 2.15 * Tue Aug 21 2012 Michael Perzl - 2.14-1 - updated to version 2.14 * Wed Jul 04 2012 Michael Perzl - 2.13-1 - updated to version 2.13 * Tue Apr 24 2012 Michael Perzl - 2.12-1 - updated to version 2.12 * Mon Mar 05 2012 Michael Perzl - 2.11-1 - updated to version 2.11 * Wed Nov 16 2011 Michael Perzl - 2.10-1 - updated to version 2.10 * Tue Jun 21 2011 Michael Perzl - 2.9-1 - updated to version 2.9 * Sat May 14 2011 Michael Perzl - 2.8-1 - updated to version 2.8 * 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