[CMake] How to request features?

Alexander Neundorf a.neundorf-work at gmx.net
Fri Aug 3 13:25:01 EDT 2007


On Friday 03 August 2007 12:32, Eric Noulard wrote:
> 2007/8/3, Alexander Neundorf <a.neundorf-work at gmx.net>:
...
> > How are srpms supposed to handle this ? The configure scripts may need
> > additional arguments, same for cmake here.
>
> I don't really know I think your spec file contains "standard" options
> and you will have to change the "standard" spec file and rerun
> rpmbuild -bb you_modified_spec_file.spec
> in order to get the custom optionized RPM.
>
> > What does rpmbuild do ?
> > Is it more than packaging the install tree together with some special
> > files ?
>
> Yes there is more.
> I throw hereafter the things I know, but there may be more.
>
> It checks whether if every package file are installed and conversely.
> Depending on the distribution flavor (Fedora, Mandriva etc...)
> it will automagically build additionnal package used for debug.

rpm or additional tools like yum ?

> Try UseRPMTools on a Fedora box for packagin CMake itself
> and you will see what happen.
>
> rpmbuild effectively does the install step in a chrooted environment
> which is interesting to catch faked-install error.
>
> When building binary packages rpmbuild computes binary packages
> dependencies.
>
> I'll may send you a log of an rpmbuild run as an example.
> I'll try to generate CMake rpm for FC6 and put it somewhere.
> I'll try it tonight or tomorrow since I'm running ouyt of time just now :))
>
> As a summarized explanation for why I did UseRPMTools this way:
>
> I did stick to CMake MACRO + rpmbuild (instead of
> trying to improve CPack code) precisely because I'd
> like to trust what rpmbuild does and to simply ignore it
> instead of tracking rpmbuild work evolution
> (which may be different on FC6, FC7, Mandriva 200x ...)
> in order to put it back to CPack.

Ok. 
I think it's ok to use rpmbuild, but it would be nice if for the binary 
package rpmbuild could used so that it actually packs the install tree 
instead of building and make install itself. Can this be done via 
special %prep, %build and %install steps ?

This would mean that the rpm is not created by building the previuosly created 
source rpm, but independent from it. It would also mean that the binary 
package is exactly what you have built with the exact cmake settings, which 
would be a good thing.
If this is implemented as a generator in cpack it still can use rpmbuild, 
there is nothing which speaks against this.

Bye
Alex


More information about the CMake mailing list