diff --git a/coreutils.spec b/coreutils.spec index 3b2ba13..dfc1efc 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -213,14 +213,20 @@ for type in separate single; do fi (cd $type && make DESTDIR=$RPM_BUILD_ROOT/$subdir $install) +%if "%{_sbindir}" != "%{_bindir}" # chroot was in /usr/sbin : - mkdir -p $RPM_BUILD_ROOT/$subdir/{%{_bindir},%{_sbindir}} + mkdir -p $RPM_BUILD_ROOT/$subdir/%_sbindir mv $RPM_BUILD_ROOT/$subdir/{%_bindir,%_sbindir}/chroot +%endif # Move multicall variants to *.single. # RemovePathPostfixes will strip that later. if test $type = 'single'; then - for dir in %{_bindir} %{_sbindir} %{_libexecdir}/%{name}; do + for dir in %{_bindir} \ +%if "%{_sbindir}" != "%{_bindir}" +%{_sbindir} \ +%endif +%{_libexecdir}/%{name}; do for bin in $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/$dir/*; do basebin=$(basename $bin) mv $bin $RPM_BUILD_ROOT/$dir/$basebin.single @@ -248,7 +254,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir %files single %{_bindir}/*.single +%if "%{_sbindir}" != "%{_bindir}" %{_sbindir}/chroot.single +%endif %dir %{_libexecdir}/coreutils %{_libexecdir}/coreutils/*.so.single # duplicate the license because coreutils-common does not need to be installed