Hi everyone,<br><br>In case someone is interested in linux package generation within cmake,<br> I've started to improve the existing scripts<br>(<a href="http://www.cmake.org/Wiki/CMakeUserUseRPMTools">http://www.cmake.org/Wiki/CMakeUserUseRPMTools
</a><br> and <a href="http://www.cmake.org/Wiki/CMakeUserUseDebian">http://www.cmake.org/Wiki/CMakeUserUseDebian</a>)<br> to make both debian and rpm packaging easier.<br><br>Here is links to these modules with a concrete example:
<br><br><a href="https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/CMake/DpkgDeb.cmake?root=cycabtk&view=markup">https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/CMake/DpkgDeb.cmake?root=cycabtk&view=markup</a>
<br><a href="https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/CMake/Rpmbuild.cmake?root=cycabtk&view=markup">https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/CMake/Rpmbuild.cmake?root=cycabtk&view=markup</a><br>
<a href="https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/Hugr/CMakeLists.txt?root=cycabtk&view=markup">https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/Hugr/CMakeLists.txt?root=cycabtk&view=markup</a><br><br>
The differences with the original scripts are that:<br>- you can customize the entire control or spec file directly<br> from your cmake file (yet to finish for rpm)<br>- it doesn't need cpack anymore (I don't know if it's a good thing or not)
<br>- the two modules have some common description variables<br> (so it's easy to describe both rpm and deb packages)<br>- for the deb generation : use dpkg-deb. (building the archive directly with ar seems<br> to cause some weird problem, with gdebi or dpkg-scanpackages for example).
<br> it doesn't rely on Md5Sum module anymore<br>- you can generate a package for each subproject (ie folders with a CMakeLists<br> and a PROJECT() macro) of your cmake project.<br>- can't generate the source package anymore :/ (yet)
<br> this was made using cpack, but It seems that cpack don't let you choose what <br> do you want to put in your source package... so I'm trying to do it without cpack <br> (btw, there is very really few documentation on cpack ^^)
<br><br>There are still a few part that needs to be finished, but I think the major improvement <br>will be to autodetect the dependencies (like dh_makeshlibs for deb package building).<br><br>So I think that's it. Do you have any thoughts on all this?
<br>CPack seems to have some cool feature like stripping binaries, <br>so do you think it will be a good idea to *really* integrate these modules within cpack?<br><br>Regards,<br>--<br>Mehdi <br><br><br>