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 Source1001: %{name}.manifest
14 Patch1: coreutils-futimens.patch
16 Patch1001: mktemp-1.5-build.patch
17 BuildRequires: autoconf >= 2.58
18 BuildRequires: automake >= 1.10
19 BuildRequires: gettext findutils
21 Provides: fileutils sh-utils stat textutils mktemp
26 These are the GNU core utilities. This package is the combination of
27 the old GNU fileutils, sh-utils, and textutils packages.
30 %setup -q -b 1 -n coreutils-%{version}
31 %patch1 -p1 -b .futimens
36 patch -p1 < %{PATCH1001}
47 make bindir=%{buildroot}/bin mandir=%{buildroot}%{_mandir} install
52 # man pages are not installed with make install
53 make mandir=%{buildroot}%{_mandir} install-man
55 # let be compatible with old fileutils, sh-utils and textutils packages :
56 mkdir -p %{buildroot}{/bin,%{_bindir},%{_sbindir},/sbin}
57 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
59 mv %{buildroot}{%{_bindir},/bin}/$f
62 # chroot was in /usr/sbin :
63 mv %{buildroot}{%{_bindir},%{_sbindir}}/chroot
65 # These come from util-linux and/or procps.
66 for i in hostname uptime kill ; do
67 rm %{buildroot}{%{_bindir}/$i,%{_mandir}/man1/$i.1}
70 # Use hard links instead of symbolic links for LC_TIME files (bug #246729).
71 find %{buildroot}%{_datadir}/locale -type l | \
74 target=$(readlink "$link")
76 ln "$(dirname "$link")/$target" "$link"
79 mkdir -p $RPM_BUILD_ROOT%{_datadir}/license
80 for keyword in LICENSE COPYING COPYRIGHT;
82 for file in `find %{_builddir} -name $keyword`;
84 cat $file >> $RPM_BUILD_ROOT%{_datadir}/license/%{name};
90 rm -rf $RPM_BUILD_ROOT
95 %manifest %{name}.manifest
97 %{_datadir}/license/%{name}