Blame SOURCES/mariadb-scripts.patch

a41a5b
We have some downstream patches and other scripts that include variables to
a41a5b
be expanded by cmake. Cmake needs to know about them, so adding them manually.
a41a5b
a41a5b
 # Install libgcc as  mylibgcc.a
a41a5b
--- mariadb-10.5.5/scripts/CMakeLists.txt.old	2020-09-24 10:13:35.272589689 +0200
a41a5b
+++ mariadb-10.5.5/scripts/CMakeLists.txt	2020-09-24 10:17:31.428985798 +0200
a41a5b
@@ -377,6 +377,34 @@
a41a5b
       INSTALL_LINK(${file} ${binname} ${INSTALL_BINDIR} ${${file}_COMPONENT})
a41a5b
     ENDIF()
a41a5b
   ENDFOREACH()
a41a5b
+
a41a5b
+  # files for systemd
a41a5b
+  SET(SYSTEMD_SCRIPTS
a41a5b
+    mysql.tmpfiles.d
a41a5b
+    mysql.service
a41a5b
+    mysql@.service
a41a5b
+    mysql-prepare-db-dir
a41a5b
+    mysql-check-socket
a41a5b
+    mysql-check-upgrade
a41a5b
+    mysql-scripts-common
a41a5b
+    mysql_config_multilib
a41a5b
+    clustercheck
a41a5b
+    galera_new_cluster
a41a5b
+    my.cnf
a41a5b
+  )
a41a5b
+  FOREACH(file ${SYSTEMD_SCRIPTS})
a41a5b
+    IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
a41a5b
+      CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
a41a5b
+        ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
a41a5b
+    ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in)
a41a5b
+      CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.in
a41a5b
+        ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
a41a5b
+    ELSE()
a41a5b
+      MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file}.in in "
a41a5b
+        "${CMAKE_CURRENT_SOURCE_DIR}" )
a41a5b
+    ENDIF()
a41a5b
+  ENDFOREACH()
a41a5b
+
a41a5b
 ENDIF()
a41a5b
 
a41a5b
 # Install libgcc as  mylibgcc.a