From d4ac7e6cf169077f26d69c2da5151334a4f6b738 Mon Sep 17 00:00:00 2001 From: Jaemin Ryu Date: Thu, 26 Jul 2018 15:22:50 +0900 Subject: [PATCH] Change plugin path to %{_libdir}/dpm/plugins Change-Id: I8ee4189603c5667825b654cec355562edfb336c4 Signed-off-by: Jaemin Ryu --- CMakeLists.txt | 4 ++++ packaging/dpm-security.spec | 3 ++- plugin/CMakeLists.txt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1c3c70..038da38 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,10 @@ IF(NOT DEFINED SYSTEMD_UNIT_INSTALL_DIR) SET(SYSTEMD_UNIT_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system") ENDIF(NOT DEFINED SYSTEMD_UNIT_INSTALL_DIR) +IF(NOT DEFINED PLUGIN_INSTALL_DIR) + SET(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/dpm/plugins") +ENDIF(NOT DEFINED PLUGIN_INSTALL_DIR) + ADD_DEFINITIONS(-DUG_WAYLAND) ADD_SUBDIRECTORY(${DPM_PLUGIN}) diff --git a/packaging/dpm-security.spec b/packaging/dpm-security.spec index dcb8f62..6afe529 100755 --- a/packaging/dpm-security.spec +++ b/packaging/dpm-security.spec @@ -22,7 +22,7 @@ The dpm-security package provides security policy module for device policy manag %files %manifest dpm-security.manifest %defattr(644,root,root,755) -%attr(755,root,root) /opt/data/dpm/plugins/security +%attr(755,root,root) %{_libdir}/dpm/plugins/security %attr(755,root,root) %{_libdir}/libdpm-security.so.%{version} %{_libdir}/libdpm-security.so.0 @@ -39,6 +39,7 @@ The dpm-security package provides security policy module for device policy manag %cmake . -DVERSION=%{version} \ -DCMAKE_BUILD_TYPE=%{build_type} \ + -DPLUGIN_INSTALL_DIR=%{_libdir}/dpm/plugins \ -DSCRIPT_INSTALL_DIR=%{_scriptdir} \ -DSYSTEMD_UNIT_INSTALL_DIR=%{_unitdir} \ -DDATA_INSTALL_DIR=%{TZ_SYS_DATA}/dpm \ diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt index c23755d..473808b 100755 --- a/plugin/CMakeLists.txt +++ b/plugin/CMakeLists.txt @@ -32,4 +32,4 @@ SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS "-fvisibility=default") INCLUDE_DIRECTORIES(SYSTEM ${PLUGIN_DEPS_INCLUDE_DIRS}) TARGET_LINK_LIBRARIES(${TARGET} ${PLUGIN_DEPS_LIBRARIES}) -INSTALL(FILES libdpm-plugin-security.so RENAME security DESTINATION /opt/data/dpm/plugins) +INSTALL(FILES libdpm-plugin-security.so RENAME security DESTINATION ${PLUGIN_INSTALL_DIR}) -- 2.7.4