Ensure empty buildroot for %install

- remove any existing buildroot contents and safely create a new one
- patch originally from OpenSUSE / Michael Schroeder, adopted to Fedora
  by Tom "spot" Callaway
This commit is contained in:
Panu Matilainen 2010-01-22 15:24:29 +02:00
parent f9c0aca4ae
commit 159a65fb61

11
macros
View File

@ -73,6 +73,17 @@
#============================================================================== #==============================================================================
# ---- Build policy macros. # ---- Build policy macros.
# #
#
#---------------------------------------------------------------------
# Expanded at beginning of %install scriptlet.
#
%__spec_install_pre %{___build_pre}\
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\
mkdir -p `dirname "$RPM_BUILD_ROOT"`\
mkdir "$RPM_BUILD_ROOT"\
%{nil}
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Expanded at end of %install scriptlet. # Expanded at end of %install scriptlet.
# #