[CMake] Release 1.41.0.cmake0, RPM generator problem

Eric Noulard eric.noulard at gmail.com
Thu Nov 19 11:22:32 EST 2009


2009/11/19 Gordan Sikic <gordan.sikic at uscs.hr>:
> Hi,
>
> (I consider myself user of both cmake and boost)
>
> I'd like to report that I experienced problem while generating RPM binary
> package on F11, and cmake 2.8.0; output of rpmbuild.err in RPM build
> directory was as follows:

Which software are you building with CMake ? Boost itself?

> $cat rpmbuild.err
> error: line 4: Tag takes single token only: Name: boost c++ libraries

Could you run

cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM > cpackRPM.out
then open a bug report for CPackRPM
http://www.cmake.org/Bug/my_view_page.php

for which you'll attach:
- cpackRPM.out
- rpmbuild.err
- rpmbuild.out
- and  the generated spec file.

> Quick hack to resolve this issue was to change line 261 of root
> CMakeLists.txt, in order to remove all white space in variable
> CPACK_PACKAGE_NAME to contain no spaces, i.e:
>
> set(CPACK_PACKAGE_NAME "Boost_C++_Libraries")

Ok I see, you cannot have space in RPM package name.
Alternatively you may only change the name of the RPM package
set(CPACK_RPM_PACKAGE_NAME "Boost_C++_Libraries")

OK what I can do you may be to automatically replace "space"
with underscore when building the RPM package name from
CPACK_PACKAGE_NAME,
basically I will do:

string(REPLACE " " "_" CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME})

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list