%define realname coreutils Summary: The GNU core utilities: a set of tools commonly used in shell scripts Name: coreutils-64bit Version: 7.6 Release: 1 License: GPL Group: System Environment/Base URL: http://www.gnu.org/software/coreutils/ Source0: ftp://ftp.gnu.org/gnu/%{name}/%{realname}-%{version}.tar.gz Source1: ftp://ftp.gnu.org/gnu/%{name}/%{realname}-%{version}.tar.gz.sig Source2: %{realname}-DIR_COLORS Source3: %{realname}-DIR_COLORS.xterm Source4: %{realname}-colorls.sh Source5: %{realname}-colorls.csh Patch0: %{realname}-%{version}-aix-uname.patch Patch1: %{realname}-%{version}-aix-64bit.patch Patch2: %{realname}-%{version}-aix-mkstemp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gettext-devel >= 0.17 BuildRequires: make Requires: /sbin/install-info Requires: info, gettext >= 0.17 Conflicts: mktemp, %{realname} Provides: %{realname} Provides: fileutils = %{version}-%{release} Provides: sh-utils = %{version}-%{release} Provides: stat = %{version}-%{release} Provides: textutils = %{version}-%{release} Obsoletes: fileutils <= 4.1.9 Obsoletes: sh-utils <= 2.0.12 Obsoletes: stat <= 3.3 Obsoletes: textutils <= 2.0.21 %description These are the GNU core utilities. This package is the combination of the old GNU fileutils, sh-utils, and textutils packages. These tools are the GNU versions of common useful and popular file and text utilities which are used for: - file management - shell scripts - modifying text file (spliting, joining, comparing, modifying, ...) Most of these programs have significant advantages over their Unix counterparts, such as greater speed, additional options, and fewer arbitrary limits. %prep %setup -q -n %{realname}-%{version} %patch0 %patch1 %patch2 %build # setup environment for 64-bit build export AR="ar -X64" export OBJECT_MODE=64 export CC="xlc" export CFLAGS="-qmaxmem=16384 -qlanglvl=extended -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-largefile \ --enable-nls gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake DESTDIR=${RPM_BUILD_ROOT} install bzip2 -9f ChangeLog # install su and make sure we have the right permissions cp src/su ${RPM_BUILD_ROOT}%{_bindir}/su chmod 4755 ${RPM_BUILD_ROOT}%{_bindir}/su ( cd ${RPM_BUILD_ROOT} /usr/bin/strip .%{_bindir}/* || : gzip --best .%{_infodir}/*info* mkdir -p usr/linux/bin mkdir -p usr/bin cd usr/linux/bin ln -sf ../../..%{_bindir}/* . cd ../../bin for i in dir dircolors vdir tac md5sum pinky seq do rm ../linux/bin/$i ln -sf ../..%{_bindir}/$i . done ) mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d cp %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/DIR_COLORS cp %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysconfdir}/DIR_COLORS.xterm cp %{SOURCE4} ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d/colorls.sh cp %{SOURCE5} ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d/colorls.csh chmod 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/DIR* chmod 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d/* %pre # We must deinstall these info files since they're merged in # coreutils.info. else their postun'll be run too late # and install-info will fail badly because of duplicates for file in sh-utils textutils fileutils; do /sbin/install-info --delete %{_infodir}/$file.info.gz --dir=%{_infodir}/dir &> /dev/null || : done %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/%{realname}.info.gz %{_infodir}/dir || : fi %post /usr/bin/grep -v '(sh-utils)\|(fileutils)\|(textutils)' %{_infodir}/dir > \ %{_infodir}/dir.rpmmodify || exit 0 /bin/mv -f %{_infodir}/dir.rpmmodify %{_infodir}/dir /sbin/install-info %{_infodir}/%{realname}.info.gz %{_infodir}/dir || : %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc COPYING ABOUT-NLS ChangeLog.bz2 NEWS README THANKS TODO old/* %config(noreplace) %{_sysconfdir}/DIR_COLORS* %{_sysconfdir}/profile.d/* %{_bindir}/* %{_infodir}/coreutils* # exclude %{_libdir}/charset.alias as it conflicts with glib2 # %{_libdir}/* %{_mandir}/man?/* %{_datadir}/locale/* /usr/bin/* /usr/linux/bin/* %changelog * Wed Sep 23 2009 Michael Perzl - 7.6-1 - updated to version 7.6 * Mon Sep 07 2009 Michael Perzl - 7.5-1 - updated to version 7.5 * Wed Jul 15 2009 Michael Perzl - 7.4-1 - updated to version 7.4 * Thu Jun 26 2008 Michael Perzl - 6.12-1 - updated to version 6.12 and built as 64-bit RPM package and renamed to %{name} * Wed May 07 2008 Michael Perzl - 6.11-1 - updated to version 6.11 * Tue Feb 05 2008 Michael Perzl - 6.10-1 - first version for AIX V5.1 and higher - slightly based on the original SPEC file from IBM