mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
CPackRPM support for Recommends:
this breaks support for Suggests: but we don't use it anyway
This commit is contained in:
parent
2b856ecd98
commit
694f43644b
1 changed files with 19 additions and 0 deletions
|
@ -2,6 +2,11 @@
|
|||
# Wrapper for CPackRPM.cmake
|
||||
#
|
||||
|
||||
IF(NOT DEFINED RPM_RECOMMENDS)
|
||||
EXECUTE_PROCESS(COMMAND rpm --recommends ERROR_QUIET RESULT_VARIABLE RPM_RECOMMENDS)
|
||||
MESSAGE("CPackRPM:Debug: Testing rpm --recommends: ${RPM_RECOMMENDS}")
|
||||
ENDIF()
|
||||
|
||||
#
|
||||
# Support for per-component LICENSE and VENDOR
|
||||
#
|
||||
|
@ -47,6 +52,20 @@ if (acc)
|
|||
file(WRITE ${${base_var}} "${acc}")
|
||||
endif()
|
||||
|
||||
#
|
||||
# Support for the Recommends: tag.
|
||||
# We don't use Suggests: so here he hijack Suggests: variable
|
||||
# to implement Recommends:
|
||||
#
|
||||
IF (CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_RECOMMENDS)
|
||||
IF (RPM_RECOMMENDS EQUAL 0) # exit code 0 means ok
|
||||
SET(TMP_RPM_SUGGESTS "Recommends: ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_RECOMMENDS}")
|
||||
ELSE() # rpm is too old to recommend
|
||||
SET(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_REQUIRES
|
||||
"${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_REQUIRES} ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_RECOMMENDS}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# load the original CPackRPM.cmake
|
||||
set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||
unset(CMAKE_MODULE_PATH)
|
||||
|
|
Loading…
Add table
Reference in a new issue