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