1 %define _unpackaged_files_terminate_build 0
3 Summary: The GNU core utilities: a set of tools commonly used in shell scripts
9 Group: System Environment/Base
10 Url: http://www.gnu.org/software/coreutils/
11 Source0: ftp://ftp.gnu.org/gnu/%{name}/coreutils-%{version}.tar.bz2
12 Source1: mktemp-1.5.tar.gz
13 Patch1: coreutils-futimens.patch
15 Patch1001: mktemp-1.5-build.patch
16 BuildRequires: autoconf >= 2.58
17 BuildRequires: automake >= 1.10
18 BuildRequires: gettext findutils
20 Provides: fileutils sh-utils stat textutils mktemp
23 These are the GNU core utilities. This package is the combination of
24 the old GNU fileutils, sh-utils, and textutils packages.
27 %setup -q -b 1 -n coreutils-%{version}
28 %patch1 -p1 -b .futimens
32 patch -p1 < %{PATCH1001}
43 make bindir=%{buildroot}/bin mandir=%{buildroot}%{_mandir} install
48 # man pages are not installed with make install
49 make mandir=%{buildroot}%{_mandir} install-man
51 # let be compatible with old fileutils, sh-utils and textutils packages :
52 mkdir -p %{buildroot}{/bin,%{_bindir},%{_sbindir},/sbin}
53 for f in cat chgrp chmod chown cp date dd df echo link ln ls mkdir mknod mv pwd rm rmdir sleep sync touch true uname unlink
55 mv %{buildroot}{%{_bindir},/bin}/$f
58 # chroot was in /usr/sbin :
59 mv %{buildroot}{%{_bindir},%{_sbindir}}/chroot
61 # These come from util-linux and/or procps.
62 for i in hostname uptime kill ; do
63 rm %{buildroot}{%{_bindir}/$i,%{_mandir}/man1/$i.1}
66 # Use hard links instead of symbolic links for LC_TIME files (bug #246729).
67 find %{buildroot}%{_datadir}/locale -type l | \
70 target=$(readlink "$link")
72 ln "$(dirname "$link")/$target" "$link"
76 rm -rf $RPM_BUILD_ROOT