summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunmi Ha <yunmi.ha@samsung.com>2021-01-26 14:02:46 +0900
committerYunmi Ha <yunmi.ha@samsung.com>2021-01-26 14:02:46 +0900
commite554857633022517a5ba0eb8f6148be3a4e22832 (patch)
tree0d37b95eaaabf482ccb90a894b89ef119bc9a2d3
parent7fde638ab093149443d98e13788c027161c5fe2f (diff)
downloaddevice-tw3-e554857633022517a5ba0eb8f6148be3a4e22832.tar.gz
device-tw3-e554857633022517a5ba0eb8f6148be3a4e22832.tar.bz2
device-tw3-e554857633022517a5ba0eb8f6148be3a4e22832.zip
Apply rpm macro of hal install path
Change-Id: I31124d997f53b291bf063ea2da02b000b0d5c322 Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
-rw-r--r--CMakeLists.txt4
-rw-r--r--hw/battery/CMakeLists.txt2
-rw-r--r--hw/bezel/CMakeLists.txt2
-rw-r--r--hw/display/CMakeLists.txt2
-rw-r--r--hw/external_connection/CMakeLists.txt2
-rw-r--r--hw/haptic/CMakeLists.txt2
-rw-r--r--hw/thermal/CMakeLists.txt2
-rw-r--r--hw/touchscreen/CMakeLists.txt2
-rw-r--r--hw/usb_gadget/CMakeLists.txt2
-rw-r--r--packaging/device-manager-plugin-tw3.spec6
10 files changed, 15 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6615345..50a776a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/hw/battery/CMakeLists.txt b/hw/battery/CMakeLists.txt
index 614bae4..3649f14 100644
--- a/hw/battery/CMakeLists.txt
+++ b/hw/battery/CMakeLists.txt
@@ -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)
diff --git a/hw/bezel/CMakeLists.txt b/hw/bezel/CMakeLists.txt
index ca3ec6a..ab190af 100644
--- a/hw/bezel/CMakeLists.txt
+++ b/hw/bezel/CMakeLists.txt
@@ -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)
diff --git a/hw/display/CMakeLists.txt b/hw/display/CMakeLists.txt
index bd9aa92..df86ec5 100644
--- a/hw/display/CMakeLists.txt
+++ b/hw/display/CMakeLists.txt
@@ -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)
diff --git a/hw/external_connection/CMakeLists.txt b/hw/external_connection/CMakeLists.txt
index 1164421..6f3c189 100644
--- a/hw/external_connection/CMakeLists.txt
+++ b/hw/external_connection/CMakeLists.txt
@@ -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)
diff --git a/hw/haptic/CMakeLists.txt b/hw/haptic/CMakeLists.txt
index 23a7a50..3fb9057 100644
--- a/hw/haptic/CMakeLists.txt
+++ b/hw/haptic/CMakeLists.txt
@@ -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)
diff --git a/hw/thermal/CMakeLists.txt b/hw/thermal/CMakeLists.txt
index 82f0dd2..4584579 100644
--- a/hw/thermal/CMakeLists.txt
+++ b/hw/thermal/CMakeLists.txt
@@ -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)
diff --git a/hw/touchscreen/CMakeLists.txt b/hw/touchscreen/CMakeLists.txt
index c9de46a..dbfa733 100644
--- a/hw/touchscreen/CMakeLists.txt
+++ b/hw/touchscreen/CMakeLists.txt
@@ -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)
diff --git a/hw/usb_gadget/CMakeLists.txt b/hw/usb_gadget/CMakeLists.txt
index efebc32..35e615e 100644
--- a/hw/usb_gadget/CMakeLists.txt
+++ b/hw/usb_gadget/CMakeLists.txt
@@ -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)
diff --git a/packaging/device-manager-plugin-tw3.spec b/packaging/device-manager-plugin-tw3.spec
index 779b3ae..87972b6 100644
--- a/packaging/device-manager-plugin-tw3.spec
+++ b/packaging/device-manager-plugin-tw3.spec
@@ -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*