Commit fbc17133 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-24292 support semi-independent versioning for sub-packages

3. Embed plugin version into the DEB package version

this assumes that -DDEB is only used from within autobake-deb.sh
parent 5c53576c
......@@ -7,5 +7,18 @@ SET(CPACK_COMPONENT_SERVER_GROUP "server")
SET(CPACK_COMPONENT_README_GROUP "server")
SET(CPACK_COMPONENTS_ALL Server Test SharedLibraries)
SET(PYTHON_SHEBANG "/usr/bin/python3" CACHE STRING "python shebang")
FUNCTION(SET_PLUGIN_DEB_VERSION plugin ver)
STRING(REPLACE "_" "-" plugin ${plugin})
STRING(REPLACE "-" "." serverver ${SERVER_VERSION})
STRING(REPLACE ${SERVER_VERSION} ${serverver} ver ${ver})
FILE(READ ${CMAKE_SOURCE_DIR}/debian/changelog changelog)
STRING(REPLACE ${serverver} ${ver} changelog "${changelog}")
FILE(WRITE ${CMAKE_SOURCE_DIR}/debian/mariadb-plugin-${plugin}.changelog "${changelog}")
ENDFUNCTION()
ELSE(DEB)
FUNCTION(SET_PLUGIN_DEB_VERSION plugin ver)
ENDFUNCTION()
ENDIF(DEB)
......@@ -259,6 +259,7 @@ MACRO(MYSQL_ADD_PLUGIN)
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)
SET_PLUGIN_DEB_VERSION(${target} ${SERVER_VERSION}-${ARG_VERSION})
ENDIF()
IF(NOT ARG_CLIENT AND UNIX)
IF (NOT ARG_CONFIG)
......
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