summaryrefslogtreecommitdiff
path: root/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
commitb80c6a2941e828bfc4db166c200ef98b52d5b9d7 (patch)
treed5bb50905946af96419320eb118ac27d577019f4 /cmake
parent605797313d34a3418ef2d189e95e0963118ac9d5 (diff)
downloadmariadb-git-b80c6a2941e828bfc4db166c200ef98b52d5b9d7.tar.gz
Merged some fixes from 7.2 release branches
Diffstat (limited to 'cmake')
-rw-r--r--cmake/make_dist.cmake.in9
-rw-r--r--cmake/mysql_version.cmake9
-rw-r--r--cmake/package_name.cmake11
3 files changed, 24 insertions, 5 deletions
diff --git a/cmake/make_dist.cmake.in b/cmake/make_dist.cmake.in
index 5aa1fc8fd0e..1b347e41836 100644
--- a/cmake/make_dist.cmake.in
+++ b/cmake/make_dist.cmake.in
@@ -120,8 +120,13 @@ CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${PACKAGE_DIR}/sql/sql_yacc.cc COPYONLY)
# Copy spec files
-CONFIGURE_FILE(${CMAKE_BINARY_DIR}/support-files/mysql.${VERSION}.spec
- ${PACKAGE_DIR}/support-files/mysql.${VERSION}.spec COPYONLY)
+SET(SPECFILENAME "mysql.${VERSION}.spec")
+IF("${VERSION}" MATCHES "-ndb-")
+ STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}")
+ SET(SPECFILENAME "mysql-cluster-${NDBVERSION}.spec")
+ENDIF()
+CONFIGURE_FILE(${CMAKE_BINARY_DIR}/support-files/${SPECFILENAME}
+ ${PACKAGE_DIR}/support-files/${SPECFILENAME} COPYONLY)
# Add documentation, if user has specified where to find them
IF(MYSQL_DOCS_LOCATION)
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")
diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake
index fb75df563ec..d9e0902c921 100644
--- a/cmake/package_name.cmake
+++ b/cmake/package_name.cmake
@@ -116,8 +116,15 @@ IF(NOT VERSION)
SET(PRODUCT_TAG)
ENDIF()
- SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
-
+ IF("${VERSION}" MATCHES "-ndb-")
+ STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}")
+ SET(package_name "mysql-cluster${PRODUCT_TAG}-${NDBVERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
+ ELSE()
+ SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
+ ENDIF()
+
+ MESSAGE("-- Packaging as: ${package_name}")
+
# Sometimes package suffix is added (something like "-icc-glibc23")
IF(PACKAGE_SUFFIX)
SET(package_name "${package_name}${PACKAGE_SUFFIX}")