[CMake] CPack and RPM packages

Eric Noulard eric.noulard at gmail.com
Fri Mar 4 09:05:14 EST 2011


2011/3/4 Laszlo Papp <djszapi at archlinux.us>:
> Hi,
>
> Can I create an rpm package with cpack in order to not deal with spec files ?

Yes you can CPackRPM is meant to do that:
http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29

The fastest path is to try:

$ cd /path/to/builddir
$ cpack -G RPM

> We did not need to put any debian/{changelog,rules,control} files
> related implementation into the project so that to build a debian
> package for arm with cpack.

However are you cross-compiling to arm or do you package natively on arm-linux ?

> https://projects.kde.org/projects/playground/games/gluon/repository/revisions/master/entry/CMakeLists.txt#L162
>
> Can it be done in a similar way to avoid the rpm spec file writing ?

Yes see the doc:
http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
and/or
cmake --help-module CPackRPM

> PS: I am not on the list, so please drop me into the 'CC' field.

This is usually a bad habitI am even surprised that you can post
without being on list.
You could subscribe to the list for the duration of your discussion
and then un-subscribe afterwards.

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


More information about the CMake mailing list