aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <dev@blino.org>2015-09-21 12:34:13 +0200
committerOlivier Blin <dev@blino.org>2015-09-21 12:34:13 +0200
commita51017344e6ff730f1bcfec3a9089f49ad80de48 (patch)
tree104440b14e69b8e4f7b40b0e3c861d0f279d3704
parent2a39ed7ddd2495a61b933441ed564f426d060f70 (diff)
downloadrpm-setup-a51017344e6ff730f1bcfec3a9089f49ad80de48.tar
rpm-setup-a51017344e6ff730f1bcfec3a9089f49ad80de48.tar.gz
rpm-setup-a51017344e6ff730f1bcfec3a9089f49ad80de48.tar.bz2
rpm-setup-a51017344e6ff730f1bcfec3a9089f49ad80de48.tar.xz
rpm-setup-a51017344e6ff730f1bcfec3a9089f49ad80de48.zip
do not remove buildroot in %install if install is disabled
-rw-r--r--NEWS3
-rw-r--r--build.macros.in6
2 files changed, 7 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 20d632b..95a4958 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- do not remove buildroot in %install if install is disabled
+ (to make rpmbuild --without install actually useful)
+
Version 2.13 - 24 July 2015, by Thierry Vignaud
- kill python macros that are already defined in rpm
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.