[CMake] Re: Deb and RPM package generation modules

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Jul 5 03:47:52 EDT 2007


On 7/4/07, Mehdi Rabah <mehdi.rabah at gmail.com> wrote:
> Hi everyone,
>
> In case someone is interested in linux package generation within cmake,
>  I've started to improve the existing scripts
> (http://www.cmake.org/Wiki/CMakeUserUseRPMTools
>   and http://www.cmake.org/Wiki/CMakeUserUseDebian)
>  to make both debian and rpm packaging easier.

Nice !


>  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)

CPack should have been the way to go, but I gave up too quickly on it...

> - 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
> example).
>     it doesn't rely on Md5Sum module anymore

:(
My first pass was also using the dpkg-thingy but I thought for a real
cross platform tool, we should use cross platform tool :) whereas dpkg
stuff is only available on debian OS, meaning you would only be able
to build .deb package on a debian OS. Kinda restrictive, no ?

> - you can generate a package for each subproject (ie folders with a
> CMakeLists
>    and a PROJECT() macro) of your cmake project.

sweet !

> - can't generate the source package anymore :/  (yet)
>    this was made using cpack, but It seems that cpack don't let you choose
> what
>    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 ^^)

Same here, I got stuck on that...

> There are still a few part that needs to be finished, but I think the major
> improvement
> will be to autodetect the dependencies (like dh_makeshlibs for deb package
> building).
>
> 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?

Yes... But I do not know how to do it :(

-Mathieu


More information about the CMake mailing list