[SPEC] fix for building emulator wearable or mobile 86/163986/1
authorLukasz Bardeli <l.bardeli@samsung.com>
Thu, 14 Dec 2017 11:06:41 +0000 (12:06 +0100)
committerLukasz Bardeli <l.bardeli@samsung.com>
Thu, 14 Dec 2017 11:06:41 +0000 (12:06 +0100)
When profile is defined this fix help build plugins on emulator

[Verification] Code complies without error. Proper modules are visible in chrome
console. All rpm's were checked if proper .so are included.

Change-Id: Idde16b44e54370a36428b76f0346282dcb2739d2
Signed-off-by: Lukasz Bardeli <l.bardeli@samsung.com>
packaging/webapi-plugins.spec

index 40f9c564d914500dee9d24d9a2366cd6eaf98b3a..78bc239523fb63a11695d58b6f68e4ce8c3e7b46 100644 (file)
@@ -655,10 +655,8 @@ webapi-plugins development headers
 
 export GYP_GENERATORS='ninja'
 
-%if "%{?unified_build}" == "1"
-# Build All Profiles
-
-# Mobile
+%if "%{?unified_build}" == "1" || "%{?profile}" == "mobile"
+# MOBILE
 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=mobile -Dprivilege_engine=%{tizen_mobile_privilege_engine}"
 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
@@ -809,8 +807,10 @@ ninja -C out/Default %{?_smp_mflags}
 pushd out
 mv Default bin_mobile_emulator
 popd
-%endif
+%endif # mobile-extension-emulator
+%endif # MOBILE
 
+%if "%{?unified_build}" == "1" || "%{?profile}" == "wearable"
 # WEARABLE
 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=wearable -Dprivilege_engine=%{tizen_wearable_privilege_engine}"
 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
@@ -957,8 +957,10 @@ ninja -C out/Default %{?_smp_mflags}
 pushd out
 mv Default bin_wearable_emulator
 popd
-%endif
+%endif # wearable-extension-emulator
+%endif # WEARABLE
 
+%if "%{?unified_build}" == "1" || "%{?profile}" == "tv"
 # TV
 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=tv -Dprivilege_engine=%{tizen_tv_privilege_engine}"
 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
@@ -1024,10 +1026,11 @@ pushd out
 mv Default bin_tv
 popd
 
-%endif
+%endif # TV
+
+%if "%{?unified_build}" == "1" || "%{?profile}" == "common" || "%{?profile}" != "ivi"
 
-# Unified: common/ Others: its own profile
-%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
+# UNIFIED / COMMON or IVI
 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=common -Dprivilege_engine=%{tizen_common_privilege_engine}"
 
 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
@@ -1086,70 +1089,10 @@ GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_common_
 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_voicecontrol_support=%{?tizen_common_feature_voicecontrol_support}"
 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ppm_support=%{?tizen_common_feature_ppm_support}"
 
-%else
-GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{profile} -Dprivilege_engine=%{tizen_privilege_engine}"
-
-GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
-GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
-
-# feature flags
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_account_support=%{?tizen_feature_account_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_alarm_support=%{?tizen_feature_alarm_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_app_control_settings_support=%{?tizen_feature_app_control_settings_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_application_support=%{?tizen_feature_application_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_archive_support=%{?tizen_feature_archive_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_badge_support=%{?tizen_feature_badge_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bluetooth_support=%{?tizen_feature_bluetooth_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bookmark_support=%{?tizen_feature_bookmark_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_calendar_support=%{?tizen_feature_calendar_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_callhistory_support=%{?tizen_feature_callhistory_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_contact_support=%{?tizen_feature_contact_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_content_support=%{?tizen_feature_content_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datacontrol_support=%{?tizen_feature_datacontrol_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datasync_support=%{?tizen_feature_datasync_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_download_support=%{?tizen_feature_download_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_exif_support=%{?tizen_feature_exif_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_feedback_support=%{?tizen_feature_feedback_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_filesystem_support=%{?tizen_feature_filesystem_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_fm_radio_support=%{?tizen_feature_fm_radio_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ham_support=%{?tizen_feature_ham_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_iotcon_support=%{?tizen_feature_iotcon_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_location_batch=%{?tizen_feature_location_batch}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_key_manager_support=%{?tizen_feature_key_manager_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_controller_support=%{?tizen_feature_media_controller_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_key_support=%{?tizen_feature_media_key_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_message_port_support=%{?tizen_feature_message_port_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_messaging_support=%{?tizen_feature_messaging_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nbs_support=%{?tizen_feature_nbs_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_emulation_support=%{?tizen_feature_nfc_emulation_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_support=%{?tizen_feature_nfc_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_notification_support=%{?tizen_feature_notification_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_package_support=%{?tizen_feature_package_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_player_util_support=%{?tizen_feature_player_util_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_power_support=%{?tizen_feature_power_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_preference_support=%{?tizen_feature_preference_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_push_support=%{?tizen_feature_push_support}"
-#GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sap_support=%{?tizen_feature_sap_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sensor_support=%{?tizen_feature_sensor_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_se_support=%{?tizen_feature_se_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sound_support=%{?tizen_feature_sound_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_feature_system_info_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_feature_system_setting_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_feature_telephony_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{?tizen_feature_time_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_feature_inputdevice_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_feature_web_setting_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_widget_service_support=%{?tizen_feature_widget_service_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_feature_wi_fi_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_feature_tvinputdevice_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_voicecontrol_support=%{?tizen_feature_voicecontrol_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ppm_support=%{?tizen_feature_ppm_support}"
-
-%endif
-
 ./tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
 
-%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
+%if "%{?unified_build}" == "1"
+# UNIFIED
 ninja -C out/Default %{?_smp_mflags}
 pushd out
 mv Default bin_common
@@ -1160,13 +1103,15 @@ ln -sf bin_common Default
 cp -R bin_common bin_ivi
 
 popd
-%else
+%else # UNIFIED
+# COMMON or IVI
 ninja -C out/Default %{?_smp_mflags}
 pushd out
 mv Default bin_%{?profile}
 ln -sf bin_%{?profile} Default
 popd
-%endif
+%endif # COMMON or IVI
+%endif # UNIFIED / COMMON or IVI
 
 %install