Apply rpm macro of hal install path
authorYunmi Ha <yunmi.ha@samsung.com>
Tue, 26 Jan 2021 05:02:46 +0000 (14:02 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Tue, 26 Jan 2021 05:02:46 +0000 (14:02 +0900)
Change-Id: I31124d997f53b291bf063ea2da02b000b0d5c322
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
CMakeLists.txt
hw/battery/CMakeLists.txt
hw/bezel/CMakeLists.txt
hw/display/CMakeLists.txt
hw/external_connection/CMakeLists.txt
hw/haptic/CMakeLists.txt
hw/thermal/CMakeLists.txt
hw/touchscreen/CMakeLists.txt
hw/usb_gadget/CMakeLists.txt
packaging/device-manager-plugin-tw3.spec

index 6615345..50a776a 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(device-manager-tw3 C)
+PROJECT(device-manager-plugin-tw3 C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
@@ -9,6 +9,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/external_connection)
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 ca3ec6a..ab190af 100644 (file)
@@ -17,4 +17,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ADD_LIBRARY(${PROJECT_NAME} MODULE bezel.c)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${hal-backend-device-bezel_pkgs_LDFLAGS})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /hal/lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
index bd9aa92..df86ec5 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 23a7a50..3fb9057 100644 (file)
@@ -21,4 +21,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 ADD_LIBRARY(${PROJECT_NAME} MODULE standard.c)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${haptic_pkgs_LDFLAGS})
 
-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 779b3ae..87972b6 100644 (file)
@@ -29,6 +29,8 @@ cp %{SOURCE1} .
 
 %build
 %cmake . -DENABLE_DLOG=on \
+       -DHAL_LIB_DIR=%{_hal_libdir} \
+       -DHAL_LICENSE_DIR=%{_hal_licensedir}
 
 make %{?jobs:-j%jobs}
 
@@ -43,5 +45,5 @@ make %{?jobs:-j%jobs}
 
 %files
 %manifest %{name}.manifest
-%license LICENSE.Apache-2.0
-/hal/lib/*.so*
+%{_hal_licensedir}/%{name}/LICENSE.Apache-2.0
+%{_hal_libdir}/*.so*