diff options
Diffstat (limited to 'cmake/mysql_version.cmake')
-rw-r--r-- | cmake/mysql_version.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake index 4a9f35e6b35..5f60cb68101 100644 --- a/cmake/mysql_version.cmake +++ b/cmake/mysql_version.cmake @@ -57,7 +57,10 @@ MACRO(GET_MYSQL_VERSION) MESSAGE("-- MariaDB ${VERSION}") SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version") SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}") - STRING(REPLACE "-" "_" MYSQL_RPM_VERSION "${VERSION}") + # Use NDBVERSION irregardless of whether this is Cluster or not, if not + # then the regex will be ignored anyway. + STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}") + STRING(REPLACE "-" "_" MYSQL_RPM_VERSION "${NDBVERSION}") MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH_VERSION}") MARK_AS_ADVANCED(VERSION MYSQL_VERSION_ID MYSQL_BASE_VERSION) SET(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION}) @@ -93,6 +96,10 @@ ENDIF() IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME) SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION}") + IF("${VERSION}" MATCHES "-ndb-") + STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}") + SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-cluster-gpl-${NDBVERSION}") + ENDIF() ENDIF() SET(CPACK_PACKAGE_CONTACT "MariaDB team <info@montyprogram.com>") SET(CPACK_PACKAGE_VENDOR "Monty Program AB") |