summaryrefslogtreecommitdiff
path: root/cmake/plugin.cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-11-26 18:58:10 +0100
committerSergei Golubchik <serg@mariadb.org>2021-01-12 16:47:23 +0100
commit78806be6d34a6083f09e79bfddcaaac9d7708dd3 (patch)
tree48392fca374ef4f6551c718539f72b3c606ccbf5 /cmake/plugin.cmake
parent64d2849b3eea78167cf479d9efe39e718dba36af (diff)
downloadmariadb-git-78806be6d34a6083f09e79bfddcaaac9d7708dd3.tar.gz
MDEV-24292 support semi-independent versioning for sub-packages
2. Embed plugin version into the RPM package version introduce SERVER_VERSION, because plugins can overwrite VERSION (and columnstore actually does)
Diffstat (limited to 'cmake/plugin.cmake')
-rw-r--r--cmake/plugin.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 2dab9a651da..e0f6c1da292 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -245,7 +245,8 @@ MACRO(MYSQL_ADD_PLUGIN)
NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT}
AND INSTALL_SYSCONF2DIR)
IF (ARG_STORAGE_ENGINE)
- SET(ver " = %{version}-%{release}")
+ STRING(REPLACE "-" "_" ver ${SERVER_VERSION})
+ SET(ver " = ${ver}-%{release}")
ELSE()
SET(ver "")
ENDIF()
@@ -256,6 +257,9 @@ MACRO(MYSQL_ADD_PLUGIN)
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB-server${ver}" PARENT_SCOPE)
ENDIF()
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} PARENT_SCOPE)
+ IF (ARG_VERSION)
+ SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_VERSION ${SERVER_VERSION}_${ARG_VERSION} PARENT_SCOPE)
+ ENDIF()
IF(NOT ARG_CLIENT AND UNIX)
IF (NOT ARG_CONFIG)
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.cnf")