[Spec] Fixing conditional statement while generate rpm 03/244403/1
authorLukasz Bardeli <l.bardeli@samsung.com>
Fri, 4 Sep 2020 10:39:26 +0000 (12:39 +0200)
committerPiotr Kosko <p.kosko@samsung.com>
Fri, 18 Sep 2020 07:15:16 +0000 (07:15 +0000)
At begining of spec file emulator feature flags are defined.
If any profile parameter was passed to spec file from command line then if statement
with emultor feature flag were always true.

[Verification] Code compiles without error

Change-Id: I83a82334e9f4655590fd96c1fc558e1888cb928d
(cherry picked from commit 46ed227bbc81256cc3d88fed2995e70f2659131e)

packaging/webapi-plugins.spec

index 409b0fc..86ee75e 100644 (file)
@@ -483,7 +483,7 @@ BuildRequires: pkgconfig(capi-data-control)
 BuildRequires: pkgconfig(capi-web-url-download)
 %endif
 
-%if "%{?tizen_feature_ham_support}" == "1" || "%{?unified_build}" == "1" || "%{?tizen_mobile_emulator_feature_ham_support}" == "1"
+%if "%{?tizen_feature_ham_support}" == "1" || "%{?unified_build}" == "1" || ("%{?profile}" == "mobile" && "%{?tizen_mobile_emulator_feature_ham_support}" == "1")
 BuildRequires: pkgconfig(motion)
 BuildRequires: pkgconfig(capi-system-sensor)
 BuildRequires: pkgconfig(capi-location-manager)
@@ -534,7 +534,7 @@ BuildRequires:  pkgconfig(calendar-service2)
 BuildRequires:  pkgconfig(contacts-service2)
 %endif
 
-%if "%{?tizen_feature_callhistory_support}" == "1" || "%{?unified_build}" == "1" || "%{?tizen_mobile_emulator_feature_callhistory_support}" == "1" || "%{?tizen_wearable_emulator_feature_callhistory_support}" == "1"
+%if "%{?tizen_feature_callhistory_support}" == "1" || "%{?unified_build}" == "1" || ("%{?profile}" == "mobile" && "%{?tizen_mobile_emulator_feature_callhistory_support}" == "1") || ("%{?profile}" == "wearable" && "%{?tizen_wearable_emulator_feature_callhistory_support}" == "1")
 BuildRequires:  pkgconfig(contacts-service2)
 %endif
 
@@ -542,12 +542,12 @@ BuildRequires:  pkgconfig(contacts-service2)
 BuildRequires:  pkgconfig(libexif)
 %endif
 
-%if "%{?tizen_feature_nfc_support}" == "1" || "%{?unified_build}" == "1" || "%{?tizen_mobile_emulator_feature_nfc_support}" == "1"
+%if "%{?tizen_feature_nfc_support}" == "1" || "%{?unified_build}" == "1" || ("%{?profile}" == "mobile" && "%{?tizen_mobile_emulator_feature_nfc_support}" == "1")
 BuildRequires:  pkgconfig(capi-network-nfc)
 BuildRequires:  pkgconfig(capi-appfw-app-control)
 %endif
 
-%if "%{?tizen_feature_fm_radio_support}" == "1" || "%{?unified_build}" == "1" || "%{?tizen_mobile_emulator_feature_fm_radio_support}" == "1"
+%if "%{?tizen_feature_fm_radio_support}" == "1" || "%{?unified_build}" == "1" || ("%{?profile}" == "mobile" && "%{?tizen_mobile_emulator_feature_fm_radio_support}" == "1")
 BuildRequires: pkgconfig(capi-media-radio)
 %endif
 
@@ -576,7 +576,7 @@ BuildRequires: pkgconfig(capi-appfw-preference)
 BuildRequires:  pkgconfig(capi-media-sound-manager)
 %endif
 
-%if "%{?tizen_feature_sensor_support}" == "1" || "%{?unified_build}" == "1" || "%{?tizen_wearable_emulator_feature_sensor_support}" == "1"
+%if "%{?tizen_feature_sensor_support}" == "1" || "%{?unified_build}" == "1" || ("%{?profile}" == "wearable" && "%{?tizen_wearable_emulator_feature_sensor_support}" == "1")
 BuildRequires: pkgconfig(capi-system-sensor)
 %endif