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