c3c7348bf6b1fd914deb7d6ed0bab06a1064ab1b
[platform/core/api/webapi-plugins.git] / packaging / webapi-plugins.spec
1 %bcond_with wayland
2
3 %{!?profile:%define profile tv}
4
5 %define _manifestdir %{TZ_SYS_RW_PACKAGES}
6 %define _desktop_icondir %{TZ_SYS_SHARE}/icons/default/small
7
8 %define crosswalk_extensions tizen-extensions-crosswalk
9
10 %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions}
11
12 Name:       webapi-plugins
13 Version:    1.86
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 %ifarch %{arm} aarch64
21 # ARM
22 %define tizen_is_emulator           0
23 %else
24 # I586
25 %define tizen_is_emulator           1
26 %endif
27
28 %if "%{_repository}" == "arm64-wayland"
29 # 64bit
30 %define tizen_is_arm64           1
31 %else
32 # 32bit
33 %define tizen_is_arm64           0
34 %endif
35
36 ####################################################################
37 #       Common Profile : artik                                     #
38 ####################################################################
39 %if "%{?profile}" == "common"
40
41 %define tizen_privilege_engine                        CYNARA
42
43 %define tizen_feature_account_support                 0
44 %define tizen_feature_alarm_support                   1
45 %define tizen_feature_app_control_settings_support    1
46 %define tizen_feature_application_support             1
47 %define tizen_feature_archive_support                 0
48 %define tizen_feature_badge_support                   0
49 %define tizen_feature_bluetooth_support               1
50 %define tizen_feature_bookmark_support                0
51 %define tizen_feature_calendar_support                0
52 %define tizen_feature_contact_support                 0
53 %define tizen_feature_content_support                 1
54 %define tizen_feature_datacontrol_support             0
55 %define tizen_feature_datasync_support                0
56 %define tizen_feature_download_support                1
57 %define tizen_feature_exif_support                    1
58 %define tizen_feature_feedback_support                0
59 %define tizen_feature_filesystem_support              1
60 %define tizen_feature_fm_radio_support                0
61 %define tizen_feature_ham_support                     0
62 %define tizen_feature_iotcon_support                  0
63 %define tizen_feature_location_batch                  0
64 %define tizen_feature_key_manager_support             0
65 %define tizen_feature_media_controller_support        0
66 %define tizen_feature_media_key_support               0
67 %define tizen_feature_message_port_support            1
68 %define tizen_feature_messaging_support               0
69 %define tizen_feature_nfc_emulation_support           0
70 %define tizen_feature_nfc_support                     0
71 %define tizen_feature_notification_support            0
72 %define tizen_feature_package_support                 1
73 %define tizen_feature_player_util_support             0
74 %define tizen_feature_power_support                   0
75 %define tizen_feature_preference_support              0
76 %define tizen_feature_push_support                    0
77 %define tizen_feature_se_support                      0
78 %define tizen_feature_sensor_support                  0
79 %define tizen_feature_sound_support                   1
80 %define tizen_feature_system_info_support             1
81 %define tizen_feature_system_setting_support          0
82 %define tizen_feature_telephony_support               0
83 %define tizen_feature_time_support                    1
84 %define tizen_feature_web_setting_support             0
85 %define tizen_feature_widget_service_support          0
86 %define tizen_feature_wi_fi_support                   1
87 %define tizen_feature_inputdevice_support             0
88 %define tizen_feature_callhistory_support             0
89 %define tizen_feature_nbs_support                     0
90 %define tizen_feature_tvinputdevice_support           0
91
92 %endif # tizen_profile_common
93
94 ####################################################################
95 #       Mobile Profile :  TM1(32bit), Redwood(SM-Z910F), KIRAN(Z130H)          #
96 #                         TM2(64bit)
97 ####################################################################
98 %if "%{?profile}" == "mobile"
99
100 %define tizen_privilege_engine                        CYNARA
101
102 %define tizen_feature_account_support                 1
103 %define tizen_feature_alarm_support                   1
104 %define tizen_feature_app_control_settings_support    1
105 %define tizen_feature_application_support             1
106 %define tizen_feature_archive_support                 1
107 %define tizen_feature_badge_support                   1
108 %if 0%{?tizen_is_emulator}
109 %define tizen_feature_bluetooth_support               0
110 %else
111 %define tizen_feature_bluetooth_support               1
112 %endif
113 %define tizen_feature_bookmark_support                1
114 %define tizen_feature_calendar_support                1
115 %define tizen_feature_contact_support                 1
116 %define tizen_feature_content_support                 1
117 %define tizen_feature_datacontrol_support             1
118 %define tizen_feature_datasync_support                0
119 %define tizen_feature_download_support                1
120 %define tizen_feature_exif_support                    1
121 %define tizen_feature_feedback_support                1
122 %define tizen_feature_filesystem_support              1
123
124 # FM radio feature
125 %if 0%{?tizen_is_emulator}
126 %define tizen_feature_fm_radio_support                1
127 %else
128 %if 0%{?tizen_is_arm64}
129 %define tizen_feature_fm_radio_support                0
130 %else
131 %define tizen_feature_fm_radio_support                1
132 %endif
133 %endif
134
135 %if 0%{?tizen_is_emulator}
136 %define tizen_feature_ham_support                     1
137 %else
138 %define tizen_feature_ham_support                     0
139 %endif
140 %define tizen_feature_iotcon_support                  1
141 %define tizen_feature_location_batch                  0
142 %define tizen_feature_key_manager_support             1
143 %define tizen_feature_media_controller_support        1
144 %if 0%{?tizen_is_emulator}
145 %define tizen_feature_media_key_support               0
146 %else
147 %define tizen_feature_media_key_support               1
148 %endif
149 %define tizen_feature_message_port_support            1
150 %define tizen_feature_messaging_support               1
151
152 %if 0%{?tizen_is_emulator}
153 %define tizen_feature_nfc_emulation_support           0
154 %define tizen_feature_nfc_support                     1
155 %else
156 %define tizen_feature_nfc_emulation_support           0
157 %define tizen_feature_nfc_support                     0
158 %endif
159 %define tizen_feature_notification_support            1
160 %define tizen_feature_package_support                 1
161 %define tizen_feature_player_util_support             1
162 %define tizen_feature_power_support                   1
163 %define tizen_feature_preference_support              1
164 %define tizen_feature_push_support                    1
165
166 # secure element feature
167 %if 0%{?tizen_is_emulator}
168 %define tizen_feature_se_support                      0
169 %else
170 %if 0%{?tizen_is_arm64}
171 %define tizen_feature_se_support                      0
172 %else
173 %define tizen_feature_se_support                      1
174 %endif
175 %endif
176
177 %define tizen_feature_sensor_support                  1
178 %define tizen_feature_sound_support                   1
179 %define tizen_feature_system_info_support             1
180 %define tizen_feature_system_setting_support          1
181
182 # telephony feature
183 %if 0%{?tizen_is_emulator}
184 %define tizen_feature_telephony_support               1
185 %else
186 %if 0%{?tizen_is_arm64}
187 %define tizen_feature_telephony_support               0
188 %else
189 %define tizen_feature_telephony_support               1
190 %endif
191 %endif
192
193 %define tizen_feature_time_support                    1
194 %define tizen_feature_web_setting_support             1
195 %define tizen_feature_widget_service_support          1
196 %if 0%{?tizen_is_emulator}
197 %define tizen_feature_wi_fi_support                   0
198 %else
199 %define tizen_feature_wi_fi_support                   1
200 %endif
201 %define tizen_feature_inputdevice_support             1
202
203 %if 0%{?tizen_feature_telephony_support}
204 %define tizen_feature_callhistory_support             1
205 %define tizen_feature_nbs_support                     1
206 %else
207 %define tizen_feature_callhistory_support             0
208 %define tizen_feature_nbs_support                     0
209 %endif
210
211 %define tizen_feature_tvinputdevice_support           0
212
213 %define tizen_feature_convergence_support             0
214
215 %endif # tizen_profile_mobile
216
217 ####################################################################
218 #       Wearable Profile :  B2 / TW1                      #
219 ####################################################################
220 %if "%{?profile}" == "wearable"
221
222 %define tizen_privilege_engine                        CYNARA
223
224 # Account API is optional in Tizen Wearable Profile.
225 %define tizen_feature_account_support                 0
226
227 %define tizen_feature_alarm_support                   1
228 %define tizen_feature_app_control_settings_support    1
229 %define tizen_feature_application_support             1
230
231 # Archive API is optional in Tizen Wearable Profile.
232 %define tizen_feature_archive_support                 1
233
234 # Badge API is mandatory in Tizen Wearable Profile.
235 %define tizen_feature_badge_support                   1
236
237 %if 0%{?tizen_is_emulator}
238 %define tizen_feature_bluetooth_support               0
239 %else
240 %define tizen_feature_bluetooth_support               1
241 %endif
242
243 # Bookmark API is optional in Tizen Wearable Profile.
244 %define tizen_feature_bookmark_support                0
245
246 # Calendar API is mandatory in Tizen Wearable Profile.
247 %define tizen_feature_calendar_support                0
248 %define tizen_feature_contact_support                 0
249 %define tizen_feature_content_support                 1
250 %define tizen_feature_datacontrol_support             1
251 %define tizen_feature_datasync_support                0
252 %define tizen_feature_download_support                1
253 %define tizen_feature_exif_support                    1
254 %define tizen_feature_feedback_support                1
255 %define tizen_feature_filesystem_support              1
256 %define tizen_feature_fm_radio_support                0
257 %define tizen_feature_ham_support                     1
258 %define tizen_feature_iotcon_support                  1
259 %define tizen_feature_location_batch                  0
260 %define tizen_feature_media_controller_support        1
261
262 # MediayKey API is optional in Tizen Wearable Profile.
263 # tizen.org/feature/network.bluetooth.audio.media is required for MediayKey API
264 %if 0%{?tizen_is_emulator}
265 %define tizen_feature_media_key_support               0
266 %else
267 %define tizen_feature_media_key_support               1
268 %endif
269 %define tizen_feature_key_manager_support             1
270 %define tizen_feature_message_port_support            1
271 %define tizen_feature_messaging_support               0
272 %define tizen_feature_nfc_emulation_support           0
273 %define tizen_feature_nfc_support                     1
274 %define tizen_feature_notification_support            1
275 %define tizen_feature_package_support                 1
276 %define tizen_feature_player_util_support             1
277 %define tizen_feature_power_support                   1
278 %define tizen_feature_preference_support              1
279 %define tizen_feature_push_support                    1
280 %if 0%{?tizen_is_emulator}
281 %define tizen_feature_se_support                      0
282 %else
283 %define tizen_feature_se_support                      1
284 %endif
285 %define tizen_feature_sensor_support                  1
286 %define tizen_feature_sound_support                   1
287 %define tizen_feature_system_info_support             1
288 %define tizen_feature_system_setting_support          1
289 %if 0%{?tizen_is_emulator}
290 %define tizen_feature_telephony_support               1
291 %else
292 %define tizen_feature_telephony_support               0
293 %endif
294 %define tizen_feature_time_support                    1
295 %define tizen_feature_web_setting_support             0
296 %define tizen_feature_widget_service_support          1
297 %define tizen_feature_wi_fi_support                   1
298 %define tizen_feature_inputdevice_support             1
299 %define tizen_feature_tvinputdevice_support           0
300
301 #- telephony related APIs
302 # CallHistory API is optional in Tizen Wearable Profile.
303 # NetworkBearerSelection API is optional in Tizen Wearable Profile.
304 %if 0%{?tizen_feature_telephony_support}
305 %define    tizen_feature_callhistory_support          1
306 %define    tizen_feature_nbs_support                  1
307 %else
308 %define    tizen_feature_callhistory_support          0
309 %define    tizen_feature_nbs_support                  0
310 %endif
311
312 %define tizen_feature_convergence_support             0
313
314 %endif # tizen_profile_wearable
315
316 ####################################################################
317 #       TV Profile                                                 #
318 ####################################################################
319 %if "%{?profile}" == "tv"
320
321 %define tizen_privilege_engine                        CYNARA
322
323 %define tizen_feature_account_support                 0
324 %define tizen_feature_alarm_support                   1
325 %define tizen_feature_app_control_settings_support    0
326 %define tizen_feature_application_support             1
327 %define tizen_feature_archive_support                 1
328 %define tizen_feature_badge_support                   0
329 %define tizen_feature_bluetooth_support               0
330 %define tizen_feature_bookmark_support                0
331 %define tizen_feature_calendar_support                0
332 %define tizen_feature_callhistory_support             0
333 %define tizen_feature_contact_support                 0
334 %define tizen_feature_content_support                 1
335 %define tizen_feature_datacontrol_support             1
336 %define tizen_feature_datasync_support                0
337 %define tizen_feature_download_support                1
338 %define tizen_feature_exif_support                    1
339 %define tizen_feature_feedback_support                0
340 %define tizen_feature_filesystem_support              1
341 %define tizen_feature_fm_radio_support                0
342 %define tizen_feature_ham_support                     0
343 %define tizen_feature_iotcon_support                  1
344 %define tizen_feature_key_manager_support             1
345 %define tizen_feature_media_controller_support        0
346 %define tizen_feature_media_key_support               1
347 %define tizen_feature_message_port_support            1
348 %define tizen_feature_messaging_support               0
349 %define tizen_feature_nbs_support                     0
350 %define tizen_feature_nfc_emulation_support           0
351 %define tizen_feature_nfc_support                     0
352 %define tizen_feature_notification_support            0
353 %define tizen_feature_package_support                 1
354 %define tizen_feature_player_util_support             0
355 %define tizen_feature_power_support                   0
356 %define tizen_feature_preference_support              0
357 %define tizen_feature_push_support                    1
358 %define tizen_feature_se_support                      0
359 %define tizen_feature_sensor_support                  0
360 %define tizen_feature_sound_support                   0
361 %define tizen_feature_system_info_support             1
362 %define tizen_feature_system_setting_support          0
363 %define tizen_feature_telephony_support               0
364 %define tizen_feature_time_support                    1
365 %define tizen_feature_web_setting_support             1
366 %define tizen_feature_widget_service_support          0
367 %define tizen_feature_wi_fi_support                   1
368 %define tizen_feature_inputdevice_support             0
369 %define tizen_feature_tvinputdevice_support           1
370 %define tizen_feature_convergence_support             0
371
372 %endif # tizen_profile_tv
373
374 BuildRequires: pkgconfig(security-privilege-manager)
375 BuildRequires: ninja
376 BuildRequires: pkgconfig(appcore-common)
377 BuildRequires: pkgconfig(dlog)
378 BuildRequires: pkgconfig(evas)
379 BuildRequires: pkgconfig(gio-unix-2.0)
380 BuildRequires: pkgconfig(gio-2.0)
381 BuildRequires: pkgconfig(glib-2.0)
382 BuildRequires: pkgconfig(libudev)
383 BuildRequires: pkgconfig(minizip)
384 BuildRequires: pkgconfig(zlib)
385 BuildRequires: pkgconfig(pkgmgr)
386 BuildRequires: pkgconfig(pkgmgr-info)
387 BuildRequires: pkgconfig(pkgmgr-installer)
388 BuildRequires: pkgconfig(vconf)
389 BuildRequires: pkgconfig(ecore)
390 BuildRequires: pkgconfig(icu-i18n)
391 BuildRequires: pkgconfig(aul)
392 BuildRequires: pkgconfig(storage)
393 BuildRequires: python
394 BuildRequires: pkgconfig(capi-base-common)
395 BuildRequires: pkgconfig(capi-system-info)
396 BuildRequires: pkgconfig(capi-system-runtime-info)
397 BuildRequires: pkgconfig(capi-network-connection)
398 BuildRequires: pkgconfig(capi-system-device)
399 BuildRequires: pkgconfig(capi-system-system-settings)
400 BuildRequires: pkgconfig(capi-network-bluetooth)
401 BuildRequires: pkgconfig(capi-network-wifi-manager)
402 BuildRequires: pkgconfig(tapi)
403 BuildRequires: pkgconfig(libpcrecpp)
404 BuildRequires: pkgconfig(capi-appfw-application)
405 BuildRequires: pkgconfig(capi-appfw-app-manager)
406 BuildRequires: pkgconfig(capi-appfw-package-manager)
407 BuildRequires: pkgconfig(capi-content-media-content)
408 BuildRequires: pkgconfig(capi-media-metadata-extractor)
409 BuildRequires: pkgconfig(libtzplatform-config)
410 BuildRequires: pkgconfig(appsvc)
411
412 %if %{with wayland}
413 %define display_type wayland
414 BuildRequires: pkgconfig(wayland-client)
415 %else
416 %define display_type x11
417 #BuildRequires: pkgconfig(x11)
418 #BuildRequires: pkgconfig(xrandr)
419 %endif
420
421 %if "%{?tizen_privilege_engine}" == "ACE"
422 BuildRequires: pkgconfig(security-privilege-checker)
423 %endif
424
425 %if "%{?tizen_privilege_engine}" == "CYNARA"
426 BuildRequires: pkgconfig(cynara-client)
427 BuildRequires: pkgconfig(libsmack)
428 %endif
429
430 %if 0%{?tizen_feature_account_support}
431 BuildRequires: pkgconfig(accounts-svc)
432 %endif
433
434 %if 0%{?tizen_feature_alarm_support}
435 BuildRequires: pkgconfig(capi-appfw-alarm)
436 BuildRequires: pkgconfig(alarm-service)
437 %endif
438
439 %if 0%{?tizen_feature_bookmark_support}
440 BuildRequires: pkgconfig(capi-web-bookmark)
441 BuildRequires: pkgconfig(bookmark-adaptor)
442 %endif
443
444 %if 0%{?tizen_feature_datacontrol_support}
445 BuildRequires: pkgconfig(capi-data-control)
446 %endif
447
448 %if 0%{?tizen_feature_download_support}
449 BuildRequires: pkgconfig(capi-web-url-download)
450 %endif
451
452 %if 0%{?tizen_feature_ham_support}
453 BuildRequires: pkgconfig(motion)
454 BuildRequires: pkgconfig(capi-system-sensor)
455 BuildRequires: pkgconfig(capi-location-manager)
456 BuildRequires: pkgconfig(sensor)
457 %endif
458
459 %if 0%{?tizen_feature_iotcon_support}
460 BuildRequires: pkgconfig(iotcon)
461 %endif
462
463 %if 0%{?tizen_feature_player_util_support}
464 BuildRequires: pkgconfig(chromium-efl)
465 %endif
466
467 %if 0%{?tizen_feature_power_support}
468 BuildRequires: pkgconfig(deviced)
469 %endif
470
471 %if 0%{?tizen_feature_power_support}
472 BuildRequires: pkgconfig(capi-appfw-application)
473 %endif
474
475 %if 0%{?tizen_feature_push_support}
476 BuildRequires: pkgconfig(push)
477 %endif
478
479 %if 0%{?tizen_feature_key_manager_support}
480 BuildRequires: pkgconfig(key-manager)
481 %endif
482
483 %if 0%{?tizen_feature_media_controller_support}
484 BuildRequires: pkgconfig(capi-media-controller)
485 %endif
486
487 %if 0%{?tizen_feature_messaging_support}
488 BuildRequires:  pkgconfig(ecore-file)
489 BuildRequires:  pkgconfig(email-service)
490 BuildRequires:  pkgconfig(msg-service)
491 BuildRequires:  pkgconfig(db-util)
492 %endif
493
494 %if 0%{?tizen_feature_badge_support}
495 BuildRequires:  pkgconfig(badge)
496 %endif
497
498 %if 0%{?tizen_feature_calendar_support}
499 BuildRequires:  pkgconfig(calendar-service2)
500 %endif
501
502 %if 0%{?tizen_feature_contact_support}
503 BuildRequires:  pkgconfig(contacts-service2)
504 %endif
505
506 %if 0%{?tizen_feature_callhistory_support}
507 BuildRequires:  pkgconfig(contacts-service2)
508 %endif
509
510 %if 0%{?tizen_feature_exif_support}
511 BuildRequires:  pkgconfig(libexif)
512 %endif
513
514 %if 0%{?tizen_feature_nfc_support}
515 BuildRequires:  pkgconfig(capi-network-nfc)
516 %endif
517
518 %if 0%{?tizen_feature_fm_radio_support}
519 BuildRequires: pkgconfig(capi-media-radio)
520 %endif
521
522 %if 0%{?tizen_feature_feedback_support}
523 BuildRequires: pkgconfig(feedback)
524 %endif
525
526 %if 0%{?tizen_feature_se_support}
527 BuildRequires:  pkgconfig(capi-network-smartcard)
528 %endif
529
530 %if 0%{?tizen_feature_message_port_support}
531 BuildRequires: pkgconfig(capi-message-port)
532 %endif
533
534 %if 0%{?tizen_feature_notification_support}
535 BuildRequires: pkgconfig(notification)
536 %endif
537
538 %if 0%{?tizen_feature_sound_support}
539 BuildRequires:  pkgconfig(capi-media-sound-manager)
540 %endif
541
542 %if 0%{?tizen_feature_sensor_support}
543 BuildRequires: pkgconfig(capi-system-sensor)
544 %endif
545
546 %if 0%{?tizen_feature_media_key_support}
547 BuildRequires:  pkgconfig(capi-system-media-key)
548 %endif
549
550 %if 0%{?tizen_feature_convergence_support}
551 BuildRequires: pkgconfig(d2d-conv-manager)
552 %endif
553
554 %if 0%{?tizen_feature_widget_service_support}
555 BuildRequires: pkgconfig(widget_service)
556 %endif
557
558 %description
559 Tizen Web APIs implemented.
560
561 %package devel
562 Summary:    webapi-plugins development headers
563 Group:      Development/Libraries
564 Requires:   %{name} = %{version}
565
566 %description devel
567 webapi-plugins development headers
568
569 %prep
570 %setup -q
571
572 %build
573
574 export GYP_GENERATORS='ninja'
575 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{profile} -Dprivilege_engine=%{tizen_privilege_engine}"
576 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
577 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
578
579 # feature flags
580 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_is_emulator=%{?tizen_is_emulator}"
581 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_account_support=%{?tizen_feature_account_support}"
582 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_alarm_support=%{?tizen_feature_alarm_support}"
583 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_app_control_settings_support=%{?tizen_feature_app_control_settings_support}"
584 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_application_support=%{?tizen_feature_application_support}"
585 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_archive_support=%{?tizen_feature_archive_support}"
586 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_badge_support=%{?tizen_feature_badge_support}"
587 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bluetooth_support=%{?tizen_feature_bluetooth_support}"
588 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bookmark_support=%{?tizen_feature_bookmark_support}"
589 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_calendar_support=%{?tizen_feature_calendar_support}"
590 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_callhistory_support=%{?tizen_feature_callhistory_support}"
591 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_contact_support=%{?tizen_feature_contact_support}"
592 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_content_support=%{?tizen_feature_content_support}"
593 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datacontrol_support=%{?tizen_feature_datacontrol_support}"
594 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datasync_support=%{?tizen_feature_datasync_support}"
595 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_download_support=%{?tizen_feature_download_support}"
596 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_exif_support=%{?tizen_feature_exif_support}"
597 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_feedback_support=%{?tizen_feature_feedback_support}"
598 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_filesystem_support=%{?tizen_feature_filesystem_support}"
599 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_fm_radio_support=%{?tizen_feature_fm_radio_support}"
600 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ham_support=%{?tizen_feature_ham_support}"
601 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_iotcon_support=%{?tizen_feature_iotcon_support}"
602 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_location_batch=%{?tizen_feature_location_batch}"
603 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_key_manager_support=%{?tizen_feature_key_manager_support}"
604 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_controller_support=%{?tizen_feature_media_controller_support}"
605 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_key_support=%{?tizen_feature_media_key_support}"
606 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_message_port_support=%{?tizen_feature_message_port_support}"
607 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_messaging_support=%{?tizen_feature_messaging_support}"
608 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nbs_support=%{?tizen_feature_nbs_support}"
609 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_emulation_support=%{?tizen_feature_nfc_emulation_support}"
610 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_support=%{?tizen_feature_nfc_support}"
611 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_notification_support=%{?tizen_feature_notification_support}"
612 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_package_support=%{?tizen_feature_package_support}"
613 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_player_util_support=%{?tizen_feature_player_util_support}"
614 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_power_support=%{?tizen_feature_power_support}"
615 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_preference_support=%{?tizen_feature_preference_support}"
616 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_push_support=%{?tizen_feature_push_support}"
617 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sap_support=%{?tizen_feature_sap_support}"
618 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sensor_support=%{?tizen_feature_sensor_support}"
619 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_se_support=%{?tizen_feature_se_support}"
620 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sound_support=%{?tizen_feature_sound_support}"
621 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_feature_system_info_support}"
622 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_feature_system_setting_support}"
623 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_feature_telephony_support}"
624 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{?tizen_feature_time_support}"
625 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_feature_inputdevice_support}"
626 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_feature_web_setting_support}"
627 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_widget_service_support=%{?tizen_feature_widget_service_support}"
628 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_feature_wi_fi_support}"
629 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_feature_tvinputdevice_support}"
630 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_convergence_support=%{?tizen_feature_convergence_support}"
631
632 ./tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
633
634 ninja -C out/Default %{?_smp_mflags}
635
636 %install
637 mkdir -p %{buildroot}/usr/share/license
638 cp LICENSE %{buildroot}/usr/share/license/%{name}
639 cat LICENSE.BSD-3-Clause >> %{buildroot}/usr/share/license/%{name}
640 cat LICENSE.MIT >> %{buildroot}/usr/share/license/%{name}
641
642 # Extensions.
643 mkdir -p %{buildroot}%{crosswalk_extensions_path}
644 install -p -m 644 out/Default/libtizen*.so %{buildroot}%{crosswalk_extensions_path}
645
646 # devel files
647 mkdir -p %{buildroot}%{_libdir}/pkgconfig
648 sed -i s,__LIB_DIR__,%{crosswalk_extensions_path},g packaging/%{name}.pc.in
649 sed -i s,__INCLUDE_DIR__,%{_includedir}/%{name}/src,g packaging/%{name}.pc.in
650 cp packaging/%{name}.pc.in %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
651 mkdir -p %{buildroot}%{_includedir}/%{name}/src/common
652 mkdir -p %{buildroot}%{_includedir}/%{name}/src/common/filesystem
653 install -p -m 644 src/common/*.h %{buildroot}%{_includedir}/%{name}/src/common
654 install -p -m 644 src/common/filesystem/*.h %{buildroot}%{_includedir}/%{name}/src/common/filesystem
655 install -p -m 644 src/common/*.gypi %{buildroot}%{_includedir}/%{name}/src/common
656 install -p -m 644 src/common/XW_Extension.cc %{buildroot}%{_includedir}/%{name}/src/common
657 mkdir -p %{buildroot}%{_includedir}/%{name}/tools
658 install -p -m 644 tools/generate_api.py %{buildroot}%{_includedir}/%{name}/tools
659 install -p -m 644 tools/mergejs.py %{buildroot}%{_includedir}/%{name}/tools
660 install -p -m 644 tools/js_minimize.py %{buildroot}%{_includedir}/%{name}/tools
661 cp -a tools/gyp %{buildroot}%{_includedir}/%{name}/tools/gyp
662 cp -a tools/slimit %{buildroot}%{_includedir}/%{name}/tools/slimit
663 cp -a out/Default/desc_gentool %{buildroot}%{_includedir}/%{name}/tools/desc_gentool
664
665 # execute desc_gentool
666 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path} out/Default/desc_gentool \
667         %{crosswalk_extensions_path} \
668         %{buildroot}%{crosswalk_extensions_path} > plugins.json
669
670 # temporary plugins description for lazy loading
671 install -p -m 644 plugins.json %{buildroot}%{crosswalk_extensions_path}/plugins.json
672
673
674 %files
675 %{crosswalk_extensions_path}/libtizen*.so
676 %{crosswalk_extensions_path}/plugins.json
677 %{_datadir}/license/%{name}
678 %manifest webapi-plugins.manifest
679
680 %files devel
681 %{_includedir}/*
682 %{_libdir}/pkgconfig/*