diff --git a/util-linux.spec b/util-linux.spec index 7997a0e..268c5aa 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -336,31 +336,31 @@ make check %install -mkdir -p ${RPM_BUILD_ROOT}%{_bindir} -mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,6,8,5} -mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps} -mkdir -p ${RPM_BUILD_ROOT}%{_tmpfilesdir}/tmpfiles.d +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_mandir}/man{1,6,8,5} +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} +mkdir -p %{buildroot}%{_tmpfilesdir}/tmpfiles.d # install util-linux %make_install # And a dirs uuidd needs that the makefiles don't create -install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_tmpfilesdir}/uuidd.conf -install -d ${RPM_BUILD_ROOT}/run/uuidd -install -d ${RPM_BUILD_ROOT}/var/lib/libuuid +install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/uuidd.conf +install -d %{buildroot}/run/uuidd +install -d %{buildroot}/var/lib/libuuid # /etc/adjtime -install -m 644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_sysconfdir}/adjtime +install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime # libtool junk -rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a +rm -rf %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la +rm -f %{buildroot}%{_libdir}/python*/site-packages/*.a %ifarch %{sparc} -rm -rf ${RPM_BUILD_ROOT}%{_bindir}/sunhostid -cat << E-O-F > ${RPM_BUILD_ROOT}%{_bindir}/sunhostid +rm -rf %{buildroot}%{_bindir}/sunhostid +cat << E-O-F > %{buildroot}%{_bindir}/sunhostid #!/bin/sh # this should be _bindir/sunhostid or somesuch. # Copyright 1999 Peter Jones, . @@ -372,12 +372,12 @@ echo \$idprom|dd bs=1 skip=27 count=6 echo ) 2>/dev/null E-O-F -chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid +chmod 755 %{buildroot}%{_bindir}/sunhostid %endif # PAM settings { - pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d + pushd %{buildroot}%{_sysconfdir}/pam.d install -m 644 %{SOURCE1} ./login install -m 644 %{SOURCE2} ./remote install -m 644 %{SOURCE3} ./chsh @@ -390,8 +390,8 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid } %ifnarch s390 s390x -ln -sf hwclock ${RPM_BUILD_ROOT}%{_sbindir}/clock -echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 +ln -sf hwclock %{buildroot}%{_sbindir}/clock +echo ".so man8/hwclock.8" > %{buildroot}%{_mandir}/man8/clock.8 %endif # unsupported on SPARCs @@ -401,27 +401,27 @@ for I in /sbin/sfdisk \ /sbin/cfdisk \ %{_mandir}/man8/cfdisk.8*; do - rm -f $RPM_BUILD_ROOT$I + rm -f %{buildroot}$I done %endif # we install getopt-*.{bash,tcsh} by doc directive #chmod 644 misc-utils/getopt-*.{bash,tcsh} -#rm -f ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt/* -#rmdir ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt +#rm -f %{buildroot}%{_datadir}/doc/util-linux/getopt/* +#rmdir %{buildroot}%{_datadir}/doc/util-linux/getopt ln -sf ../proc/self/mounts %{buildroot}/etc/mtab # remove static libs -rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a +rm -f %{buildroot}%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a # temporary remove to avoid conflicts with bash-completion pkg -rm -f $RPM_BUILD_ROOT%{compldir}/{mount,umount} +rm -f %{buildroot}%{compldir}/{mount,umount} # remove unvanted translations (conflicts with shadow-utils) -rm -f $RPM_BUILD_ROOT%{_mandir}/*/man1/newgrp.* -rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vigr.* -rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vipw.* +rm -f %{buildroot}%{_mandir}/*/man1/newgrp.* +rm -f %{buildroot}%{_mandir}/*/man8/vigr.* +rm -f %{buildroot}%{_mandir}/*/man8/vipw.* # find MO files @@ -430,11 +430,11 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vipw.* touch %{name}.files # create list of setarch(8) symlinks -find $RPM_BUILD_ROOT%{_bindir}/ -regextype posix-egrep -type l \ +find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|uname26)$" \ -printf "%{_bindir}/%f\n" >> %{name}.files -find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ +find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|uname26)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files