From 52bea549e3cd8f792f8ae670ac6de6f6d0252a86 Mon Sep 17 00:00:00 2001 From: Ranjith Ramakrishnan Date: Fri, 3 Jun 2022 14:59:16 -0700 Subject: [PATCH] : Use GNUInstallDirs Use GNUInstallDirs variables in post install scripts Change-Id: Id0e3e37d412a30521d9846082d025a9e19a43942 --- runtime/hsa-runtime/DEBIAN/Binary/postinst.in | 2 +- runtime/hsa-runtime/DEBIAN/Dev/postinst.in | 2 +- runtime/hsa-runtime/RPM/Binary/post.in | 2 +- runtime/hsa-runtime/RPM/Dev/post.in | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/hsa-runtime/DEBIAN/Binary/postinst.in b/runtime/hsa-runtime/DEBIAN/Binary/postinst.in index 3913b16be5..fc8a185689 100644 --- a/runtime/hsa-runtime/DEBIAN/Binary/postinst.in +++ b/runtime/hsa-runtime/DEBIAN/Binary/postinst.in @@ -47,7 +47,7 @@ set -e # left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build do_ldconfig() { if [ "@ENABLE_LDCONFIG@" == "ON" ]; then - echo @CPACK_PACKAGING_INSTALL_PREFIX@/lib > /etc/ld.so.conf.d/hsa-rocr.conf + echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /etc/ld.so.conf.d/hsa-rocr.conf ldconfig fi } diff --git a/runtime/hsa-runtime/DEBIAN/Dev/postinst.in b/runtime/hsa-runtime/DEBIAN/Dev/postinst.in index c184460873..ecb24158e9 100644 --- a/runtime/hsa-runtime/DEBIAN/Dev/postinst.in +++ b/runtime/hsa-runtime/DEBIAN/Dev/postinst.in @@ -48,7 +48,7 @@ case "$1" in ( configure ) # Workaround for CPACK directory symlink handling error. mkdir -p @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include - ln -sf ../../include/hsa @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include/hsa + ln -sf ../../@CMAKE_INSTALL_INCLUDEDIR@/hsa @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include/hsa ;; ( * ) exit 0 diff --git a/runtime/hsa-runtime/RPM/Binary/post.in b/runtime/hsa-runtime/RPM/Binary/post.in index 7957b7b339..59da692961 100644 --- a/runtime/hsa-runtime/RPM/Binary/post.in +++ b/runtime/hsa-runtime/RPM/Binary/post.in @@ -42,6 +42,6 @@ # left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build if [ "@ENABLE_LDCONFIG@" == "ON" ]; then - echo @CPACK_PACKAGING_INSTALL_PREFIX@/lib > /etc/ld.so.conf.d/hsa-rocr.conf + echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /etc/ld.so.conf.d/hsa-rocr.conf ldconfig fi diff --git a/runtime/hsa-runtime/RPM/Dev/post.in b/runtime/hsa-runtime/RPM/Dev/post.in index 267200af18..26b4ff3410 100644 --- a/runtime/hsa-runtime/RPM/Dev/post.in +++ b/runtime/hsa-runtime/RPM/Dev/post.in @@ -42,4 +42,4 @@ # Workaround for CPACK directory symlink handling error. mkdir -p @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include -ln -sf ../../include/hsa @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include/hsa +ln -sf ../../@CMAKE_INSTALL_INCLUDEDIR@/hsa @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include/hsa