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
16 Patch3: coreutils-6.9-smack-fix.patch
18 Patch1001: mktemp-1.5-build.patch
19 BuildRequires: autoconf >= 2.58
20 BuildRequires: automake >= 1.10
21 BuildRequires: gettext findutils
23 Provides: fileutils sh-utils stat textutils mktemp
28 These are the GNU core utilities. This package is the combination of
29 the old GNU fileutils, sh-utils, and textutils packages.
32 %setup -q -b 1 -n coreutils-%{version}
33 %patch1 -p1 -b .futimens
35 %patch3 -p1 -b .smack-fix
40 export CFLAGS=" -fpie"
41 export LDFLAGS=" -pie"
44 patch -p1 < %{PATCH1001}
55 make bindir=%{buildroot}/bin mandir=%{buildroot}%{_mandir} install
60 # man pages are not installed with make install
61 make mandir=%{buildroot}%{_mandir} install-man
63 # let be compatible with old fileutils, sh-utils and textutils packages :
64 mkdir -p %{buildroot}{/bin,%{_bindir},%{_sbindir},/sbin}
65 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
67 mv %{buildroot}{%{_bindir},/bin}/$f
70 # chroot was in /usr/sbin :
71 mv %{buildroot}{%{_bindir},%{_sbindir}}/chroot
73 # These come from util-linux and/or procps.
74 for i in hostname uptime kill ; do
75 rm %{buildroot}{%{_bindir}/$i,%{_mandir}/man1/$i.1}
78 # Use hard links instead of symbolic links for LC_TIME files (bug #246729).
79 find %{buildroot}%{_datadir}/locale -type l | \
82 target=$(readlink "$link")
84 ln "$(dirname "$link")/$target" "$link"
87 mkdir -p $RPM_BUILD_ROOT%{_datadir}/license
88 for keyword in LICENSE COPYING COPYRIGHT;
90 for file in `find %{_builddir} -name $keyword`;
92 cat $file >> $RPM_BUILD_ROOT%{_datadir}/license/%{name};
98 rm -rf $RPM_BUILD_ROOT
103 %manifest %{name}.manifest
105 %{_datadir}/license/%{name}