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
15 Patch2: coreutils-6.9-smack.patch
17 Patch1001: mktemp-1.5-build.patch
18 BuildRequires: autoconf >= 2.58
19 BuildRequires: automake >= 1.10
20 BuildRequires: gettext findutils
22 Provides: fileutils sh-utils stat textutils mktemp
27 These are the GNU core utilities. This package is the combination of
28 the old GNU fileutils, sh-utils, and textutils packages.
31 %setup -q -b 1 -n coreutils-%{version}
32 %patch1 -p1 -b .futimens
38 patch -p1 < %{PATCH1001}
49 make bindir=%{buildroot}/bin mandir=%{buildroot}%{_mandir} install
54 # man pages are not installed with make install
55 make mandir=%{buildroot}%{_mandir} install-man
57 # let be compatible with old fileutils, sh-utils and textutils packages :
58 mkdir -p %{buildroot}{/bin,%{_bindir},%{_sbindir},/sbin}
59 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
61 mv %{buildroot}{%{_bindir},/bin}/$f
64 # chroot was in /usr/sbin :
65 mv %{buildroot}{%{_bindir},%{_sbindir}}/chroot
67 # These come from util-linux and/or procps.
68 for i in hostname uptime kill ; do
69 rm %{buildroot}{%{_bindir}/$i,%{_mandir}/man1/$i.1}
72 # Use hard links instead of symbolic links for LC_TIME files (bug #246729).
73 find %{buildroot}%{_datadir}/locale -type l | \
76 target=$(readlink "$link")
78 ln "$(dirname "$link")/$target" "$link"
81 mkdir -p $RPM_BUILD_ROOT%{_datadir}/license
82 for keyword in LICENSE COPYING COPYRIGHT;
84 for file in `find %{_builddir} -name $keyword`;
86 cat $file >> $RPM_BUILD_ROOT%{_datadir}/license/%{name};
92 rm -rf $RPM_BUILD_ROOT
97 %manifest %{name}.manifest
99 %{_datadir}/license/%{name}