# Tests by default. No tests: rpm -ba --define 'dotests 0' *.spec %{!?dotests: %define dotests 1} Summary: The GNU versions of find utilities (find and xargs). Name: findutils Version: 4.6.0 Release: 1 License: GPL Group: Applications/File Source0: ftp://ftp.gnu.org/gnu/findutils/findutils-%{version}.tar.gz URL: http://www.gnu.org/software/findutils Prereq: /sbin/install-info Prefix: %{_prefix} Buildroot: /var/tmp/findutils-root Requires: coreutils >= 8.23 Requires: gettext >= 0.19.7 %define DEFCC cc %description The findutils package contains programs which will help you locate files on your system. The find utility searches through a hierarchy of directories looking for files which match a certain set of criteria (such as a filename pattern). The xargs utility builds and executes command lines from standard input arguments (usually lists of file names generated by the find command). You should install findutils because it includes tools that are very useful for finding things on your system. %prep %setup -q # Duplicate source for 32 & 64 bits rm -rf /tmp/%{name}-%{version}-32bit mkdir /tmp/%{name}-%{version}-32bit mv * /tmp/%{name}-%{version}-32bit mkdir 32bit mv /tmp/%{name}-%{version}-32bit/* 32bit rm -rf /tmp/%{name}-%{version}-32bit mkdir 64bit cp -rp 32bit/* 64bit/ %build # first build the 64-bit version cd 64bit export CC=/opt/freeware/bin/gcc export CFLAGS="-maix64 -D_LARGE_FILES" export LDFLAGS="-L/opt/freeware/lib64 -lpthread" export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --libexecdir=%{_libexecdir}64 \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --localstatedir=%{_localstatedir} gmake if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi # Now build the 32-bit version cd ../32bit export CC=/opt/freeware/bin/gcc export CFLAGS="-maix32 -D_LARGE_FILES" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -lpthread" export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --libexecdir=%{_libexecdir} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --localstatedir=%{_localstatedir} gmake if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT cd 64bit export AR="/usr/bin/ar -X64" export OBJECT_MODE=64 export CC=/opt/freeware/bin/gcc export CFLAGS="-maix64" export LDFLAGS="-L/opt/freeware/lib64 -lpthread" gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * do mv ${f} ${f}_64 done ) cd ../32bit export AR="/usr/bin/ar -X32" export OBJECT_MODE=32 export CC=/opt/freeware/bin/gcc export CFLAGS="-maix32 -D_LARGE_FILES" export LDFLAGS="-L/opt/freeware/lib -lpthread" make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in $(ls | grep -v -e _32 -e _64) do mv ${f} ${f}_32 ln -sf ${f}_64 ${f} done ) ( cd $RPM_BUILD_ROOT gzip -9fn .%{_infodir}/find.info* mkdir -p usr/linux/bin cd usr/linux/bin ln -sf ../../..%{_bindir}/* . cd - mkdir -p usr/bin cd usr/bin for f in locate updatedb do ln -sf ../..%{_bindir}/$f . done ) %post /sbin/install-info %{_infodir}/find.info.gz %{_infodir}/dir || : %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/find.info.gz %{_infodir}/dir || : fi %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system) %doc 32bit/AUTHORS 32bit/NEWS 32bit/README 32bit/COPYING 32bit/THANKS 32bit/TODO /usr/bin/* /usr/linux/bin/* %{_bindir}/* %{_libexecdir}/* %{_libexecdir}64/* %{_mandir}/man?/* %{_infodir}/find.info* %changelog * Thu Jan 18 2018 Ayappan P 4.6.0-1 - Updated to version 4.6.0 * Thu Jul 10 2003 David Clissold - Switch to the IBM VAC compiler for performance and size. * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Wed Feb 02 2000 Cristian Gafton - fix summary - ma pages are compressed * Wed Jan 12 2000 Preston Brown - new description. * Fri Aug 27 1999 Preston Brown - fixed block count bug (# 2141) * Mon Mar 29 1999 Preston Brown - patch to fix xargs out of bounds overflow (bug # 1279) * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 30) * Fri Mar 19 1999 Jeff Johnson - strip binaries. * Mon Feb 8 1999 Jeff Johnson - remove further updatedb remnants (#1072). * Thu Dec 03 1998 Cristian Gafton - added patch for glibc21 * Mon Nov 16 1998 Erik Troan - removed locate stuff (as we now ship slocate) * Wed Jun 10 1998 Erik Troan - updated updatedb cron script to not look for $TMPNAME.n (which was a relic anyway) - added -b parameters to all of the patches * Fri Apr 24 1998 Prospector System - translations modified for de, fr, tr * Mon Mar 09 1998 Michael K. Johnson - make updatedb.cron use mktemp correctly - make updatedb use mktemp * Sun Nov 09 1997 Michael K. Johnson - nobody should own tmpfile - ignore /net * Wed Nov 05 1997 Michael K. Johnson - made updatedb.cron do a better job of cleaning up after itself. * Tue Oct 28 1997 Donald Barnes - fixed 64 bit-ism in getline.c, patch tacked on to end of glibc one * Thu Oct 23 1997 Erik Troan - added patch for glibc 2.1 * Fri Oct 17 1997 Donnie Barnes - added BuildRoot support * Tue Oct 14 1997 Michael K. Johnson - made updatedb.cron work even if "nobody" can't read /root - use mktemp in updatedb.cron * Sun Sep 14 1997 Erik Troan - added missing info pages - uses install-info * Mon Jun 02 1997 Erik Troan - built with glibc * Mon Apr 21 1997 Michael K. Johnson - fixed updatedb.cron