hal-backend-service: Disable when profile is TV 63/320263/5
authorSangYoun Kwak <sy.kwak@samsung.com>
Wed, 26 Feb 2025 02:39:33 +0000 (11:39 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 26 Feb 2025 08:16:21 +0000 (17:16 +0900)
To disable hal-backend-service when the profile is TV, a flag is added
to the .spec file named 'enable_hal_backend_service'. If this flag is 0,
then hal-backend-service is excluded from build and install process.

Change-Id: I1e94a6745cc2f1f4fa10441cb646b95a5409d676
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
CMakeLists.txt
packaging/hal-api-common.spec

index aeec52217fe95ed0e8c9f6a95151e22f7f1665d4..77f8cae416dcfe6df3360d4ff8359f967221dd14 100644 (file)
@@ -70,10 +70,12 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${PROJECT_NAME}.pc
        DESTINATION ${LIBDIR}/pkgconfig)
 
+if (${ENABLE_HAL_BACKEND_SERVICE})
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/packaging/ DESTINATION lib/systemd/system
        FILES_MATCHING
        PATTERN "hal-backend-service.*"
        )
+endif()
 
 ADD_SUBDIRECTORY(tests)
 
@@ -81,4 +83,7 @@ ADD_SUBDIRECTORY(tools/lshal)
 if (${ENABLE_HALCC})
 ADD_SUBDIRECTORY(tools/hal-compatibility-checker)
 endif()
+
+if (${ENABLE_HAL_BACKEND_SERVICE})
 ADD_SUBDIRECTORY(hal-backend-service)
+endif()
index 9f311f2c8c72149fbdcf783466667ad4946b84d7..534a843583edee6d26009cc08a629eb1076fe52f 100644 (file)
@@ -3,8 +3,10 @@
 %define test_name      hal-api-common-haltests
 %if "%{tizen_profile_name}" != "tv" && "%{mv_prj}" != "1"
 %define enable_halcc 1
+%define enable_hal_backend_service 1
 %else
 %define enable_halcc 0
+%define enable_hal_backend_service 0
 %endif
 
 ### main package #########
@@ -68,6 +70,7 @@ Haltests for hal-api-common
 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
        -DCMAKE_LIBDIR_PREFIX=%{_libdir} \
        -DENABLE_HALCC=%{enable_halcc} \
+       -DENABLE_HAL_BACKEND_SERVICE=%{enable_hal_backend_service} \
        -DENABLE_DLOG=1
 
 %build
@@ -95,11 +98,11 @@ install -D -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/haltest.target
 install -D -m 0755 %{SOURCE7} %{buildroot}%{_bindir}/reboot-haltest
 install -D -m 0755 %{SOURCE8} %{buildroot}%{_bindir}/reboot-normal
 install -D -m 0755 %{SOURCE9} %{buildroot}%{_datadir}/upgrade/scripts/500.%{name}.sh
-#install -D -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/hal-backend-service.socket
-#install -D -m 0644 %{SOURCE12} %{buildroot}%{_unitdir}/hal-backend-service.service
 
+%if %{enable_hal_backend_service}
 %install_service sockets.target.wants hal-backend-service.socket
 %install_service basic.target.wants hal-backend-service.service
+%endif
 
 %clean
 rm -rf %{buildroot}
@@ -128,11 +131,13 @@ rm -f %{_unitdir}/sysinit.target.wants/hal-compatibility-checker.service
 %{_tmpfilesdir}/hal-compatibility-checker.conf
 %endif
 %{_datadir}/upgrade/scripts/500.%{name}.sh
+%if %{enable_hal_backend_service}
 %{_bindir}/hal-backend-service
 %{_unitdir}/sockets.target.wants/hal-backend-service.socket
 %{_unitdir}/basic.target.wants/hal-backend-service.service
 %{_unitdir}/hal-backend-service.socket
 %{_unitdir}/hal-backend-service.service
+%endif
 
 %files -n %{devel_name}
 %defattr(-,root,root,-)