Modify build profile checking conditions 35/320535/1 accepted/tizen/9.0/unified/20241119.052003
authorSangYoun Kwak <sy.kwak@samsung.com>
Fri, 15 Nov 2024 11:02:03 +0000 (20:02 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Mon, 18 Nov 2024 06:46:08 +0000 (15:46 +0900)
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 <sy.kwak@samsung.com>
packaging/hal-rootstrap-data-common.spec

index 0cf6ae7e57bb2346ac9885b33dd8348e5aa1d83e..889a7959af806ca2f01f8c35d802f63b4f50b18b 100644 (file)
@@ -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