summaryrefslogtreecommitdiffstats
path: root/cmake/cpack_deb.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /cmake/cpack_deb.cmake
parentInitial commit. (diff)
downloadmariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz
mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/cpack_deb.cmake')
-rw-r--r--cmake/cpack_deb.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmake/cpack_deb.cmake b/cmake/cpack_deb.cmake
new file mode 100644
index 00000000..b253f8f8
--- /dev/null
+++ b/cmake/cpack_deb.cmake
@@ -0,0 +1,24 @@
+#
+# One day it'll be a complete solution for building deb packages with CPack
+# But for now it's only to make INSTALL_DOCUMENTATION function happy
+#
+IF(DEB)
+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)
+