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