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