Apply rpm macro of hal install path
authorlokilee73 <changjoo.lee@samsung.com>
Tue, 26 Jan 2021 04:26:20 +0000 (13:26 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Tue, 26 Jan 2021 04:55:16 +0000 (13:55 +0900)
Change-Id: I172ed017a72f4f7e73711e1b641a24e5678c5fc3
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
CMakeLists.txt
hw/battery/CMakeLists.txt
hw/board/CMakeLists.txt
hw/display/CMakeLists.txt
hw/external_connection/CMakeLists.txt
hw/ir/CMakeLists.txt
hw/led/CMakeLists.txt
hw/thermal/CMakeLists.txt
hw/touchscreen/CMakeLists.txt
hw/usb_gadget/CMakeLists.txt
packaging/device-manager-plugin-sc7730.spec

index 4d65860..6d716e1 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(device-manager-sc7730 C)
+PROJECT(device-manager-plugin-sc7730 C)
 
 SET(CMAKE_VERBOSE_MAKEFILE OFF)
 
@@ -11,6 +11,8 @@ IF(ENABLE_DLOG STREQUAL on)
        ADD_DEFINITIONS("-DFEATURE_DLOG")
 ENDIF()
 
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.Apache-2.0 DESTINATION ${HAL_LICENSE_DIR}/${PROJECT_NAME})
+
 ADD_SUBDIRECTORY(hw/battery)
 ADD_SUBDIRECTORY(hw/display)
 ADD_SUBDIRECTORY(hw/led)
index 614bae4..3649f14 100644 (file)
@@ -17,4 +17,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE battery.c ../udev.c)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${hal-backend-device-battery_pkgs_LDFLAGS})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index 9ed63d3..b18358f 100644 (file)
@@ -17,4 +17,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE board.c)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${hal-backend-device-board_pkgs_LDFLAGS})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index 44639b7..49eee92 100644 (file)
@@ -17,4 +17,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE display.c)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${hal-backend-device-display_pkgs_LDFLAGS})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index 1164421..6f3c189 100644 (file)
@@ -17,4 +17,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE external_connection.c ../udev.c)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${hal-backend-device-external-connection_pkgs_LDFLAGS})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index 97baed8..4478493 100644 (file)
@@ -14,4 +14,4 @@ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE ir.c)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index 811a279..9457c9a 100644 (file)
@@ -14,4 +14,4 @@ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE led.c)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index 82f0dd2..4584579 100644 (file)
@@ -17,4 +17,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE thermal.c ../udev.c)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${hal-backend-device-thermal_pkgs_LDFLAGS})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index c9de46a..dbfa733 100644 (file)
@@ -17,4 +17,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE touchscreen.c)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${hal-backend-device-touchscreen_pkgs_LDFLAGS})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index efebc32..35e615e 100644 (file)
@@ -17,4 +17,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE usb_gadget.c)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${hal-backend-device-usb-gadget_pkgs_LDFLAGS})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index d2c19d4..db7e9cd 100644 (file)
@@ -27,7 +27,9 @@ cp %{SOURCE1} .
 %build
 %cmake \
        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-       -DENABLE_DLOG=on \
+       -DHAL_LIB_DIR=%{_hal_libdir} \
+       -DHAL_LICENSE_DIR=%{_hal_licensedir} \
+       -DENABLE_DLOG=on
 
 make %{?jobs:-j%jobs}
 
@@ -44,7 +46,7 @@ install -m 644 rules/61-video.rules %{buildroot}%{_prefix}/lib/udev/rules.d
 %postun -p /sbin/ldconfig
 
 %files
-/hal/lib/*.so*
+%{_hal_libdir}/*.so*
 %manifest %{name}.manifest
-%license LICENSE.Apache-2.0
+%{_hal_licensedir}/%{name}/LICENSE.Apache-2.0
 %{_prefix}/lib/udev/rules.d/61-video.rules