summaryrefslogtreecommitdiff
path: root/cmake/mysql_version.cmake
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2012-03-22 16:16:11 +0100
committerBjorn Munch <bjorn.munch@oracle.com>2012-03-22 16:16:11 +0100
commit26c08ffa405224ced8540d794981bd947fd39168 (patch)
treed5bb50905946af96419320eb118ac27d577019f4 /cmake/mysql_version.cmake
parentfaa5e844bb3b0327e7072230719a36dd58a29bfd (diff)
downloadmariadb-git-26c08ffa405224ced8540d794981bd947fd39168.tar.gz
Merged some fixes from 7.2 release branches
Diffstat (limited to 'cmake/mysql_version.cmake')
-rw-r--r--cmake/mysql_version.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake
index f21d29815e6..59ee318f47b 100644
--- a/cmake/mysql_version.cmake
+++ b/cmake/mysql_version.cmake
@@ -57,7 +57,10 @@ MACRO(GET_MYSQL_VERSION)
MESSAGE("-- MySQL ${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 "mysql-${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 "MySQL Release Engineering <mysql-build@oss.oracle.com>")
SET(CPACK_PACKAGE_VENDOR "Oracle Corporation")