[CMake] Deb and RPM package generation modules

Mehdi Rabah mehdi.rabah at gmail.com
Wed Jul 4 11:21:36 EDT 2007

Hi everyone,

In case someone is interested in linux package generation within cmake,
 I've started to improve the existing scripts
  and http://www.cmake.org/Wiki/CMakeUserUseDebian)
 to make both debian and rpm packaging easier.

Here is links to these modules with a concrete example:


The differences with the original scripts are that:
- you can customize the entire control or spec file directly
    from your cmake file (yet to finish for rpm)
- it doesn't need cpack anymore (I don't know if it's a good thing or not)
- the two modules have some common description variables
    (so it's easy to describe both rpm and deb packages)
- for the deb generation : use dpkg-deb. (building the archive directly with
ar seems
    to cause some weird problem, with gdebi or dpkg-scanpackages for
    it doesn't rely on Md5Sum module anymore
- you can generate a package for each subproject (ie folders with a
   and a PROJECT() macro) of your cmake project.
- can't generate the source package anymore :/  (yet)
   this was made using cpack, but It seems that cpack don't let you choose
   do you want to put in your source package... so I'm trying to do it
without cpack
   (btw, there is very really few documentation on cpack ^^)

There are still a few part that needs to be finished, but I think the major
will be to autodetect the dependencies (like dh_makeshlibs for deb package

So I think that's it. Do you have any thoughts on all this?
CPack seems to have some cool feature like stripping binaries,
so do you think it will be a good idea to *really* integrate these modules
within cpack?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070704/4ae1e674/attachment.htm

More information about the CMake mailing list