From acb4c4876dcb34b068bf3732f5075778a2efe366 Mon Sep 17 00:00:00 2001 From: SangYoun Kwak Date: Fri, 15 Nov 2024 20:02:03 +0900 Subject: Modify build profile checking conditions To increase readability and maintainability, variable is defined with a name that clearly shows their role. Variables are: * WITH_VD: 1 if the build profile is vd, else 0 * WITH_VD_MV: 1 if the build profile is mv, else 0 Change-Id: I016a224bcc4309df4a39db3219a5618c9cfd1a5a Signed-off-by: SangYoun Kwak --- packaging/hal-rootstrap-data-common.spec | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/packaging/hal-rootstrap-data-common.spec b/packaging/hal-rootstrap-data-common.spec index 0cf6ae7..889a795 100644 --- a/packaging/hal-rootstrap-data-common.spec +++ b/packaging/hal-rootstrap-data-common.spec @@ -7,6 +7,18 @@ %define WITH_DA 0 %endif +%if "%{tizen_profile_name}" == "tv" +%define WITH_VD 1 +%else +%define WITH_VD 0 +%endif + +%if "%{mv_prj}" == "1" +%define WITH_VD_MV 1 +%else +%define WITH_VD_MV 0 +%endif + Name: %{name} Summary: %{desc} Version: 0.1.0 @@ -148,7 +160,7 @@ BuildRequires: pkgconfig(hal-api-tbm) Requires: pkgconfig(hal-api-tdm) BuildRequires: pkgconfig(hal-api-tdm) -%if "%{tizen_profile_name}" != "tv" && "%{mv_prj}" != "1" +%if "%{WITH_VD}" == "0" && "%{WITH_VD_MV}" == "0" Requires: glibc BuildRequires: glibc Requires: glibc-devel @@ -208,7 +220,7 @@ mkdir %{buildroot} mkdir -p %{buildroot}/tmp ls -al cp -R ./rs_resource %{buildroot}/tmp -%if "%{tizen_profile_name}" == "tv" || "%{mv_prj}" == "1" +%if "%{WITH_VD}" == "1" || "%{WITH_VD_MV}" == "1" rm -f %{buildroot}/tmp/rs_resource/common/NativeAPI/capi-system-peripheral-io-rs.xml rm -f %{buildroot}/tmp/rs_resource/common/HAL/hal-api-bluetooth-rs.xml rm -f %{buildroot}/tmp/rs_resource/common/HAL/hal-api-location-rs.xml -- cgit v1.2.3