[cmake-developers] [CPack] [CPackRPM] mantis ticket 13176 CPackRPM support for per-component summary and description

Domen Vrankar domen.vrankar at gmail.com
Sat Oct 18 16:36:47 EDT 2014


> I also have a question. Would CPack also need something like
>> CPACK_COMPONENT_<component>_PACKAGE_SUMMARY that could be used by
>> CPACK_RPM_<component>_PACKAGE_SUMMARY as default value?
>>
>
>
> Not sure of that one.
> We already have "CPACK_COMPONENT_GROUP_CMAKE_DESCRIPTION"
> which may be a default value for "CPACK_RPM_<component>_PACKAGE_
> SUMMARY" if packaging is done "by compoent group" (which is the default):
>
> The behavior of the various CPack generator w.r.t. mono- or multi-
> file/package generation vary,
> see:
>
> http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack#CPack_Generator_specific_behavior
>
>
I did not find CPACK_COMPONENT_GROUP_<component>_DESCRIPTION in
documentation but from the examples that I've found googling I think that
this would be a better option for CPACK_RPM_<component>_PACKAGE_DESCRIPTION
than CPACK_RPM_<component>_PACKAGE_SUMMARY. Since the patch supports all
the options that I've found in the documentation I guess that there are
enough fallback options covered.

I also wrote a test and noticed two things:
1) CPackComponentsForAll test is using component names in lower case and
<component> parts in variables in upper case (e.g. COMPONENT headers and
CPACK_COMPONENT_HEADERS_DESCRIPTION). Patch uses
CPACK_RPM_PACKAGE_COMPONENT variable as part of component variable name
e.g. CPACK_RPM_headers_PACKAGE_DESCRIPTION.
Because of this the fallback mechanism doesn't work correctly so is the
correct variable format CPACK_COMPONENT_headers_PACKAGE_SUMMARY, CPACK_
COMPONENT_HEADERS_PACKAGE_SUMMARY, both or case insensitive?
If case insensitive option is the correct one - how do I implement that?
Since all other RPM component variables use install( ... COMPONENT name) as
part of variable name (so in this case that means lower case) I guess that
RPM versions should stay as they are now (
CPACK_RPM_headers_PACKAGE_DESCRIPTION for the above example).

2) Package description fallback is currently written as
set(CPACK_RPM_PACKAGE_DESCRIPTION "no package description available") and
this is already in the code - not part of the patch. However if variable
CPACK_PACKAGE_DESCRIPTION_FILE is not set it points by default to
Templates/CPack.GenericDescription.txt and its content is "DESCRIPTION". So
currently the above final fallback is dead code.
Should I delete it or fix the code so that in case of default
CPACK_PACKAGE_DESCRIPTION_FILE value it ignores it and uses "no package
description available" text instead (would break the way it currently works
so I'm guessing that deleting that part of code is the preferred option)?
Can I put this change in the same patch since I am changing the fallback
mechanism in it or should this be a different patch?
If second - can I still attach the patch to the same mantis bug, do I open
a new bug report or just create a patch and post it on the mailing list?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141018/a0ae7c3e/attachment-0002.html>


More information about the cmake-developers mailing list