# Tests by default. No tests: rpm -ba --define 'dotests 0' *.spec %{!?dotests: %define dotests 1} Summary: A GNU collection of diff utilities. Name: diffutils Version: 3.7 Release: 1 Group: Applications/Text URL: http://www.gnu.org/software/diffutils Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz License: GPL Prefix: %{_prefix} Requires: gettext >= 0.19.8.1 Requires: libiconv >= 1.14 %description Diffutils includes four utilities: diff, cmp, diff3 and sdiff. Diff compares two files and shows the differences, line by line. The cmp command shows the offset and line numbers where two files differ, or cmp can show the characters that differ between the two files. The diff3 command shows the differences between three files. Diff3 can be used when two people have made independent changes to a common original; diff3 can produce a merged file that contains both sets of changes and warnings about conflicts. The sdiff command can be used to merge two files interactively. Install diffutils if you need to compare text files. %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="gcc -maix64" export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib" CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} make PR_PROGRAM=%{_prefix}/bin/pr if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi #Now build the 32-bit version cd ../32bit export CC="gcc -maix32 -D_LARGE_FILES" export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib" CFLAGS="$RPM_OPT_FLAGS -D_LARGE_FILES" ./configure --prefix=%{_prefix} make PR_PROGRAM=%{_prefix}/bin/pr if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_prefix} cd 64bit export AR="/usr/bin/ar -X64" export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_64 done ) cd ../32bit export AR="/usr/bin/ar -X32" export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_32 ln -sf "$fic"_64 $fic done ) ( cd $RPM_BUILD_ROOT gzip -9nf .%{_prefix}/share/info/diff* /usr/bin/strip .%{_prefix}/bin/* || : mkdir -p usr/linux/bin cd usr/linux/bin ln -sf ../../..%{prefix}/bin/* . ) %post /sbin/install-info %{_prefix}/share/info/diffutils.info.gz %{_prefix}/share/info/dir --entry="* diff: (diff). The GNU diff." %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_prefix}/share/info/diffutils.info.gz %{_prefix}/share/info/dir --entry="* diff: (diff). The GNU diff." fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system) %doc 32bit/NEWS 32bit/README 32bit/COPYING %{_prefix}/bin/* %{_prefix}/share/info/diffutils.info*gz #/usr/linux/bin/* %changelog * Fri Jul 17 2020 Rishita Saha 3.7-1 - Updated to version 3.7 * Tue Dec 03 2019 Ayappan P 3.6-2 - Set proper library search path * Mon Sep 25 2017 Sushma M Bhat 3.6-1 - Built 64bit and updated to 3.6 version * Mon Jan 18 2016 Tony Reix 3.3-1 - Initial port on AIX 6.1 * Tue Jan 31 2012 Gerard Visiedo 3.0-4 - Initial port on aix6.1 * Thu Sep 22 2011 Patricia Cugny 3.0-3 - rebuild for compatibility with new libiconv.a 1.13.1-2 * Wed Jun 8 2011 Gerard Visiedo 3.0-2 - Compile on toolbox3 * Wed May 26 2010 Jean Noel Cordenner 3.0 - Update to version 3.0 * Wed Jun 11 2003 David Clissold - Update to version 2.8.1. * Wed Mar 26 2003 David Clissold - Build with IBM VAC compiler. * Tue Apr 03 2001 David Clissold - Build with -D_LARGE_FILES enabled (for >2BG files) * Mon Dec 11 2000 pkgmgr - Set default ownership of files. * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Thu Feb 03 2000 Preston Brown - rebuild to gzip man pages. * Mon Apr 19 1999 Jeff Johnson - man pages not in %files. - but avoid conflict for diff.1 * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 14) * Sun Mar 14 1999 Jeff Johnson - add man pages (#831). - add %configure and Prefix. * Thu Dec 17 1998 Cristian Gafton - build for glibc 2.1 * Tue Jul 14 1998 Bill Kawakami - included the four man pages stolen from Slackware * Tue May 05 1998 Prospector System - translations modified for de, fr, tr * Sun May 03 1998 Cristian Gafton - fixed spec file to reference/use the $RPM_BUILD_ROOT always * Wed Dec 31 1997 Otto Hammersmith - fixed where it looks for 'pr' (/usr/bin, rather than /bin) * Fri Oct 17 1997 Donnie Barnes - added BuildRoot * Sun Sep 14 1997 Erik Troan - uses install-info * Mon Jun 02 1997 Erik Troan - built against glibc