From a51017344e6ff730f1bcfec3a9089f49ad80de48 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 21 Sep 2015 12:34:13 +0200 Subject: do not remove buildroot in %install if install is disabled --- build.macros.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build.macros.in') diff --git a/build.macros.in b/build.macros.in index f4af4e8..fd585d6 100644 --- a/build.macros.in +++ b/build.macros.in @@ -282,11 +282,13 @@ export CFLAGS="%optflags"; export CXXFLAGS="%optflags"; export RPM_OPT_FLAGS="%o # Expanded at beginning of %install scriptlet. # -%__spec_install_pre %{___build_pre}\ +%__spec_install_pre \ +%{___build_pre}\ +if [ %{_with install} -eq 1 ]; then\ [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\ mkdir -p `dirname "$RPM_BUILD_ROOT"`\ mkdir "$RPM_BUILD_ROOT"\ -%{nil} +fi #============================================================================== # ---- Build policy macros. -- cgit v1.2.1