[Spec] Fixing conditional statement while generate rpm
[platform/core/api/webapi-plugins.git] / packaging / webapi-plugins.spec
1 %bcond_with wayland
2
3 %define _manifestdir %{TZ_SYS_RW_PACKAGES}
4 %define _desktop_icondir %{TZ_SYS_SHARE}/icons/default/small
5
6 %define crosswalk_extensions tizen-extensions-crosswalk
7
8 %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions}
9 %define tizen_ut_build 0
10
11
12 Name:       webapi-plugins
13 Version:    2.72
14 Release:    0
15 License:    Apache-2.0 and BSD-3-Clause and MIT
16 Group:      Development/Libraries
17 Summary:    Tizen Web APIs implemented
18 Source0:    %{name}-%{version}.tar.gz
19
20 ####################################################################
21 #       Common Profile : artik                                     #
22 ####################################################################
23
24 %define tizen_common_privilege_engine                        CYNARA
25
26 %define tizen_common_feature_account_support                 0
27 %define tizen_common_feature_alarm_support                   1
28 %define tizen_common_feature_app_control_settings_support    1
29 %define tizen_common_feature_application_support             1
30 %define tizen_common_feature_archive_support                 0
31 %define tizen_common_feature_badge_support                   0
32 %define tizen_common_feature_bluetooth_support               1
33 %define tizen_common_feature_calendar_support                0
34 %define tizen_common_feature_callhistory_support             0
35 %define tizen_common_feature_contact_support                 0
36 %define tizen_common_feature_content_support                 1
37 %define tizen_common_feature_datacontrol_support             0
38 %define tizen_common_feature_datasync_support                0
39 %define tizen_common_feature_download_support                1
40 %define tizen_common_feature_exif_support                    1
41 %define tizen_common_feature_feedback_support                0
42 %define tizen_common_feature_filesystem_support              1
43 %define tizen_common_feature_fm_radio_support                0
44 %define tizen_common_feature_ham_support                     0
45 %define tizen_common_feature_inputdevice_support             0
46 %define tizen_common_feature_iotcon_support                  0
47 %define tizen_common_feature_key_manager_support             0
48 %define tizen_common_feature_location_batch                  0
49 %define tizen_common_feature_media_controller_support        0
50 %define tizen_common_feature_media_key_support               0
51 %define tizen_common_feature_message_port_support            1
52 %define tizen_common_feature_messaging_support               0
53 %define tizen_common_feature_metadata_support      1
54 %define tizen_common_feature_nbs_support                     0
55 %define tizen_common_feature_nfc_support                     0
56 %define tizen_common_feature_nfc_emulation_support           0
57 %define tizen_common_feature_notification_support            0
58 %define tizen_common_feature_package_support                 1
59 %define tizen_common_feature_player_util_support             0
60 %define tizen_common_feature_power_support                   0
61 %define tizen_common_feature_ppm_support                     0
62 %define tizen_common_feature_preference_support              0
63 %define tizen_common_feature_push_support                    0
64 %define tizen_common_feature_se_support                      0
65 %define tizen_common_feature_sensor_support                  0
66 %define tizen_common_feature_sound_support                   1
67 %define tizen_common_feature_system_info_support             1
68 %define tizen_common_feature_system_setting_support          0
69 %define tizen_common_feature_telephony_support               0
70 %define tizen_common_feature_time_support                    1
71 %define tizen_common_feature_tvinputdevice_support           0
72 %define tizen_common_feature_voicecontrol_support            0
73 %define tizen_common_feature_web_setting_support             0
74 %define tizen_common_feature_wi_fi_support                   1
75 %define tizen_common_feature_widget_service_support          0
76
77 ####################################################################
78 #       Mobile Profile :  TM1(32bit), Redwood(SM-Z910F), KIRAN(Z130H)          #
79 #                         TM2(64bit)
80 ####################################################################
81
82 %define tizen_mobile_privilege_engine                        CYNARA
83
84 %define tizen_mobile_feature_account_support                 1
85 %define tizen_mobile_feature_alarm_support                   1
86 %define tizen_mobile_feature_app_control_settings_support    1
87 %define tizen_mobile_feature_application_support             1
88 %define tizen_mobile_feature_archive_support                 1
89 %define tizen_mobile_feature_badge_support                   1
90 %define tizen_mobile_feature_bluetooth_support               1
91 %define tizen_mobile_feature_calendar_support                1
92 %define tizen_mobile_feature_contact_support                 1
93 %define tizen_mobile_feature_content_support                 1
94 %define tizen_mobile_feature_datacontrol_support             1
95 %define tizen_mobile_feature_datasync_support                0
96 %define tizen_mobile_feature_download_support                1
97 %define tizen_mobile_feature_exif_support                    1
98 %define tizen_mobile_feature_feedback_support                1
99 %define tizen_mobile_feature_filesystem_support              1
100
101 %ifarch aarch64
102 %define tizen_mobile_feature_fm_radio_support                0
103 %else
104 %define tizen_mobile_feature_fm_radio_support                1
105 %endif
106
107 %define tizen_mobile_feature_ham_support                     0
108 %define tizen_mobile_feature_inputdevice_support             1
109 %define tizen_mobile_feature_iotcon_support                  1
110 %define tizen_mobile_feature_key_manager_support             1
111 %define tizen_mobile_feature_location_batch                  0
112 %define tizen_mobile_feature_media_controller_support        1
113 %define tizen_mobile_feature_media_key_support               1
114 %define tizen_mobile_feature_message_port_support            1
115 %define tizen_mobile_feature_messaging_support               1
116 %define tizen_mobile_feature_metadata_support      1
117 %define tizen_mobile_feature_nfc_support                     0
118 %define tizen_mobile_feature_nfc_emulation_support           0
119 %define tizen_mobile_feature_notification_support            1
120 %define tizen_mobile_feature_package_support                 1
121 %define tizen_mobile_feature_player_util_support             1
122 %define tizen_mobile_feature_power_support                   1
123 %define tizen_mobile_feature_ppm_support                     1
124 %define tizen_mobile_feature_preference_support              1
125 %define tizen_mobile_feature_push_support                    1
126
127 # secure element feature
128 %ifarch aarch64
129 %define tizen_mobile_feature_se_support                      0
130 %else
131 %define tizen_mobile_feature_se_support                      1
132 %endif
133
134 %define tizen_mobile_feature_sensor_support                  1
135 %define tizen_mobile_feature_sound_support                   1
136 %define tizen_mobile_feature_system_info_support             1
137 %define tizen_mobile_feature_system_setting_support          1
138
139 # telephony feature
140 %ifarch aarch64
141 %define tizen_mobile_feature_telephony_support               0
142 %define tizen_mobile_feature_callhistory_support             0
143 %define tizen_mobile_feature_nbs_support                     0
144 %else
145 %define tizen_mobile_feature_telephony_support               1
146 %define tizen_mobile_feature_callhistory_support             1
147 %define tizen_mobile_feature_nbs_support                     1
148 %endif
149
150 %define tizen_mobile_feature_time_support                    1
151 %define tizen_mobile_feature_tvinputdevice_support           0
152 %define tizen_mobile_feature_voicecontrol_support            1
153 %define tizen_mobile_feature_web_setting_support             1
154 %define tizen_mobile_feature_wi_fi_support                   1
155 %define tizen_mobile_feature_widget_service_support          1
156
157 ## Mobile emulator
158
159 %define tizen_mobile_emulator_feature_bluetooth_support      0
160
161 # FM radio feature
162 %define tizen_mobile_emulator_feature_fm_radio_support       1
163
164 %define tizen_mobile_emulator_feature_ham_support            1
165 %define tizen_mobile_emulator_feature_media_key_support      0
166 %define tizen_mobile_emulator_feature_nfc_support            1
167 %define tizen_mobile_emulator_feature_nfc_emulation_support  0
168
169 # secure element feature
170 %define tizen_mobile_emulator_feature_se_support             0
171
172 # telephony feature
173 %define tizen_mobile_emulator_feature_telephony_support      1
174 %define tizen_mobile_emulator_feature_callhistory_support    1
175 %define tizen_mobile_emulator_feature_nbs_support            1
176
177 %define tizen_mobile_emulator_feature_wi_fi_support          0
178
179 ####################################################################
180 #       Wearable Profile :  B2 / TW2                      #
181 ####################################################################
182
183 %define tizen_wearable_privilege_engine                        CYNARA
184
185 # Account API is optional in Tizen Wearable Profile.
186 %define tizen_wearable_feature_account_support                 1
187
188 %define tizen_wearable_feature_alarm_support                   1
189 %define tizen_wearable_feature_app_control_settings_support    1
190 %define tizen_wearable_feature_application_support             1
191
192 # Archive API is optional in Tizen Wearable Profile.
193 %define tizen_wearable_feature_archive_support                 1
194
195 # Badge API is mandatory in Tizen Wearable Profile.
196 %define tizen_wearable_feature_badge_support                   1
197
198 %define tizen_wearable_feature_bluetooth_support               1
199
200 # Calendar API is mandatory in Tizen Wearable Profile.
201 %define tizen_wearable_feature_calendar_support                1
202 %define tizen_wearable_feature_contact_support                 1
203 %define tizen_wearable_feature_content_support                 1
204 %define tizen_wearable_feature_datacontrol_support             1
205 %define tizen_wearable_feature_datasync_support                0
206 %define tizen_wearable_feature_download_support                1
207 %define tizen_wearable_feature_exif_support                    1
208 %define tizen_wearable_feature_feedback_support                1
209 %define tizen_wearable_feature_filesystem_support              1
210 %define tizen_wearable_feature_fm_radio_support                0
211 %define tizen_wearable_feature_ham_support                     1
212 %define tizen_wearable_feature_inputdevice_support             1
213 %define tizen_wearable_feature_iotcon_support                  1
214 %define tizen_wearable_feature_key_manager_support             1
215 %define tizen_wearable_feature_location_batch                  0
216 %define tizen_wearable_feature_media_controller_support        1
217
218 # MediayKey API is optional in Tizen Wearable Profile.
219 # tizen.org/feature/network.bluetooth.audio.media is required for MediayKey API
220 %define tizen_wearable_feature_media_key_support               1
221 %define tizen_wearable_feature_message_port_support            1
222 %define tizen_wearable_feature_messaging_support               0
223 %define tizen_wearable_feature_metadata_support      1
224 %define tizen_wearable_feature_nfc_support                     1
225 %define tizen_wearable_feature_nfc_emulation_support           0
226 %define tizen_wearable_feature_notification_support            1
227 %define tizen_wearable_feature_package_support                 1
228 %define tizen_wearable_feature_player_util_support             1
229 %define tizen_wearable_feature_power_support                   1
230 %define tizen_wearable_feature_ppm_support                     1
231 %define tizen_wearable_feature_preference_support              1
232 %define tizen_wearable_feature_push_support                    1
233 %define tizen_wearable_feature_se_support                      1
234 %define tizen_wearable_feature_sensor_support                  1
235 %define tizen_wearable_feature_sound_support                   1
236 %define tizen_wearable_feature_system_info_support             1
237 %define tizen_wearable_feature_system_setting_support          1
238
239 #- telephony related APIs
240 # CallHistory API is optional in Tizen Wearable Profile.
241 # NetworkBearerSelection API is optional in Tizen Wearable Profile.
242 %define tizen_wearable_feature_telephony_support               0
243 %define tizen_wearable_feature_callhistory_support             0
244 %define tizen_wearable_feature_nbs_support                     0
245
246 %define tizen_wearable_feature_time_support                    1
247 %define tizen_wearable_feature_tvinputdevice_support           0
248 %define tizen_wearable_feature_voicecontrol_support            1
249 %define tizen_wearable_feature_web_setting_support             0
250 %define tizen_wearable_feature_wi_fi_support                   1
251 %define tizen_wearable_feature_widget_service_support          1
252
253 ## Wearable emulator
254
255 %define tizen_wearable_emulator_feature_bluetooth_support      0
256
257 # MediayKey API is optional in Tizen Wearable Profile.
258 # tizen.org/feature/network.bluetooth.audio.media is required for MediayKey API
259 %define tizen_wearable_emulator_feature_media_key_support      0
260
261 #- telephony related APIs
262 # CallHistory API is optional in Tizen Wearable Profile.
263 # NetworkBearerSelection API is optional in Tizen Wearable Profile.
264 %define tizen_wearable_emulator_feature_telephony_support      1
265 %define tizen_wearable_emulator_feature_callhistory_support    1
266 %define tizen_wearable_emulator_feature_nbs_support            1
267
268 %define tizen_wearable_emulator_feature_se_support             0
269 %define tizen_wearable_emulator_feature_sensor_support         1
270
271 ####################################################################
272 #       TV Profile                                                 #
273 ####################################################################
274
275 %define tizen_tv_privilege_engine                        CYNARA
276
277 %define tizen_tv_feature_account_support                 1
278 %define tizen_tv_feature_alarm_support                   1
279 %define tizen_tv_feature_app_control_settings_support    0
280 %define tizen_tv_feature_application_support             1
281 %define tizen_tv_feature_archive_support                 1
282 %define tizen_tv_feature_badge_support                   0
283 %define tizen_tv_feature_bluetooth_support               1
284 %define tizen_tv_feature_calendar_support                0
285 %define tizen_tv_feature_callhistory_support             0
286 %define tizen_tv_feature_contact_support                 0
287 %define tizen_tv_feature_content_support                 1
288 %define tizen_tv_feature_datacontrol_support             1
289 %define tizen_tv_feature_datasync_support                0
290 %define tizen_tv_feature_download_support                1
291 %define tizen_tv_feature_exif_support                    1
292 %define tizen_tv_feature_feedback_support                0
293 %define tizen_tv_feature_filesystem_support              1
294 %define tizen_tv_feature_fm_radio_support                0
295 %define tizen_tv_feature_ham_support                     0
296 %define tizen_tv_feature_inputdevice_support             0
297 %define tizen_tv_feature_iotcon_support                  1
298 %define tizen_tv_feature_key_manager_support             1
299 %define tizen_tv_feature_media_controller_support        1
300 %define tizen_tv_feature_media_key_support               0
301 %define tizen_tv_feature_message_port_support            1
302 %define tizen_tv_feature_messaging_support               0
303 %define tizen_tv_feature_metadata_support      1
304 %define tizen_tv_feature_nbs_support                     0
305 %define tizen_tv_feature_nfc_support                     0
306 %define tizen_tv_feature_nfc_emulation_support           0
307 %define tizen_tv_feature_notification_support            0
308 %define tizen_tv_feature_package_support                 1
309 %define tizen_tv_feature_player_util_support             0
310 %define tizen_tv_feature_power_support                   0
311 %define tizen_tv_feature_ppm_support                     0
312 %define tizen_tv_feature_preference_support              0
313 %define tizen_tv_feature_push_support                    1
314 %define tizen_tv_feature_se_support                      0
315 %define tizen_tv_feature_sensor_support                  0
316 %define tizen_tv_feature_sound_support                   0
317 %define tizen_tv_feature_system_info_support             1
318 %define tizen_tv_feature_system_setting_support          0
319 %define tizen_tv_feature_telephony_support               0
320 %define tizen_tv_feature_time_support                    1
321 %define tizen_tv_feature_tvinputdevice_support           1
322 %define tizen_tv_feature_voicecontrol_support            1
323 %define tizen_tv_feature_web_setting_support             1
324 %define tizen_tv_feature_wi_fi_support                   1
325 %define tizen_tv_feature_widget_service_support          0
326
327 # common, or "unified (undefined)"
328 %define unified_build   1
329 # GBM Product Build Optimization. Not for 4.0 Public Unified Build.
330 %if "%{?profile}" == "tv" || "%{?profile}" == "mobile" || "%{?profile}" == "wearable" || "%{?profile}" == "ivi"
331 %define unified_build   0
332 %endif
333
334 # GBM Product Build Optimization. Not for 4.0 Public Unified Build.
335 %if "%{?profile}" == "tv" || "%{?profile}" == "mobile" || "%{?profile}" == "wearable" || "%{?profile}" == "common"
336 %define tizen_privilege_engine                        %{expand:%tizen_%{?profile}_privilege_engine}
337
338 %define tizen_feature_account_support                 %{expand:%tizen_%{?profile}_feature_account_support}
339 %define tizen_feature_alarm_support                   %{expand:%tizen_%{?profile}_feature_alarm_support}
340 %define tizen_feature_app_control_settings_support    %{expand:%tizen_%{?profile}_feature_app_control_settings_support}
341 %define tizen_feature_application_support             %{expand:%tizen_%{?profile}_feature_application_support}
342 %define tizen_feature_archive_support                 %{expand:%tizen_%{?profile}_feature_archive_support}
343 %define tizen_feature_badge_support                   %{expand:%tizen_%{?profile}_feature_badge_support}
344 %define tizen_feature_bluetooth_support               %{expand:%tizen_%{?profile}_feature_bluetooth_support}
345 %define tizen_feature_calendar_support                %{expand:%tizen_%{?profile}_feature_calendar_support}
346 %define tizen_feature_contact_support                 %{expand:%tizen_%{?profile}_feature_contact_support}
347 %define tizen_feature_content_support                 %{expand:%tizen_%{?profile}_feature_content_support}
348 %define tizen_feature_datacontrol_support             %{expand:%tizen_%{?profile}_feature_datacontrol_support}
349 %define tizen_feature_datasync_support                %{expand:%tizen_%{?profile}_feature_datasync_support}
350 %define tizen_feature_download_support                %{expand:%tizen_%{?profile}_feature_download_support}
351 %define tizen_feature_exif_support                    %{expand:%tizen_%{?profile}_feature_exif_support}
352 %define tizen_feature_feedback_support                %{expand:%tizen_%{?profile}_feature_feedback_support}
353 %define tizen_feature_filesystem_support              %{expand:%tizen_%{?profile}_feature_filesystem_support}
354 %define tizen_feature_fm_radio_support                %{expand:%tizen_%{?profile}_feature_fm_radio_support}
355 %define tizen_feature_ham_support                     %{expand:%tizen_%{?profile}_feature_ham_support}
356 %define tizen_feature_iotcon_support                  %{expand:%tizen_%{?profile}_feature_iotcon_support}
357 %define tizen_feature_location_batch                  %{expand:%tizen_%{?profile}_feature_location_batch}
358 %define tizen_feature_key_manager_support             %{expand:%tizen_%{?profile}_feature_key_manager_support}
359 %define tizen_feature_media_controller_support        %{expand:%tizen_%{?profile}_feature_media_controller_support}
360 %define tizen_feature_media_key_support               %{expand:%tizen_%{?profile}_feature_media_key_support}
361 %define tizen_feature_message_port_support            %{expand:%tizen_%{?profile}_feature_message_port_support}
362 %define tizen_feature_messaging_support               %{expand:%tizen_%{?profile}_feature_messaging_support}
363 %define tizen_feature_nfc_emulation_support           %{expand:%tizen_%{?profile}_feature_nfc_emulation_support}
364 %define tizen_feature_nfc_support                     %{expand:%tizen_%{?profile}_feature_nfc_support}
365 %define tizen_feature_notification_support            %{expand:%tizen_%{?profile}_feature_notification_support}
366 %define tizen_feature_package_support                 %{expand:%tizen_%{?profile}_feature_package_support}
367 %define tizen_feature_player_util_support             %{expand:%tizen_%{?profile}_feature_player_util_support}
368 %define tizen_feature_power_support                   %{expand:%tizen_%{?profile}_feature_power_support}
369 %define tizen_feature_preference_support              %{expand:%tizen_%{?profile}_feature_preference_support}
370 %define tizen_feature_push_support                    %{expand:%tizen_%{?profile}_feature_push_support}
371 %define tizen_feature_se_support                      %{expand:%tizen_%{?profile}_feature_se_support}
372 %define tizen_feature_sensor_support                  %{expand:%tizen_%{?profile}_feature_sensor_support}
373 %define tizen_feature_sound_support                   %{expand:%tizen_%{?profile}_feature_sound_support}
374 %define tizen_feature_system_info_support             %{expand:%tizen_%{?profile}_feature_system_info_support}
375 %define tizen_feature_system_setting_support          %{expand:%tizen_%{?profile}_feature_system_setting_support}
376 %define tizen_feature_telephony_support               %{expand:%tizen_%{?profile}_feature_telephony_support}
377 %define tizen_feature_time_support                    %{expand:%tizen_%{?profile}_feature_time_support}
378 %define tizen_feature_web_setting_support             %{expand:%tizen_%{?profile}_feature_web_setting_support}
379 %define tizen_feature_widget_service_support          %{expand:%tizen_%{?profile}_feature_widget_service_support}
380 %define tizen_feature_wi_fi_support                   %{expand:%tizen_%{?profile}_feature_wi_fi_support}
381 %define tizen_feature_inputdevice_support             %{expand:%tizen_%{?profile}_feature_inputdevice_support}
382 %define tizen_feature_callhistory_support             %{expand:%tizen_%{?profile}_feature_callhistory_support}
383 %define tizen_feature_nbs_support                     %{expand:%tizen_%{?profile}_feature_nbs_support}
384 %define tizen_feature_tvinputdevice_support           %{expand:%tizen_%{?profile}_feature_tvinputdevice_support}
385 %define tizen_feature_voicecontrol_support            %{expand:%tizen_%{?profile}_feature_voicecontrol_support}
386 %define tizen_feature_ppm_support                     %{expand:%tizen_%{?profile}_feature_ppm_support}
387 %endif
388
389 BuildRequires: pkgconfig(security-privilege-manager)
390 BuildRequires: ninja
391 BuildRequires: pkgconfig(appcore-common)
392 BuildRequires: pkgconfig(dlog)
393 BuildRequires: pkgconfig(evas)
394 BuildRequires: pkgconfig(gio-unix-2.0)
395 BuildRequires: pkgconfig(gio-2.0)
396 BuildRequires: pkgconfig(glib-2.0)
397 BuildRequires: pkgconfig(libudev)
398 BuildRequires: pkgconfig(minizip)
399 BuildRequires: pkgconfig(zlib)
400 BuildRequires: pkgconfig(pkgmgr)
401 BuildRequires: pkgconfig(pkgmgr-info)
402 BuildRequires: pkgconfig(pkgmgr-installer)
403 BuildRequires: pkgconfig(vconf)
404 BuildRequires: pkgconfig(ecore)
405 BuildRequires: pkgconfig(icu-i18n)
406 BuildRequires: pkgconfig(aul)
407 BuildRequires: pkgconfig(storage)
408 BuildRequires: python
409 BuildRequires: pkgconfig(capi-base-common)
410 BuildRequires: pkgconfig(capi-system-info)
411 BuildRequires: pkgconfig(capi-system-runtime-info)
412 BuildRequires: pkgconfig(capi-network-connection)
413 BuildRequires: pkgconfig(capi-system-device)
414 BuildRequires: pkgconfig(capi-system-system-settings)
415 BuildRequires: pkgconfig(capi-network-bluetooth)
416 BuildRequires: pkgconfig(capi-network-wifi-manager)
417 BuildRequires: pkgconfig(tapi)
418 BuildRequires: pkgconfig(libpcrecpp)
419 BuildRequires: pkgconfig(capi-appfw-app-common)
420 BuildRequires: pkgconfig(capi-appfw-app-manager)
421 BuildRequires: pkgconfig(capi-appfw-package-manager)
422 BuildRequires: pkgconfig(capi-content-media-content)
423 BuildRequires: pkgconfig(capi-media-metadata-extractor)
424 BuildRequires: pkgconfig(libtzplatform-config)
425 BuildRequires: pkgconfig(appsvc)
426
427 %if %{with wayland}
428 %define display_type wayland
429 BuildRequires: pkgconfig(wayland-client)
430 %else
431 %define display_type x11
432 #BuildRequires: pkgconfig(x11)
433 #BuildRequires: pkgconfig(xrandr)
434 %endif
435
436 %if "%{?tizen_privilege_engine}" == "ACE"
437 BuildRequires: pkgconfig(security-privilege-checker)
438 %endif
439
440 %if "%{?tizen_privilege_engine}" == "CYNARA" || "%{?unified_build}" == "1"
441 BuildRequires: pkgconfig(cynara-client)
442 BuildRequires: pkgconfig(libsmack)
443 %endif
444
445 %if "%{?tizen_feature_account_support}" == "1" || "%{?unified_build}" == "1"
446 BuildRequires: pkgconfig(accounts-svc)
447 %endif
448
449 %if "%{?tizen_feature_alarm_support}" == "1" || "%{?unified_build}" == "1"
450 BuildRequires: pkgconfig(capi-appfw-app-control)
451 BuildRequires: pkgconfig(capi-appfw-application)
452 BuildRequires: pkgconfig(capi-appfw-alarm)
453 BuildRequires: pkgconfig(alarm-service)
454 %endif
455
456 %if "%{?tizen_feature_application_support}" == "1" || "%{?unified_build}" == "1"
457 BuildRequires: pkgconfig(capi-appfw-app-control)
458 BuildRequires: pkgconfig(capi-appfw-event)
459
460 %if "%{?unified_build}" == "1" || "%{?profile}" == "mobile" || "%{?profile}" == "wearable"
461 BuildRequires: pkgconfig(capi-context)
462 %endif
463
464 %endif
465
466 %if "%{?tizen_feature_bluetooth_support}" == "1" || "%{?unified_build}" == "1"
467 BuildRequires: pkgconfig(capi-appfw-app-control)
468 %endif
469
470 %if "%{?tizen_feature_datacontrol_support}" == "1" || "%{?unified_build}" == "1"
471 BuildRequires: pkgconfig(capi-data-control)
472 %endif
473
474 %if "%{?tizen_feature_download_support}" == "1" || "%{?unified_build}" == "1"
475 BuildRequires: pkgconfig(capi-web-url-download)
476 %endif
477
478 %if "%{?tizen_feature_ham_support}" == "1" || "%{?unified_build}" == "1" || ("%{?profile}" == "mobile" && "%{?tizen_mobile_emulator_feature_ham_support}" == "1")
479 BuildRequires: pkgconfig(motion)
480 BuildRequires: pkgconfig(capi-system-sensor)
481 BuildRequires: pkgconfig(capi-location-manager)
482 BuildRequires: pkgconfig(sensor)
483 %endif
484
485 %if "%{?tizen_feature_iotcon_support}" == "1" || "%{?unified_build}" == "1"
486 BuildRequires: pkgconfig(iotcon)
487 %endif
488
489 %if "%{?tizen_feature_player_util_support}" == "1" || "%{?unified_build}" == "1"
490 BuildRequires: pkgconfig(chromium-efl)
491 %endif
492
493 %if "%{?tizen_feature_power_support}" == "1" || "%{?unified_build}" == "1"
494 BuildRequires: pkgconfig(capi-appfw-application)
495 %endif
496
497 %if "%{?tizen_feature_push_support}" == "1" || "%{?unified_build}" == "1"
498 BuildRequires: pkgconfig(push)
499 BuildRequires: pkgconfig(capi-appfw-app-control)
500 %endif
501
502 %if "%{?tizen_feature_key_manager_support}" == "1" || "%{?unified_build}" == "1"
503 BuildRequires: pkgconfig(key-manager)
504 %endif
505
506 %if "%{?tizen_feature_media_controller_support}" == "1" || "%{?unified_build}" == "1"
507 BuildRequires: pkgconfig(capi-media-controller)
508 %endif
509
510 %if "%{?tizen_feature_messaging_support}" == "1" || "%{?unified_build}" == "1"
511 BuildRequires:  pkgconfig(ecore-file)
512 BuildRequires:  pkgconfig(email-service)
513 BuildRequires:  pkgconfig(msg-service)
514 BuildRequires:  pkgconfig(db-util)
515 %endif
516
517 %if "%{?tizen_feature_badge_support}" == "1" || "%{?unified_build}" == "1"
518 BuildRequires:  pkgconfig(badge)
519 %endif
520
521 %if "%{?tizen_feature_calendar_support}" == "1" || "%{?unified_build}" == "1"
522 BuildRequires:  pkgconfig(calendar-service2)
523 %endif
524
525 %if "%{?tizen_feature_contact_support}" == "1" || "%{?unified_build}" == "1"
526 BuildRequires:  pkgconfig(contacts-service2)
527 %endif
528
529 %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")
530 BuildRequires:  pkgconfig(contacts-service2)
531 %endif
532
533 %if "%{?tizen_feature_exif_support}" == "1" || "%{?unified_build}" == "1"
534 BuildRequires:  pkgconfig(libexif)
535 %endif
536
537 %if "%{?tizen_feature_nfc_support}" == "1" || "%{?unified_build}" == "1" || ("%{?profile}" == "mobile" && "%{?tizen_mobile_emulator_feature_nfc_support}" == "1")
538 BuildRequires:  pkgconfig(capi-network-nfc)
539 BuildRequires:  pkgconfig(capi-appfw-app-control)
540 %endif
541
542 %if "%{?tizen_feature_fm_radio_support}" == "1" || "%{?unified_build}" == "1" || ("%{?profile}" == "mobile" && "%{?tizen_mobile_emulator_feature_fm_radio_support}" == "1")
543 BuildRequires: pkgconfig(capi-media-radio)
544 %endif
545
546 %if "%{?tizen_feature_feedback_support}" == "1" || "%{?unified_build}" == "1"
547 BuildRequires: pkgconfig(feedback)
548 %endif
549
550 %if "%{?tizen_feature_se_support}" == "1" || "%{?unified_build}" == "1"
551 BuildRequires:  pkgconfig(capi-network-smartcard)
552 %endif
553
554 %if "%{?tizen_feature_message_port_support}" == "1" || "%{?unified_build}" == "1"
555 BuildRequires: pkgconfig(capi-message-port)
556 %endif
557
558 %if "%{?tizen_feature_notification_support}" == "1" || "%{?unified_build}" == "1"
559 BuildRequires: pkgconfig(notification)
560 BuildRequires: pkgconfig(capi-appfw-app-control)
561 %endif
562
563 %if "%{?tizen_feature_preference_support}" == "1" || "%{?unified_build}" == "1"
564 BuildRequires: pkgconfig(capi-appfw-preference)
565 %endif
566
567 %if "%{?tizen_feature_sound_support}" == "1" || "%{?unified_build}" == "1"
568 BuildRequires:  pkgconfig(capi-media-sound-manager)
569 %endif
570
571 %if "%{?tizen_feature_sensor_support}" == "1" || "%{?unified_build}" == "1" || ("%{?profile}" == "wearable" && "%{?tizen_wearable_emulator_feature_sensor_support}" == "1")
572 BuildRequires: pkgconfig(capi-system-sensor)
573 %endif
574
575 %if "%{?tizen_feature_media_key_support}" == "1" || "%{?unified_build}" == "1"
576 BuildRequires:  pkgconfig(capi-system-media-key)
577 %endif
578
579 %if "%{?tizen_feature_widget_service_support}" == "1" || "%{?unified_build}" == "1"
580 BuildRequires: pkgconfig(widget_service)
581 %endif
582
583 %if "%{?tizen_feature_voicecontrol_support}" == "1" || "%{?unified_build}" == "1"
584 BuildRequires: pkgconfig(voice-control)
585 %endif
586
587 %if "%{?tizen_feature_ppm_support}" == "1" || "%{?unified_build}" == "1"
588 BuildRequires: pkgconfig(capi-privacy-privilege-manager)
589 %endif
590
591 Requires:      %{name}-compat = %{version}-%{release}
592 %if "%{?unified_build}" == "1"
593 Recommends:    %{name}-profile_common = %{version}-%{release}
594 %endif
595
596 %description
597 Tizen Web APIs implemented.
598
599 %package profile_common
600 Summary:       webapi-plugin binaries for common profile
601 Provides:      %{name}-compat = %{version}-%{release}
602 Conflicts:     %{name}-profile_mobile
603 Conflicts:     %{name}-profile_wearable
604 Conflicts:     %{name}-profile_tv
605 Conflicts:     %{name}-profile_ivi
606 %description profile_common
607 Tizen Web API implementation binaries for Tizen common profile.
608
609 %package profile_mobile
610 Summary:       webapi-plugin binaries for mobile profile
611 Provides:      %{name}-compat = %{version}-%{release}
612 Conflicts:     %{name}-profile_common
613 Conflicts:     %{name}-profile_wearable
614 Conflicts:     %{name}-profile_tv
615 Conflicts:     %{name}-profile_ivi
616 %description profile_mobile
617 Tizen Web API implementation binaries for Tizen mobile profile.
618
619 %ifarch %{ix86} x86_64
620 %package mobile-extension-emulator
621 Summary:       webapi-plugin binaries for mobile emulator
622 Requires:      %{name}-profile_mobile = %{version}-%{release}
623 %description mobile-extension-emulator
624 Tizen Web API implementation binaries for Tizen mobile emulator.
625 %endif
626
627 %package profile_wearable
628 Summary:       webapi-plugin binaries for wearable profile
629 Provides:      %{name}-compat = %{version}-%{release}
630 Conflicts:     %{name}-profile_mobile
631 Conflicts:     %{name}-profile_common
632 Conflicts:     %{name}-profile_tv
633 Conflicts:     %{name}-profile_ivi
634 %description profile_wearable
635 Tizen Web API implementation binaries for Tizen wearable profile.
636
637 %ifarch %{ix86} x86_64
638 %package wearable-extension-emulator
639 Summary:       webapi-plugin binaries for wearable emulator
640 Requires:      %{name}-profile_wearable = %{version}-%{release}
641 %description wearable-extension-emulator
642 Tizen Web API implementation binaries for Tizen wearable emulator.
643 %endif
644
645 %package profile_tv
646 Summary:       webapi-plugin binaries for tv profile
647 Provides:      %{name}-compat = %{version}-%{release}
648 Conflicts:     %{name}-profile_mobile
649 Conflicts:     %{name}-profile_wearable
650 Conflicts:     %{name}-profile_common
651 Conflicts:     %{name}-profile_ivi
652 %description profile_tv
653 Tizen Web API implementation binaries for Tizen tv profile.
654
655 %package profile_ivi
656 Summary:       webapi-plugin binaries for ivi profile
657 Provides:      %{name}-compat = %{version}-%{release}
658 Conflicts:     %{name}-profile_mobile
659 Conflicts:     %{name}-profile_wearable
660 Conflicts:     %{name}-profile_tv
661 Conflicts:     %{name}-profile_common
662 %description profile_ivi
663 Tizen Web API implementation binaries for Tizen ivi profile.
664
665 %package devel
666 Summary:    webapi-plugins development headers
667 Group:      Development/Libraries
668 Requires:   %{name} = %{version}
669
670 %description devel
671 webapi-plugins development headers
672
673 %prep
674 %setup -q
675
676 %build
677
678 export GYP_GENERATORS='ninja'
679
680 %if "%{?unified_build}" == "1" || "%{?profile}" == "mobile"
681 # MOBILE
682 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=mobile -Dprivilege_engine=%{tizen_mobile_privilege_engine}"
683 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
684 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
685
686 # ut flags
687 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_ut_build=%{tizen_ut_build}"
688
689 # feature flags
690 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_account_support=%{?tizen_mobile_feature_account_support}"
691 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_alarm_support=%{?tizen_mobile_feature_alarm_support}"
692 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_app_control_settings_support=%{?tizen_mobile_feature_app_control_settings_support}"
693 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_application_support=%{?tizen_mobile_feature_application_support}"
694 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_archive_support=%{?tizen_mobile_feature_archive_support}"
695 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_badge_support=%{?tizen_mobile_feature_badge_support}"
696 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bluetooth_support=%{?tizen_mobile_feature_bluetooth_support}"
697 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_calendar_support=%{?tizen_mobile_feature_calendar_support}"
698 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_callhistory_support=%{?tizen_mobile_feature_callhistory_support}"
699 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_contact_support=%{?tizen_mobile_feature_contact_support}"
700 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_content_support=%{?tizen_mobile_feature_content_support}"
701 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datacontrol_support=%{?tizen_mobile_feature_datacontrol_support}"
702 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datasync_support=%{?tizen_mobile_feature_datasync_support}"
703 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_download_support=%{?tizen_mobile_feature_download_support}"
704 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_exif_support=%{?tizen_mobile_feature_exif_support}"
705 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_feedback_support=%{?tizen_mobile_feature_feedback_support}"
706 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_filesystem_support=%{?tizen_mobile_feature_filesystem_support}"
707 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_fm_radio_support=%{?tizen_mobile_feature_fm_radio_support}"
708 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ham_support=%{?tizen_mobile_feature_ham_support}"
709 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_iotcon_support=%{?tizen_mobile_feature_iotcon_support}"
710 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_location_batch=%{?tizen_mobile_feature_location_batch}"
711 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_key_manager_support=%{?tizen_mobile_feature_key_manager_support}"
712 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_controller_support=%{?tizen_mobile_feature_media_controller_support}"
713 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_key_support=%{?tizen_mobile_feature_media_key_support}"
714 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_message_port_support=%{?tizen_mobile_feature_message_port_support}"
715 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_messaging_support=%{?tizen_mobile_feature_messaging_support}"
716 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_metadata_support=%{?tizen_mobile_feature_metadata_support}"
717 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nbs_support=%{?tizen_mobile_feature_nbs_support}"
718 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_emulation_support=%{?tizen_mobile_feature_nfc_emulation_support}"
719 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_support=%{?tizen_mobile_feature_nfc_support}"
720 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_notification_support=%{?tizen_mobile_feature_notification_support}"
721 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_package_support=%{?tizen_mobile_feature_package_support}"
722 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_player_util_support=%{?tizen_mobile_feature_player_util_support}"
723 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_power_support=%{?tizen_mobile_feature_power_support}"
724 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ppm_support=%{?tizen_mobile_feature_ppm_support}"
725 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_preference_support=%{?tizen_mobile_feature_preference_support}"
726 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_push_support=%{?tizen_mobile_feature_push_support}"
727 #GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sap_support=%{?tizen_mobile_feature_sap_support}"
728 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sensor_support=%{?tizen_mobile_feature_sensor_support}"
729 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_se_support=%{?tizen_mobile_feature_se_support}"
730 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sound_support=%{?tizen_mobile_feature_sound_support}"
731 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_mobile_feature_system_info_support}"
732 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_mobile_feature_system_setting_support}"
733 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_mobile_feature_telephony_support}"
734 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{?tizen_mobile_feature_time_support}"
735 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_mobile_feature_inputdevice_support}"
736 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_mobile_feature_web_setting_support}"
737 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_widget_service_support=%{?tizen_mobile_feature_widget_service_support}"
738 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_mobile_feature_wi_fi_support}"
739 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_mobile_feature_tvinputdevice_support}"
740 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_voicecontrol_support=%{?tizen_mobile_feature_voicecontrol_support}"
741
742 ./tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
743
744 ninja -C out/Default %{?_smp_mflags}
745 pushd out
746 mv Default bin_mobile
747 popd
748
749 # mobile-extension-emulator
750 %ifarch %{ix86} x86_64
751
752 %define tizen_mobile_feature_bluetooth_support               %{?tizen_mobile_emulator_feature_bluetooth_support}
753
754 # FM radio feature
755 %define tizen_mobile_feature_fm_radio_support                %{?tizen_mobile_emulator_feature_fm_radio_support}
756
757 %define tizen_mobile_feature_ham_support                     %{?tizen_mobile_emulator_feature_ham_support}
758 %define tizen_mobile_feature_media_key_support               %{?tizen_mobile_emulator_feature_media_key_support}
759 %define tizen_mobile_feature_nfc_emulation_support           %{?tizen_mobile_emulator_feature_nfc_emulation_support}
760 %define tizen_mobile_feature_nfc_support                     %{?tizen_mobile_emulator_feature_nfc_support}
761
762 # secure element feature
763 %define tizen_mobile_feature_se_support                      %{?tizen_mobile_emulator_feature_se_support}
764
765 # telephony feature
766 %define tizen_mobile_feature_telephony_support               %{?tizen_mobile_emulator_feature_telephony_support}
767 %define tizen_mobile_feature_callhistory_support             %{?tizen_mobile_emulator_feature_callhistory_support}
768 %define tizen_mobile_feature_nbs_support                     %{?tizen_mobile_emulator_feature_nbs_support}
769
770 %define tizen_mobile_feature_wi_fi_support                   %{?tizen_mobile_emulator_feature_wi_fi_support}
771
772 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=mobile -Dprivilege_engine=%{tizen_mobile_privilege_engine}"
773 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
774 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
775
776 # ut flags
777 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_ut_build=%{tizen_ut_build}"
778
779 # feature flags
780 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_account_support=%{?tizen_mobile_feature_account_support}"
781 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_alarm_support=%{?tizen_mobile_feature_alarm_support}"
782 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_app_control_settings_support=%{?tizen_mobile_feature_app_control_settings_support}"
783 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_application_support=%{?tizen_mobile_feature_application_support}"
784 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_archive_support=%{?tizen_mobile_feature_archive_support}"
785 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_badge_support=%{?tizen_mobile_feature_badge_support}"
786 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bluetooth_support=%{?tizen_mobile_feature_bluetooth_support}"
787 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_calendar_support=%{?tizen_mobile_feature_calendar_support}"
788 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_callhistory_support=%{?tizen_mobile_feature_callhistory_support}"
789 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_contact_support=%{?tizen_mobile_feature_contact_support}"
790 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_content_support=%{?tizen_mobile_feature_content_support}"
791 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datacontrol_support=%{?tizen_mobile_feature_datacontrol_support}"
792 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datasync_support=%{?tizen_mobile_feature_datasync_support}"
793 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_download_support=%{?tizen_mobile_feature_download_support}"
794 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_exif_support=%{?tizen_mobile_feature_exif_support}"
795 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_feedback_support=%{?tizen_mobile_feature_feedback_support}"
796 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_filesystem_support=%{?tizen_mobile_feature_filesystem_support}"
797 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_fm_radio_support=%{?tizen_mobile_feature_fm_radio_support}"
798 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ham_support=%{?tizen_mobile_feature_ham_support}"
799 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_iotcon_support=%{?tizen_mobile_feature_iotcon_support}"
800 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_location_batch=%{?tizen_mobile_feature_location_batch}"
801 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_key_manager_support=%{?tizen_mobile_feature_key_manager_support}"
802 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_controller_support=%{?tizen_mobile_feature_media_controller_support}"
803 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_key_support=%{?tizen_mobile_feature_media_key_support}"
804 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_message_port_support=%{?tizen_mobile_feature_message_port_support}"
805 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_messaging_support=%{?tizen_mobile_feature_messaging_support}"
806 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_metadata_support=%{?tizen_mobile_feature_metadata_support}"
807 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nbs_support=%{?tizen_mobile_feature_nbs_support}"
808 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_emulation_support=%{?tizen_mobile_feature_nfc_emulation_support}"
809 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_support=%{?tizen_mobile_feature_nfc_support}"
810 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_notification_support=%{?tizen_mobile_feature_notification_support}"
811 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_package_support=%{?tizen_mobile_feature_package_support}"
812 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_player_util_support=%{?tizen_mobile_feature_player_util_support}"
813 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_power_support=%{?tizen_mobile_feature_power_support}"
814 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ppm_support=%{?tizen_mobile_feature_ppm_support}"
815 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_preference_support=%{?tizen_mobile_feature_preference_support}"
816 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_push_support=%{?tizen_mobile_feature_push_support}"
817 #GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sap_support=%{?tizen_mobile_feature_sap_support}"
818 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sensor_support=%{?tizen_mobile_feature_sensor_support}"
819 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_se_support=%{?tizen_mobile_feature_se_support}"
820 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sound_support=%{?tizen_mobile_feature_sound_support}"
821 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_mobile_feature_system_info_support}"
822 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_mobile_feature_system_setting_support}"
823 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_mobile_feature_telephony_support}"
824 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{?tizen_mobile_feature_time_support}"
825 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_mobile_feature_inputdevice_support}"
826 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_mobile_feature_web_setting_support}"
827 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_widget_service_support=%{?tizen_mobile_feature_widget_service_support}"
828 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_mobile_feature_wi_fi_support}"
829 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_mobile_feature_tvinputdevice_support}"
830 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_voicecontrol_support=%{?tizen_mobile_feature_voicecontrol_support}"
831
832 ./tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
833
834 ninja -C out/Default %{?_smp_mflags}
835 pushd out
836 mv Default bin_mobile_emulator
837 popd
838 %endif # mobile-extension-emulator
839
840 pushd out
841 %if "%{?profile}" == "mobile"
842 ln -sf bin_mobile Default
843 %endif
844 popd
845
846 %endif # MOBILE
847
848 %if "%{?unified_build}" == "1" || "%{?profile}" == "wearable"
849 # WEARABLE
850 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=wearable -Dprivilege_engine=%{tizen_wearable_privilege_engine}"
851 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
852 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
853
854 # ut flags
855 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_ut_build=%{tizen_ut_build}"
856
857 # feature flags
858 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_account_support=%{?tizen_wearable_feature_account_support}"
859 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_alarm_support=%{?tizen_wearable_feature_alarm_support}"
860 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_app_control_settings_support=%{?tizen_wearable_feature_app_control_settings_support}"
861 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_application_support=%{?tizen_wearable_feature_application_support}"
862 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_archive_support=%{?tizen_wearable_feature_archive_support}"
863 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_badge_support=%{?tizen_wearable_feature_badge_support}"
864 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bluetooth_support=%{?tizen_wearable_feature_bluetooth_support}"
865 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_calendar_support=%{?tizen_wearable_feature_calendar_support}"
866 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_callhistory_support=%{?tizen_wearable_feature_callhistory_support}"
867 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_contact_support=%{?tizen_wearable_feature_contact_support}"
868 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_content_support=%{?tizen_wearable_feature_content_support}"
869 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datacontrol_support=%{?tizen_wearable_feature_datacontrol_support}"
870 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datasync_support=%{?tizen_wearable_feature_datasync_support}"
871 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_download_support=%{?tizen_wearable_feature_download_support}"
872 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_exif_support=%{?tizen_wearable_feature_exif_support}"
873 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_feedback_support=%{?tizen_wearable_feature_feedback_support}"
874 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_filesystem_support=%{?tizen_wearable_feature_filesystem_support}"
875 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_fm_radio_support=%{?tizen_wearable_feature_fm_radio_support}"
876 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ham_support=%{?tizen_wearable_feature_ham_support}"
877 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_iotcon_support=%{?tizen_wearable_feature_iotcon_support}"
878 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_location_batch=%{?tizen_wearable_feature_location_batch}"
879 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_key_manager_support=%{?tizen_wearable_feature_key_manager_support}"
880 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_controller_support=%{?tizen_wearable_feature_media_controller_support}"
881 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_key_support=%{?tizen_wearable_feature_media_key_support}"
882 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_message_port_support=%{?tizen_wearable_feature_message_port_support}"
883 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_messaging_support=%{?tizen_wearable_feature_messaging_support}"
884 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_metadata_support=%{?tizen_wearable_feature_metadata_support}"
885 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nbs_support=%{?tizen_wearable_feature_nbs_support}"
886 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_emulation_support=%{?tizen_wearable_feature_nfc_emulation_support}"
887 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_support=%{?tizen_wearable_feature_nfc_support}"
888 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_notification_support=%{?tizen_wearable_feature_notification_support}"
889 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_package_support=%{?tizen_wearable_feature_package_support}"
890 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_player_util_support=%{?tizen_wearable_feature_player_util_support}"
891 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_power_support=%{?tizen_wearable_feature_power_support}"
892 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ppm_support=%{?tizen_wearable_feature_ppm_support}"
893 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_preference_support=%{?tizen_wearable_feature_preference_support}"
894 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_push_support=%{?tizen_wearable_feature_push_support}"
895 #GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sap_support=%{?tizen_wearable_feature_sap_support}"
896 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sensor_support=%{?tizen_wearable_feature_sensor_support}"
897 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_se_support=%{?tizen_wearable_feature_se_support}"
898 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sound_support=%{?tizen_wearable_feature_sound_support}"
899 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_wearable_feature_system_info_support}"
900 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_wearable_feature_system_setting_support}"
901 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_wearable_feature_telephony_support}"
902 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{?tizen_wearable_feature_time_support}"
903 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_wearable_feature_inputdevice_support}"
904 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_wearable_feature_web_setting_support}"
905 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_widget_service_support=%{?tizen_wearable_feature_widget_service_support}"
906 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_wearable_feature_wi_fi_support}"
907 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_wearable_feature_tvinputdevice_support}"
908 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_voicecontrol_support=%{?tizen_wearable_feature_voicecontrol_support}"
909
910 ./tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
911
912 ninja -C out/Default %{?_smp_mflags}
913 pushd out
914 mv Default bin_wearable
915 popd
916
917 # wearable-extension-emulator
918 %ifarch %{ix86} x86_64
919
920 %define tizen_wearable_feature_bluetooth_support             %{?tizen_wearable_emulator_feature_bluetooth_support}
921
922 # MediayKey API is optional in Tizen Wearable Profile.
923 # tizen.org/feature/network.bluetooth.audio.media is required for MediayKey API
924 %define tizen_wearable_feature_media_key_support             %{?tizen_wearable_emulator_feature_media_key_support}
925
926 #- telephony related APIs
927 # CallHistory API is optional in Tizen Wearable Profile.
928 # NetworkBearerSelection API is optional in Tizen Wearable Profile.
929 %define tizen_wearable_feature_se_support                    %{?tizen_wearable_emulator_feature_se_support}
930 %define tizen_wearable_feature_telephony_support             %{?tizen_wearable_emulator_feature_telephony_support}
931 %define tizen_wearable_feature_callhistory_support           %{?tizen_wearable_emulator_feature_callhistory_support}
932 %define tizen_wearable_feature_nbs_support                   %{?tizen_wearable_emulator_feature_nbs_support}
933 %define tizen_wearable_feature_sensor_support                %{?tizen_wearable_emulator_feature_sensor_support}
934
935 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=wearable -Dprivilege_engine=%{tizen_wearable_privilege_engine}"
936 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
937 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
938
939 # ut flags
940 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_ut_build=%{tizen_ut_build}"
941
942 # feature flags
943 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_account_support=%{?tizen_wearable_feature_account_support}"
944 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_alarm_support=%{?tizen_wearable_feature_alarm_support}"
945 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_app_control_settings_support=%{?tizen_wearable_feature_app_control_settings_support}"
946 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_application_support=%{?tizen_wearable_feature_application_support}"
947 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_archive_support=%{?tizen_wearable_feature_archive_support}"
948 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_badge_support=%{?tizen_wearable_feature_badge_support}"
949 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bluetooth_support=%{?tizen_wearable_feature_bluetooth_support}"
950 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_calendar_support=%{?tizen_wearable_feature_calendar_support}"
951 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_callhistory_support=%{?tizen_wearable_feature_callhistory_support}"
952 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_contact_support=%{?tizen_wearable_feature_contact_support}"
953 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_content_support=%{?tizen_wearable_feature_content_support}"
954 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datacontrol_support=%{?tizen_wearable_feature_datacontrol_support}"
955 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datasync_support=%{?tizen_wearable_feature_datasync_support}"
956 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_download_support=%{?tizen_wearable_feature_download_support}"
957 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_exif_support=%{?tizen_wearable_feature_exif_support}"
958 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_feedback_support=%{?tizen_wearable_feature_feedback_support}"
959 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_filesystem_support=%{?tizen_wearable_feature_filesystem_support}"
960 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_fm_radio_support=%{?tizen_wearable_feature_fm_radio_support}"
961 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ham_support=%{?tizen_wearable_feature_ham_support}"
962 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_iotcon_support=%{?tizen_wearable_feature_iotcon_support}"
963 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_location_batch=%{?tizen_wearable_feature_location_batch}"
964 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_key_manager_support=%{?tizen_wearable_feature_key_manager_support}"
965 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_controller_support=%{?tizen_wearable_feature_media_controller_support}"
966 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_key_support=%{?tizen_wearable_feature_media_key_support}"
967 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_message_port_support=%{?tizen_wearable_feature_message_port_support}"
968 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_messaging_support=%{?tizen_wearable_feature_messaging_support}"
969 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_metadata_support=%{?tizen_wearable_feature_metadata_support}"
970 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nbs_support=%{?tizen_wearable_feature_nbs_support}"
971 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_emulation_support=%{?tizen_wearable_feature_nfc_emulation_support}"
972 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_support=%{?tizen_wearable_feature_nfc_support}"
973 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_notification_support=%{?tizen_wearable_feature_notification_support}"
974 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_package_support=%{?tizen_wearable_feature_package_support}"
975 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_player_util_support=%{?tizen_wearable_feature_player_util_support}"
976 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_power_support=%{?tizen_wearable_feature_power_support}"
977 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ppm_support=%{?tizen_wearable_feature_ppm_support}"
978 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_preference_support=%{?tizen_wearable_feature_preference_support}"
979 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_push_support=%{?tizen_wearable_feature_push_support}"
980 #GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sap_support=%{?tizen_wearable_feature_sap_support}"
981 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sensor_support=%{?tizen_wearable_feature_sensor_support}"
982 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_se_support=%{?tizen_wearable_feature_se_support}"
983 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sound_support=%{?tizen_wearable_feature_sound_support}"
984 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_wearable_feature_system_info_support}"
985 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_wearable_feature_system_setting_support}"
986 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_wearable_feature_telephony_support}"
987 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{?tizen_wearable_feature_time_support}"
988 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_wearable_feature_inputdevice_support}"
989 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_wearable_feature_web_setting_support}"
990 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_widget_service_support=%{?tizen_wearable_feature_widget_service_support}"
991 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_wearable_feature_wi_fi_support}"
992 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_wearable_feature_tvinputdevice_support}"
993 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_voicecontrol_support=%{?tizen_wearable_feature_voicecontrol_support}"
994
995 ./tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
996
997 ninja -C out/Default %{?_smp_mflags}
998 pushd out
999 mv Default bin_wearable_emulator
1000 popd
1001 %endif # wearable-extension-emulator
1002
1003 pushd out
1004 %if "%{?profile}" == "wearable"
1005 ln -sf bin_wearable Default
1006 %endif
1007 popd
1008
1009 %endif # WEARABLE
1010
1011 %if "%{?unified_build}" == "1" || "%{?profile}" == "tv"
1012 # TV
1013 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=tv -Dprivilege_engine=%{tizen_tv_privilege_engine}"
1014 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
1015 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
1016
1017 # ut flags
1018 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_ut_build=%{tizen_ut_build}"
1019
1020 # feature flags
1021 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_account_support=%{?tizen_tv_feature_account_support}"
1022 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_alarm_support=%{?tizen_tv_feature_alarm_support}"
1023 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_app_control_settings_support=%{?tizen_tv_feature_app_control_settings_support}"
1024 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_application_support=%{?tizen_tv_feature_application_support}"
1025 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_archive_support=%{?tizen_tv_feature_archive_support}"
1026 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_badge_support=%{?tizen_tv_feature_badge_support}"
1027 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bluetooth_support=%{?tizen_tv_feature_bluetooth_support}"
1028 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_calendar_support=%{?tizen_tv_feature_calendar_support}"
1029 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_callhistory_support=%{?tizen_tv_feature_callhistory_support}"
1030 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_contact_support=%{?tizen_tv_feature_contact_support}"
1031 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_content_support=%{?tizen_tv_feature_content_support}"
1032 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datacontrol_support=%{?tizen_tv_feature_datacontrol_support}"
1033 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datasync_support=%{?tizen_tv_feature_datasync_support}"
1034 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_download_support=%{?tizen_tv_feature_download_support}"
1035 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_exif_support=%{?tizen_tv_feature_exif_support}"
1036 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_feedback_support=%{?tizen_tv_feature_feedback_support}"
1037 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_filesystem_support=%{?tizen_tv_feature_filesystem_support}"
1038 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_fm_radio_support=%{?tizen_tv_feature_fm_radio_support}"
1039 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ham_support=%{?tizen_tv_feature_ham_support}"
1040 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_iotcon_support=%{?tizen_tv_feature_iotcon_support}"
1041 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_location_batch=%{?tizen_tv_feature_location_batch}"
1042 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_key_manager_support=%{?tizen_tv_feature_key_manager_support}"
1043 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_controller_support=%{?tizen_tv_feature_media_controller_support}"
1044 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_key_support=%{?tizen_tv_feature_media_key_support}"
1045 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_message_port_support=%{?tizen_tv_feature_message_port_support}"
1046 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_messaging_support=%{?tizen_tv_feature_messaging_support}"
1047 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_metadata_support=%{?tizen_tv_feature_metadata_support}"
1048 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nbs_support=%{?tizen_tv_feature_nbs_support}"
1049 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_emulation_support=%{?tizen_tv_feature_nfc_emulation_support}"
1050 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_support=%{?tizen_tv_feature_nfc_support}"
1051 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_notification_support=%{?tizen_tv_feature_notification_support}"
1052 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_package_support=%{?tizen_tv_feature_package_support}"
1053 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_player_util_support=%{?tizen_tv_feature_player_util_support}"
1054 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_power_support=%{?tizen_tv_feature_power_support}"
1055 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ppm_support=%{?tizen_tv_feature_ppm_support}"
1056 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_preference_support=%{?tizen_tv_feature_preference_support}"
1057 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_push_support=%{?tizen_tv_feature_push_support}"
1058 #GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sap_support=%{?tizen_tv_feature_sap_support}"
1059 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sensor_support=%{?tizen_tv_feature_sensor_support}"
1060 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_se_support=%{?tizen_tv_feature_se_support}"
1061 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sound_support=%{?tizen_tv_feature_sound_support}"
1062 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_tv_feature_system_info_support}"
1063 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_tv_feature_system_setting_support}"
1064 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_tv_feature_telephony_support}"
1065 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{?tizen_tv_feature_time_support}"
1066 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_tv_feature_inputdevice_support}"
1067 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_tv_feature_web_setting_support}"
1068 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_widget_service_support=%{?tizen_tv_feature_widget_service_support}"
1069 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_tv_feature_wi_fi_support}"
1070 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_tv_feature_tvinputdevice_support}"
1071 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_voicecontrol_support=%{?tizen_tv_feature_voicecontrol_support}"
1072
1073 ./tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
1074
1075 ninja -C out/Default %{?_smp_mflags}
1076 pushd out
1077 mv Default bin_tv
1078 %if "%{?profile}" == "tv"
1079 ln -sf bin_tv Default
1080 %endif
1081 popd
1082
1083 %endif # TV
1084
1085 %if "%{?unified_build}" == "1" || "%{?profile}" == "common" || "%{?profile}" == "ivi"
1086
1087 # UNIFIED / COMMON or IVI
1088 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=common -Dprivilege_engine=%{tizen_common_privilege_engine}"
1089
1090 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
1091 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
1092
1093 # ut flags
1094 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_ut_build=%{tizen_ut_build}"
1095
1096 # feature flags
1097 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_account_support=%{?tizen_common_feature_account_support}"
1098 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_alarm_support=%{?tizen_common_feature_alarm_support}"
1099 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_app_control_settings_support=%{?tizen_common_feature_app_control_settings_support}"
1100 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_application_support=%{?tizen_common_feature_application_support}"
1101 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_archive_support=%{?tizen_common_feature_archive_support}"
1102 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_badge_support=%{?tizen_common_feature_badge_support}"
1103 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bluetooth_support=%{?tizen_common_feature_bluetooth_support}"
1104 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_calendar_support=%{?tizen_common_feature_calendar_support}"
1105 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_callhistory_support=%{?tizen_common_feature_callhistory_support}"
1106 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_contact_support=%{?tizen_common_feature_contact_support}"
1107 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_content_support=%{?tizen_common_feature_content_support}"
1108 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datacontrol_support=%{?tizen_common_feature_datacontrol_support}"
1109 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datasync_support=%{?tizen_common_feature_datasync_support}"
1110 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_download_support=%{?tizen_common_feature_download_support}"
1111 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_exif_support=%{?tizen_common_feature_exif_support}"
1112 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_feedback_support=%{?tizen_common_feature_feedback_support}"
1113 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_filesystem_support=%{?tizen_common_feature_filesystem_support}"
1114 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_fm_radio_support=%{?tizen_common_feature_fm_radio_support}"
1115 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ham_support=%{?tizen_common_feature_ham_support}"
1116 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_iotcon_support=%{?tizen_common_feature_iotcon_support}"
1117 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_location_batch=%{?tizen_common_feature_location_batch}"
1118 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_key_manager_support=%{?tizen_common_feature_key_manager_support}"
1119 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_controller_support=%{?tizen_common_feature_media_controller_support}"
1120 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_key_support=%{?tizen_common_feature_media_key_support}"
1121 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_message_port_support=%{?tizen_common_feature_message_port_support}"
1122 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_messaging_support=%{?tizen_common_feature_messaging_support}"
1123 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_metadata_support=%{?tizen_common_feature_metadata_support}"
1124 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nbs_support=%{?tizen_common_feature_nbs_support}"
1125 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_emulation_support=%{?tizen_common_feature_nfc_emulation_support}"
1126 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_support=%{?tizen_common_feature_nfc_support}"
1127 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_notification_support=%{?tizen_common_feature_notification_support}"
1128 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_package_support=%{?tizen_common_feature_package_support}"
1129 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_player_util_support=%{?tizen_common_feature_player_util_support}"
1130 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_power_support=%{?tizen_common_feature_power_support}"
1131 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ppm_support=%{?tizen_common_feature_ppm_support}"
1132 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_preference_support=%{?tizen_common_feature_preference_support}"
1133 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_push_support=%{?tizen_common_feature_push_support}"
1134 #GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sap_support=%{?tizen_common_feature_sap_support}"
1135 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sensor_support=%{?tizen_common_feature_sensor_support}"
1136 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_se_support=%{?tizen_common_feature_se_support}"
1137 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sound_support=%{?tizen_common_feature_sound_support}"
1138 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_common_feature_system_info_support}"
1139 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_common_feature_system_setting_support}"
1140 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_common_feature_telephony_support}"
1141 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{?tizen_common_feature_time_support}"
1142 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_common_feature_inputdevice_support}"
1143 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_common_feature_web_setting_support}"
1144 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_widget_service_support=%{?tizen_common_feature_widget_service_support}"
1145 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_common_feature_wi_fi_support}"
1146 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_common_feature_tvinputdevice_support}"
1147 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_voicecontrol_support=%{?tizen_common_feature_voicecontrol_support}"
1148
1149 ./tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
1150
1151 %if "%{?unified_build}" == "1"
1152 # UNIFIED
1153 ninja -C out/Default %{?_smp_mflags}
1154 pushd out
1155 mv Default bin_common
1156 ln -sf bin_common Default
1157
1158 # IVI does not have independent configurations, yet.
1159 # Copying the whole result in order to support ivi subpacakge
1160 cp -R bin_common bin_ivi
1161
1162 popd
1163 %else # UNIFIED
1164 # COMMON or IVI
1165 ninja -C out/Default %{?_smp_mflags}
1166 pushd out
1167 mv Default bin_%{?profile}
1168 ln -sf bin_%{?profile} Default
1169 popd
1170 %endif # COMMON or IVI
1171 %endif # UNIFIED / COMMON or IVI
1172
1173 %install
1174
1175 # Extensions.
1176 mkdir -p %{buildroot}%{crosswalk_extensions_path}
1177
1178 %if "%{?unified_build}" == "1" || "%{?profile}" == "common"
1179 mkdir -p %{buildroot}%{crosswalk_extensions_path}/common
1180 install -p -m 644 out/bin_common/libtizen*.so %{buildroot}%{crosswalk_extensions_path}/common
1181 # execute desc_gentool
1182 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path}/common out/Default/desc_gentool \
1183         %{crosswalk_extensions_path}/common \
1184         %{buildroot}%{crosswalk_extensions_path}/common > plugins.json
1185
1186 # temporary plugins description for lazy loading
1187 install -p -m 644 plugins.json %{buildroot}%{crosswalk_extensions_path}/common/plugins.json
1188 %endif
1189
1190 %if "%{?unified_build}" == "1" || "%{?profile}" == "mobile"
1191 mkdir -p %{buildroot}%{crosswalk_extensions_path}/mobile
1192
1193 # tizen ut mobile
1194 %if "%{?tizen_ut_build}"  == "1"
1195 mkdir -p %{buildroot}/usr/bin
1196 install -p -m 755 out/bin_mobile/webapi_common_tests %{buildroot}/usr/bin/
1197 install -p -m 755 out/bin_mobile/webapi_bluetooth_tests %{buildroot}/usr/bin/
1198 %endif
1199
1200 install -p -m 644 out/bin_mobile/libtizen*.so %{buildroot}%{crosswalk_extensions_path}/mobile
1201 # execute desc_gentool
1202 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path}/mobile out/Default/desc_gentool \
1203         %{crosswalk_extensions_path}/mobile \
1204         %{buildroot}%{crosswalk_extensions_path}/mobile > plugins.json
1205
1206 # temporary plugins description for lazy loading
1207 install -p -m 644 plugins.json %{buildroot}%{crosswalk_extensions_path}/mobile/plugins.json
1208
1209 # mobile-extension-emulator
1210 %ifarch %{ix86} x86_64
1211 mkdir -p %{buildroot}%{crosswalk_extensions_path}/mobile_emulator
1212 install -p -m 644 out/bin_mobile_emulator/libtizen*.so %{buildroot}%{crosswalk_extensions_path}/mobile_emulator
1213 # execute desc_gentool
1214 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path}/mobile_emulator out/Default/desc_gentool \
1215         %{crosswalk_extensions_path}/mobile_emulator \
1216         %{buildroot}%{crosswalk_extensions_path}/mobile_emulator > plugins.json
1217
1218 # temporary plugins description for lazy loading
1219 install -p -m 644 plugins.json %{buildroot}%{crosswalk_extensions_path}/mobile_emulator/plugins.json
1220 %endif // mobile-extension-emulator
1221
1222 %endif // mobile
1223
1224 %if "%{?unified_build}" == "1" || "%{?profile}" == "wearable"
1225 mkdir -p %{buildroot}%{crosswalk_extensions_path}/wearable
1226
1227 # tizen ut wearable
1228 %if "%{?tizen_ut_build}"  == "1"
1229 mkdir -p %{buildroot}/usr/bin
1230 install -p -m 755 out/bin_wearable/webapi_common_tests %{buildroot}/usr/bin/
1231 install -p -m 755 out/bin_wearable/webapi_bluetooth_tests %{buildroot}/usr/bin/
1232 %endif
1233
1234 install -p -m 644 out/bin_wearable/libtizen*.so %{buildroot}%{crosswalk_extensions_path}/wearable
1235 # execute desc_gentool
1236 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path}/wearable out/Default/desc_gentool \
1237         %{crosswalk_extensions_path}/wearable \
1238         %{buildroot}%{crosswalk_extensions_path}/wearable > plugins.json
1239
1240 # temporary plugins description for lazy loading
1241 install -p -m 644 plugins.json %{buildroot}%{crosswalk_extensions_path}/wearable/plugins.json
1242
1243 # wearable-extension-emulator
1244 %ifarch %{ix86} x86_64
1245 mkdir -p %{buildroot}%{crosswalk_extensions_path}/wearable_emulator
1246 install -p -m 644 out/bin_wearable_emulator/libtizen*.so %{buildroot}%{crosswalk_extensions_path}/wearable_emulator
1247 # execute desc_gentool
1248 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path}/wearable_emulator out/Default/desc_gentool \
1249         %{crosswalk_extensions_path}/wearable_emulator \
1250         %{buildroot}%{crosswalk_extensions_path}/wearable_emulator > plugins.json
1251
1252 # temporary plugins description for lazy loading
1253 install -p -m 644 plugins.json %{buildroot}%{crosswalk_extensions_path}/wearable_emulator/plugins.json
1254 %endif // wearable-extension-emulator
1255
1256 %endif // wearable
1257
1258 %if "%{?unified_build}" == "1" || "%{?profile}" == "tv"
1259 mkdir -p %{buildroot}%{crosswalk_extensions_path}/tv
1260 install -p -m 644 out/bin_tv/libtizen*.so %{buildroot}%{crosswalk_extensions_path}/tv
1261 # execute desc_gentool
1262 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path}/tv out/Default/desc_gentool \
1263         %{crosswalk_extensions_path}/tv \
1264         %{buildroot}%{crosswalk_extensions_path}/tv > plugins.json
1265
1266 # temporary plugins description for lazy loading
1267 install -p -m 644 plugins.json %{buildroot}%{crosswalk_extensions_path}/tv/plugins.json
1268 %endif
1269
1270 %if "%{?unified_build}" == "1" || "%{?profile}" == "ivi"
1271 mkdir -p %{buildroot}%{crosswalk_extensions_path}/ivi
1272 install -p -m 644 out/bin_ivi/libtizen*.so %{buildroot}%{crosswalk_extensions_path}/ivi
1273 # execute desc_gentool
1274 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path}/ivi out/Default/desc_gentool \
1275         %{crosswalk_extensions_path}/ivi \
1276         %{buildroot}%{crosswalk_extensions_path}/ivi > plugins.json
1277
1278 # temporary plugins description for lazy loading
1279 install -p -m 644 plugins.json %{buildroot}%{crosswalk_extensions_path}/ivi/plugins.json
1280 %endif
1281
1282 # devel files
1283 mkdir -p %{buildroot}%{_libdir}/pkgconfig
1284 cp packaging/%{name}.pc.in %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
1285 sed -i s,__LIB_DIR__,%{crosswalk_extensions_path},g %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
1286 sed -i s,__INCLUDE_DIR__,%{_includedir}/%{name}/src,g %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
1287 mkdir -p %{buildroot}%{_includedir}/%{name}/src/common
1288 mkdir -p %{buildroot}%{_includedir}/%{name}/src/common/filesystem
1289 install -p -m 644 src/common/*.h %{buildroot}%{_includedir}/%{name}/src/common
1290 install -p -m 644 src/common/filesystem/*.h %{buildroot}%{_includedir}/%{name}/src/common/filesystem
1291 install -p -m 644 src/common/*.gypi %{buildroot}%{_includedir}/%{name}/src/common
1292 install -p -m 644 src/common/XW_Extension.cc %{buildroot}%{_includedir}/%{name}/src/common
1293 mkdir -p %{buildroot}%{_includedir}/%{name}/tools
1294 install -p -m 644 tools/generate_api.py %{buildroot}%{_includedir}/%{name}/tools
1295 install -p -m 644 tools/mergejs.py %{buildroot}%{_includedir}/%{name}/tools
1296 cp -a tools/gyp %{buildroot}%{_includedir}/%{name}/tools/gyp
1297 cp -a tools/slimit %{buildroot}%{_includedir}/%{name}/tools/slimit
1298 cp -a out/Default/desc_gentool %{buildroot}%{_includedir}/%{name}/tools/desc_gentool
1299
1300 %files
1301 %manifest webapi-plugins.manifest
1302 %license LICENSE
1303
1304 %if "%{?unified_build}" == "1" || "%{?profile}" == "common"
1305 %post profile_common
1306 ln -sf %{crosswalk_extensions_path}/common/* %{crosswalk_extensions_path}
1307 %preun profile_common
1308 # This is an un-installation.
1309 if [ "$1" == "0" ]; then
1310   rm %{crosswalk_extensions_path}/libtizen*.so
1311   rm %{crosswalk_extensions_path}/plugins.json
1312 fi
1313 %files profile_common
1314 %dir %{crosswalk_extensions_path}/common/
1315 %{crosswalk_extensions_path}/common/libtizen*.so
1316 %{crosswalk_extensions_path}/common/plugins.json
1317 %manifest webapi-plugins.manifest
1318 %endif
1319
1320 %if "%{?unified_build}" == "1" || "%{?profile}" == "mobile"
1321 %post profile_mobile
1322 ln -sf %{crosswalk_extensions_path}/mobile/* %{crosswalk_extensions_path}
1323 %preun profile_mobile
1324 # This is an un-installation.
1325 if [ "$1" == "0" ]; then
1326   if [ -n "$(ls %{crosswalk_extensions_path}/ | grep libtizen*.so)" ]; then
1327     rm %{crosswalk_extensions_path}/libtizen*.so
1328   fi
1329   if [ -f %{crosswalk_extensions_path}/plugins.json ]; then
1330     rm %{crosswalk_extensions_path}/plugins.json
1331   fi
1332 fi
1333 %files profile_mobile
1334 %dir %{crosswalk_extensions_path}/mobile/
1335 %{crosswalk_extensions_path}/mobile/libtizen*.so
1336 %{crosswalk_extensions_path}/mobile/plugins.json
1337 %manifest webapi-plugins.manifest
1338
1339 # UT files
1340 %if "%{?tizen_ut_build}" == "1"
1341 %license GTEST.BSD-3-Clause
1342 /usr/bin/webapi_common_tests
1343 /usr/bin/webapi_bluetooth_tests
1344 %endif
1345
1346 # mobile-extension-emulator
1347 %ifarch %{ix86} x86_64
1348 %post mobile-extension-emulator
1349 ln -sf %{crosswalk_extensions_path}/mobile_emulator/* %{crosswalk_extensions_path}
1350 %preun mobile-extension-emulator
1351 # This is an un-installation.
1352 if [ "$1" == "0" ]; then
1353   if [ -n "$(ls %{crosswalk_extensions_path}/ | grep libtizen*.so)" ]; then
1354     rm %{crosswalk_extensions_path}/libtizen*.so
1355   fi
1356   if [ -f %{crosswalk_extensions_path}/plugins.json ]; then
1357     rm %{crosswalk_extensions_path}/plugins.json
1358   fi
1359 fi
1360 %files mobile-extension-emulator
1361 %dir %{crosswalk_extensions_path}/mobile_emulator/
1362 %{crosswalk_extensions_path}/mobile_emulator/libtizen*.so
1363 %{crosswalk_extensions_path}/mobile_emulator/plugins.json
1364 %manifest webapi-plugins.manifest
1365 %endif // mobile-extension-emulator
1366 %endif // mobile
1367
1368 %if "%{?unified_build}" == "1" || "%{?profile}" == "wearable"
1369 %post profile_wearable
1370 ln -sf %{crosswalk_extensions_path}/wearable/* %{crosswalk_extensions_path}
1371 %preun profile_wearable
1372 # This is an un-installation.
1373 if [ "$1" == "0" ]; then
1374   if [ -n "$(ls %{crosswalk_extensions_path}/ | grep libtizen*.so)" ]; then
1375     rm %{crosswalk_extensions_path}/libtizen*.so
1376   fi
1377   if [ -f %{crosswalk_extensions_path}/plugins.json ]; then
1378     rm %{crosswalk_extensions_path}/plugins.json
1379   fi
1380 fi
1381 %files profile_wearable
1382 %dir %{crosswalk_extensions_path}/wearable/
1383 %{crosswalk_extensions_path}/wearable/libtizen*.so
1384 %{crosswalk_extensions_path}/wearable/plugins.json
1385 %manifest webapi-plugins.manifest
1386
1387 # UT files
1388 %if "%{?tizen_ut_build}" == "1"
1389 %license GTEST.BSD-3-Clause
1390 /usr/bin/webapi_common_tests
1391 /usr/bin/webapi_bluetooth_tests
1392 %endif
1393
1394 # wearable-extension-emulator
1395 %ifarch %{ix86} x86_64
1396 %post wearable-extension-emulator
1397 ln -sf %{crosswalk_extensions_path}/wearable_emulator/* %{crosswalk_extensions_path}
1398 %preun wearable-extension-emulator
1399 # This is an un-installation.
1400 if [ "$1" == "0" ]; then
1401   if [ -n "$(ls %{crosswalk_extensions_path}/ | grep libtizen*.so)" ]; then
1402     rm %{crosswalk_extensions_path}/libtizen*.so
1403   fi
1404   if [ -f %{crosswalk_extensions_path}/plugins.json ]; then
1405     rm %{crosswalk_extensions_path}/plugins.json
1406   fi
1407 fi
1408 %files wearable-extension-emulator
1409 %dir %{crosswalk_extensions_path}/wearable_emulator/
1410 %{crosswalk_extensions_path}/wearable_emulator/libtizen*.so
1411 %{crosswalk_extensions_path}/wearable_emulator/plugins.json
1412 %manifest webapi-plugins.manifest
1413 %endif // wearable-extension-emulator
1414 %endif // wearable
1415
1416 %if "%{?unified_build}" == "1" || "%{?profile}" == "tv"
1417 %post profile_tv
1418 ln -sf %{crosswalk_extensions_path}/tv/* %{crosswalk_extensions_path}
1419 %preun profile_tv
1420 # This is an un-installation.
1421 if [ "$1" == "0" ]; then
1422   rm %{crosswalk_extensions_path}/libtizen*.so
1423   rm %{crosswalk_extensions_path}/plugins.json
1424 fi
1425 %files profile_tv
1426 %dir %{crosswalk_extensions_path}/tv/
1427 %{crosswalk_extensions_path}/tv/libtizen*.so
1428 %{crosswalk_extensions_path}/tv/plugins.json
1429 %manifest webapi-plugins.manifest
1430 %endif
1431
1432 %if "%{?unified_build}" == "1" || "%{?profile}" == "ivi"
1433 %post profile_ivi
1434 ln -sf %{crosswalk_extensions_path}/ivi/* %{crosswalk_extensions_path}
1435 %preun profile_ivi
1436 # This is an un-installation.
1437 if [ "$1" == "0" ]; then
1438   rm %{crosswalk_extensions_path}/libtizen*.so
1439   rm %{crosswalk_extensions_path}/plugins.json
1440 fi
1441 %files profile_ivi
1442 %dir %{crosswalk_extensions_path}/ivi/
1443 %{crosswalk_extensions_path}/ivi/libtizen*.so
1444 %{crosswalk_extensions_path}/ivi/plugins.json
1445 %manifest webapi-plugins.manifest
1446 %endif
1447
1448 %files devel
1449 %{_includedir}/*
1450 %{_libdir}/pkgconfig/*