[CMake] RPM CPack generator, was: How to request features?

Eric Noulard eric.noulard at gmail.com
Tue Aug 7 13:45:07 EDT 2007


2007/8/7, Frederik Deweerdt <deweerdt at free.fr>:
> On Mon, Aug 06, 2007 at 06:31:32PM +0200, Eric Noulard wrote:
> > 2007/8/6, Alexander Neundorf <a.neundorf-work at gmx.net>:
> > 2) Those files MUST define the following variables
> >
> >     CPACK_GENERATOR_NAME --> the name of the GENERATOR
> >     e.g. SET(CPACK_GENERATOR_NAME "RPM")
> >
> >     CPACK_RPM_OK will be set after INCLUDing(CPackRPMGenerator.cmake)
> >     such that cpack will know if the generator may be used on the current
> >     platform or not.
> >
> >     then afterwards
> >    CPACK_RPM_TYPE --> the type which may be source, binary, both
> >     e.g. SET(CPACK_RPM_TYPE "binary")
> >     whereas
> >           SET(CPACK_SRPM_TYPE "source")
> >     and
> >           SET(CPACK_ZIP_TYPE "both")
> >           or may be
> >           SET(CPACK_ZIP_TYPE "binary;source")
> >
> Hi Eric,
>
> How to specify which files go to the -devel RPM and the ones that go to
> the plain binary RPM?

You are right, my proposal does not take this into account.

But I'm afraid this is an issue I did not think about for now.
My CURRENT point of view is that CPack may generate
two "simple" kind of package

  - binary which basically packages the result of a "make install"
  - source which basically packages the source tree

I think your question is how to generates several packages from a
single CMake handled project.
My answer is that this "sub-package" splitting should be handled
through the CMake INSTALL "component" feature.

However I must admit I don't know how it work.
I did some test and get
make list_install_components
to tell me I did define
Available install components are: "Development" "Runtime"
install component
but I don't know how to call

make install

properly to only install the selected component
once this is done I think I may define an [RPM] package for each
installable component.

Anyone here to explain us how should
INSTALL (xxxx ... COMPONENT ...) work?

the only references I found is:
cmake --help INSTALL which is not helpful
http://www.vtk.org/Wiki/VTK/New_Install_Framework
http://www.cmake.org/Wiki/CMake:Install_Commands

all of them tells that one may use COMPONENT
but I did not find how to invoke
make
in order to use the component framework?


-- 
Erk


More information about the CMake mailing list