[CMake] How to set different install scripts into different component RPMs

Eric Noulard eric.noulard at gmail.com
Sun Mar 13 05:28:30 EDT 2011


2011/3/13 徐亮 <lxu4net at gmail.com>:
> I have a big project that include lib1, lib2, app1, app2.
> Before CPack 2.8.4, app1 and app2 have standalone CMakeLists.txt and
> pack RPM independently. So I can set  different pre/post install
> scripts to these RPMs.
> In CPack 2.8.4, I can generate two component RPM for app1 and app2.
> But how to set different pre/post install scripts to components.

I'm afraid currently you can't.
Currently every RPM specific options CPACK_RPM_xxx are applied
globally i.e. to each componentized RPM.

I'm not sure I want to do that but may we can either make each
"CPACK_RPM_xxx" a list of couple in order to be able to select
"component-specific values",

the other option would be to define CPACK_RPM_<COMPNAME>_xxx
var for each COMPONENT.

Would you be kind enough to file a feature request:
http://public.kitware.com/Bug/bug_report_page.php
describing the need. If you can provided a small test case it would be
even better.

In any case currently you cannot do that so I'm afraid you'll have to
use "monolithic" packaging as you did before 2.8.4, unless you can make your
pre/post install scripts generic.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list