summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorEric Noulard <eric.noulard@gmail.com>2009-11-15 18:55:42 (GMT)
committerEric Noulard <eric.noulard@gmail.com>2009-11-15 18:55:42 (GMT)
commit147aa6bf8075e3802af97cc162c6c78c279a100f (patch)
treed9bdf784573bf7b92af278a8cb251f119077320c /Modules/CPackRPM.cmake
parent04d3f576b1957a56ed71a4aad58a5f1aec93be38 (diff)
downloadCMake-147aa6bf8075e3802af97cc162c6c78c279a100f.zip
CMake-147aa6bf8075e3802af97cc162c6c78c279a100f.tar.gz
CMake-147aa6bf8075e3802af97cc162c6c78c279a100f.tar.bz2
CPackRPM: tolerate redhat specific clean BUILD ROOT pre-build macro (bug 9872)
Eric
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r--Modules/CPackRPM.cmake26
1 files changed, 15 insertions, 11 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 6950227..7bc6967 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -415,15 +415,15 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
%description
\@CPACK_RPM_PACKAGE_DESCRIPTION\@
-# This is a shortcutted spec file
-# generated by CMake RPM generator
-# we skip the _prepn _build and _install
-# steps because CPack does that for us
-# WE MUST NOT DO ANYTHING in those steps because they
-# may fail for non-privileged user
-#p prep
-
-#p build
+# This is a shortcutted spec file generated by CMake RPM generator
+# we skip _install step because CPack does that for us.
+# We do only save CPack installed tree in _prepr
+# and then restore it in build.
+%prep
+mv $RPM_BUILD_ROOT \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot
+
+%build
+mv \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot $RPM_BUILD_ROOT
#p install
@@ -443,11 +443,15 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
%files
%defattr(-,root,root,-)
-#p dir %{prefix}
-#p {prefix}/*
${CPACK_RPM_INSTALL_FILES}
%changelog
+* Sat Nov 14 2009 Erk <eric.noulard@gmail.com>
+ Replace prep and build step with backup and restore
+ of the previously CPack installed tree. This should
+ mimic what is expected in rpmbuild usual steps
+* Wed Nov 11 2009 Erk <eric.noulard@gmail.com>
+ Add support for USER defined pre/post[un]install scripts
* Wed Oct 07 2009 Erk <eric.noulard@gmail.com>
Add user custom spec file support
* Sat Oct 03 2009 Kami <cmoidavid@gmail.com>