[CMake] CMake-CVS: rpm generation problem

Frederik Deweerdt deweerdt at free.fr
Mon Feb 25 12:38:35 EST 2008


Hi all,

I've encountered a problem generating RPMs with the latest
CVS: apparently, some versions of rpmbuild (ours is 4.2.2) do
the pre-processing even when the variable to replace is inside
commentaries.

In CPackRPM.cmake, the %install directive is found twice (lines 192 and
198), thus rpmbuild exists with the following message:

$ /usr/bin/rpmbuild -bb <path to generated spec file>
error: line 34: second %install

The attached patch solved the problem for me.

Frederik

Index: Modules/CPackRPM.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CPackRPM.cmake,v
retrieving revision 1.6
diff -u -r1.6 CPackRPM.cmake
--- Modules/CPackRPM.cmake	1 Nov 2007 13:52:09 -0000	1.6
+++ Modules/CPackRPM.cmake	25 Feb 2008 17:28:28 -0000
@@ -189,7 +189,7 @@
 
 # This is a shortcutted spec file
 # generated by CMake RPM generator
-# we skip the %prepn %build and %install
+# we skip the prepn build and install
 # steps because CPack does that for us
 #%prep
 



More information about the CMake mailing list