[Spec] Fixing conditional statement while generate rpm 07/244407/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:28:23 +0000 (07:28 +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 2b94ad5f83b508d0ea52f384f29d3e8375caf0ce..6952e7f5c05289cd0c9560a170301b38bccd8cc8 100644 (file)
@@ -481,7 +481,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)
@@ -532,7 +532,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
 
@@ -540,12 +540,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
 
@@ -574,7 +574,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