File 422.patch of Package ckb-next
https://github.com/ckb-next/ckb-next/pull/422
From 257d39dc187f818c6c77a7fb50b994eaa613cbb1 Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Wed, 29 May 2019 05:28:33 +0200
Subject: [PATCH] Do not prepend /usr to libexecdir
Fix #276
Without this patch, compiling with -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir}
expanded this to /usr//usr/lib/ckb-next-animations
and there is no rpm macro to have libexecdir without /usr
but we need to use these macros to be able to use the same .spec file
across distributions (Fedora has /usr/libexec and openSUSE has /usr/lib )
This matches usage in src/daemon/CMakeLists.txt
diff -Naur ckb-next-0.6.0.orig/src/ckbnextconfig.h.in ckb-next-0.6.0/src/ckbnextconfig.h.in
--- ckb-next-0.6.0.orig/src/ckbnextconfig.h.in 2023-06-22 23:07:29.000000000 +0200
+++ ckb-next-0.6.0/src/ckbnextconfig.h.in 2023-06-25 11:15:37.424689978 +0200
@@ -1,5 +1,5 @@
#define CKB_NEXT_VERSION_STR "${ckb-next_VERSION}"
-#define CKB_NEXT_ANIMATIONS_PATH "${CMAKE_INSTALL_PREFIX}/${INSTALL_DIR_ANIMATIONS}"
+#define CKB_NEXT_ANIMATIONS_PATH "${INSTALL_DIR_ANIMATIONS}"
#define CKB_NEXT_UTILITIES_PATH "${CMAKE_INSTALL_PREFIX}/${INSTALL_DIR_UTILITIES}"
#define CKB_NEXT_PROFILE_VER ${ckb-next_PROFILE_VER}
diff -Naur ckb-next-0.6.0.orig/src/CMakeLists.txt ckb-next-0.6.0/src/CMakeLists.txt
--- ckb-next-0.6.0.orig/src/CMakeLists.txt 2023-06-22 23:07:29.000000000 +0200
+++ ckb-next-0.6.0/src/CMakeLists.txt 2023-06-25 11:16:37.568637199 +0200
@@ -27,7 +27,7 @@
# Export version, etc. to source code
set(CKB_NEXT_VERSION_STR "${ckb-next_VERSION}")
-set(CKB_NEXT_ANIMATIONS_PATH "${CMAKE_INSTALL_PREFIX}/${INSTALL_DIR_ANIMATIONS}")
+set(CKB_NEXT_ANIMATIONS_PATH "${INSTALL_DIR_ANIMATIONS}")
configure_file(
${CMAKE_CURRENT_LIST_DIR}/ckbnextconfig.h.in
${CMAKE_BINARY_DIR}/ckbnextconfig.h)