diff options
author | Dexter Morgan <dmorgan@mageia.org> | 2011-09-08 21:55:52 +0000 |
---|---|---|
committer | Dexter Morgan <dmorgan@mageia.org> | 2011-09-08 21:55:52 +0000 |
commit | d81d36055bae9f301e6640ede342d55c1071d83e (patch) | |
tree | 8c796d10656464ae39998f4bfd07b237dd3fbb09 /build.macros.in | |
parent | 7f63c807f765543c1a284a074e30b078b2c67e09 (diff) | |
download | rpm-setup-d81d36055bae9f301e6640ede342d55c1071d83e.tar rpm-setup-d81d36055bae9f301e6640ede342d55c1071d83e.tar.gz rpm-setup-d81d36055bae9f301e6640ede342d55c1071d83e.tar.bz2 rpm-setup-d81d36055bae9f301e6640ede342d55c1071d83e.tar.xz rpm-setup-d81d36055bae9f301e6640ede342d55c1071d83e.zip |
Add an automatic rm -fr %buildroot at the beginning of %install scriptlet
Diffstat (limited to 'build.macros.in')
-rw-r--r-- | build.macros.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build.macros.in b/build.macros.in index 7cf90a8..b6b68f0 100644 --- a/build.macros.in +++ b/build.macros.in @@ -280,6 +280,15 @@ export CFLAGS="%optflags"; export CXXFLAGS="%optflags"; export RPM_OPT_FLAGS="%o --infodir=%{_infodir} \\\ $CONFIGURE_XPATH +#--------------------------------------------------------------------- +# 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} #============================================================================== # ---- Build policy macros. |