[CMake] cpack source RPM not setting install path
Eric Noulard
eric.noulard at gmail.com
Sat Nov 10 03:44:44 EST 2012
2012/11/10 Ben Levine <blevine at belvederetrading.com>:
> It presents a make package_source option. And using this does create a
> (mostly) reasonable spec file. I'm actually just looking to deploy
> source code via this method rather then create a "true" source RPM.
OK then I guess (please confirm) you did that
set(CPACK_SOURCE_GENERATOR "RPM")
and then you do
make package_source.
if this is the case be sure the resulting RPM is nothing near far a
real source RPM.
A source RPM is supposed to contains a tarball (tar.gz, tar.xz etc..)
and the **source** spec file
which makes it possible to build the binary RPM.
The source RPM may contains other files like post/pre install scripts
and may be some
patches etc...
The RPM generated by CPack with the previous method is in fact a
binary RPM which happens
to contains sources file and not a source RPM. i.e. it does not have
the structure of a source RPM.
Concerning the spec file, CPack RPM generates a "short-cutted" spec
file precisely because
it is not meant to build source RPM. Have a look at the %prep step and
the purposely
missing %build step.
It may be possible to build a real source RPM with CPack but as it has
been discussed
(on the mailing list) for source DEB package it is not so sure it
would be useful.
The main issue being that "normally" the spec file is the very same
spec file for the source
and binary RPM. WIth the choice made currently for binary CPack RPM
(short-cutted spec file ) this is not possible.
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
More information about the CMake
mailing list