Commit 4b6ef03d authored by Alexey Bychko's avatar Alexey Bychko

MDEV-26438 cmake < 3.6.0 produced RPMs with invalid names

replaced CPACK_RPM_PACKAGE_VERSION with SERVER_VERSION.
CPACK_* variables are empty and can't be used until INCLUDE(CPack) is
called.
SERVER_VERSION is the safest option because other variables may be
overwritten from submodules
parent 87ff4ba7
...@@ -35,7 +35,7 @@ SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts ...@@ -35,7 +35,7 @@ SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts
SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
SET(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) SET(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
IF(CMAKE_VERSION VERSION_LESS "3.6.0") IF(CMAKE_VERSION VERSION_LESS "3.6.0")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}") SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${SERVER_VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}")
ELSE() ELSE()
SET(CPACK_RPM_FILE_NAME "RPM-DEFAULT") SET(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
OPTION(CPACK_RPM_DEBUGINFO_PACKAGE "" ON) OPTION(CPACK_RPM_DEBUGINFO_PACKAGE "" ON)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment