[cmake-developers] [PATCH] Preinstall requirements support for CPack RPM generator
Brad King
brad.king at kitware.com
Thu Oct 9 10:03:31 EDT 2014
On 10/08/2014 01:48 PM, Evgeny Kalishenko wrote:
> I was interested in feature request
> http://public.kitware.com/Bug/view.php?id=14769 and made a
> simple patch for CPack RPM generator (attached).
Thanks.
In this hunk:
> + # The following keywords require braces around the "pre" or "post" suffix in the final RPM spec file.
> + if("${_RPM_SPEC_HEADER}" MATCHES "REQUIRES_PRE" OR "${_RPM_SPEC_HEADER}" MATCHES "REQUIRES_POST")
> + string(REPLACE "_" "(" _PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}")
> + set(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME})")
> + endif()
The MATCHES conditions can use simply STREQUAL instead.
I'm not very familiar with the spec format, so please
explain the purpose of the s/_/(/ subsitution in comments
here.
Thanks,
-Brad
More information about the cmake-developers
mailing list