Change plugin path to %{_libdir}/dpm/plguins 05/185105/4
authorJaemin Ryu <jm77.ryu@samsung.com>
Thu, 26 Jul 2018 06:09:25 +0000 (15:09 +0900)
committerJaemin Ryu <jm77.ryu@samsung.com>
Tue, 18 Dec 2018 00:12:50 +0000 (09:12 +0900)
Change-Id: Ie4f2e02a8674a063d6a8971f0dde8f4033bca23a
Signed-off-by: Jaemin Ryu <jm77.ryu@samsung.com>
CMakeLists.txt
packaging/dpm-auth.spec
plugin/CMakeLists.txt

index b738b49..82899b3 100755 (executable)
@@ -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})
index c54fe99..81f4ab7 100755 (executable)
@@ -20,7 +20,7 @@ The dpm-auth package provides authentication policy module for device policy man
 %files
 %manifest dpm-auth.manifest
 %defattr(644,root,root,755)
-%attr(755,root,root) /opt/data/dpm/plugins/auth
+%attr(755,root,root) %{_libdir}/dpm/plugins/auth
 %attr(755,root,root) %{_libdir}/libdpm-auth.so.%{version}
 %{_libdir}/libdpm-auth.so.0
 
@@ -37,6 +37,7 @@ The dpm-auth package provides authentication policy module for device policy man
 
 %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 \
index 2a441c7..1df6564 100755 (executable)
@@ -33,4 +33,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-auth.so RENAME auth DESTINATION /opt/data/dpm/plugins)
+INSTALL(FILES libdpm-plugin-auth.so RENAME auth DESTINATION ${PLUGIN_INSTALL_DIR})