[CMake] Possible changes in CPackRPM.cmake in version 2.8.0

Karl Krissian krissian at dis.ulpgc.es
Thu Oct 14 05:32:09 EDT 2010


  Hi,

I made the following changes to the file 
/usr/share/cmake/Modules/CPackRPM.cmake to be able to use it for my 
software:

diff /home/karl/amilab_trunk/CMAKE/CPackRPM.cmake 
/usr/share/cmake/Modules/CPackRPM.cmake
283,285c283
<                 COMMAND sed {s/\\.//}
<             COMMAND sed {s/$/\"/}
<         COMMAND sed {s/^/\"/}
---
 >                COMMAND sed {s/\\.//}
369c367,369
<     COMMAND "${RPMBUILD_EXECUTABLE}" -bb  
--buildroot=${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/ 
"${CPACK_RPM_BINARY_SPECFILE}"
---
 >     COMMAND "${RPMBUILD_EXECUTABLE}" -bb
 >             --buildroot 
"${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
 >             "${CPACK_RPM_BINARY_SPECFILE}"

Basically, I replaced "--buildroot "${path}"" by "--buildroot=${path}" 
and I added quotes around the filenames to deal with spaces inside.

I also removed the quotes around the buildroot directory since it was a 
source of error, but then the directory cannot include spaces anymore.

Regards,

Karl Krissian


P.S. : I used rpmbuild from RPM 4.8.1



More information about the CMake mailing list