From 306fbd503bd969671c532bec3ef99477396f6cd5 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Tue, 2 Mar 2021 18:19:12 +0400 Subject: [PATCH] Write debian and rpm scripts to "data" directory, not build directory. --- data/CMakeLists.txt | 8 ++++---- data/cpack_options.cmake | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 6dc6fd4..0b31a80 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -21,11 +21,11 @@ configure_file("gsmartcontrol.in.desktop" "gsmartcontrol.desktop" ESCAPE_QUOTES configure_file("gsmartcontrol-root.in.sh" "gsmartcontrol-root.sh" ESCAPE_QUOTES @ONLY) configure_file("org.gsmartcontrol.in.policy" "gsmartcontrol.policy" ESCAPE_QUOTES @ONLY) -configure_file("debian-postinst.in.sh" "${CMAKE_BINARY_DIR}/postinst" ESCAPE_QUOTES @ONLY) -configure_file("debian-postrm.in.sh" "${CMAKE_BINARY_DIR}/postrm" ESCAPE_QUOTES @ONLY) +configure_file("debian-postinst.in.sh" "${CMAKE_CURRENT_BINARY_DIR}/postinst" ESCAPE_QUOTES @ONLY) +configure_file("debian-postrm.in.sh" "${CMAKE_CURRENT_BINARY_DIR}/postrm" ESCAPE_QUOTES @ONLY) -configure_file("rpm-post-install.in.sh" "${CMAKE_BINARY_DIR}/rpm-post-install.sh" ESCAPE_QUOTES @ONLY) -configure_file("rpm-post-uninstall.in.sh" "${CMAKE_BINARY_DIR}/rpm-post-uninstall.sh" ESCAPE_QUOTES @ONLY) +configure_file("rpm-post-install.in.sh" "${CMAKE_CURRENT_BINARY_DIR}/rpm-post-install.sh" ESCAPE_QUOTES @ONLY) +configure_file("rpm-post-uninstall.in.sh" "${CMAKE_CURRENT_BINARY_DIR}/rpm-post-uninstall.sh" ESCAPE_QUOTES @ONLY) # Install app icons foreach(dir 16 22 24 32 48 64 128 256) diff --git a/data/cpack_options.cmake b/data/cpack_options.cmake index 40413eb..e7e054d 100644 --- a/data/cpack_options.cmake +++ b/data/cpack_options.cmake @@ -141,8 +141,8 @@ endif() #configure_file("${CMAKE_SOURCE_DIR}/data/package_data/rpm-post-uninstall.in.sh" "${CMAKE_BINARY_DIR}/rpm-post-uninstall #.sh" ESCAPE_QUOTES @ONLY) # -#set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/rpm-post-install.sh") -#set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/rpm-post-uninstall.sh") +#set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/data/rpm-post-install.sh") +#set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/data/rpm-post-uninstall.sh") @@ -163,7 +163,7 @@ endif() #configure_file("${CMAKE_SOURCE_DIR}/data/package_data/debian-postrm.in.sh" # "${CMAKE_BINARY_DIR}/postrm" ESCAPE_QUOTES @ONLY) # -#set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/postinst;${CMAKE_BINARY_DIR}/postrm") +#set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/data/postinst;${CMAKE_BINARY_DIR}/data/postrm") # All CPack variables must be set before this