[version] 1.4
[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.4
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 %define tizen_feature_telephony_support               1
96 %define tizen_feature_time_support                    1
97 %define tizen_feature_web_setting_support             1
98 %define tizen_feature_widget_service_support          1
99 %if 0%{?tizen_is_emulator}
100 %define tizen_feature_wi_fi_support                   0
101 %else
102 %define tizen_feature_wi_fi_support                   1
103 %endif
104 %define tizen_feature_inputdevice_support             1
105
106 %if 0%{?tizen_feature_telephony_support}
107 %define tizen_feature_callhistory_support             1
108 %define tizen_feature_nbs_support                     1
109 %else
110 %define tizen_feature_callhistory_support             0
111 %define tizen_feature_nbs_support                     0
112 %endif
113
114 %define tizen_feature_tvinputdevice_support           0
115
116 %endif # tizen_profile_mobile
117
118 ####################################################################
119 #       Wearable Profile :  B2 / TW1                      #
120 ####################################################################
121 %if "%{?profile}" == "wearable"
122
123 %define tizen_privilege_engine                        CYNARA
124
125 # Account API is optional in Tizen Wearable Profile.
126 %define tizen_feature_account_support                 0
127
128 %define tizen_feature_alarm_support                   1
129 %define tizen_feature_app_control_settings_support    1
130 %define tizen_feature_application_support             1
131
132 # Archive API is optional in Tizen Wearable Profile.
133 %define tizen_feature_archive_support                 1
134
135 # Badge API is mandatory in Tizen Wearable Profile.
136 %define tizen_feature_badge_support                   1
137
138 %if 0%{?tizen_is_emulator}
139 %define tizen_feature_bluetooth_support               0
140 %else
141 %define tizen_feature_bluetooth_support               1
142 %endif
143
144 # Bookmark API is optional in Tizen Wearable Profile.
145 %define tizen_feature_bookmark_support                0
146
147 # Calendar API is mandatory in Tizen Wearable Profile.
148 %define tizen_feature_calendar_support                0
149 %define tizen_feature_contact_support                 0
150 %define tizen_feature_content_support                 1
151 %define tizen_feature_datacontrol_support             1
152 %define tizen_feature_datasync_support                0
153 %define tizen_feature_download_support                1
154 %define tizen_feature_exif_support                    1
155 %define tizen_feature_feedback_support                1
156 %define tizen_feature_filesystem_support              1
157 %define tizen_feature_fm_radio_support                0
158 %define tizen_feature_ham_support                     1
159 %define tizen_feature_iotcon_support                  0
160 %define tizen_feature_location_batch                  0
161 %define tizen_feature_media_controller_support        1
162
163 # MediayKey API is optional in Tizen Wearable Profile.
164 # tizen.org/feature/network.bluetooth.audio.media is required for MediayKey API
165 %if 0%{?tizen_is_emulator}
166 %define tizen_feature_media_key_support               0
167 %else
168 %define tizen_feature_media_key_support               1
169 %endif
170 %define tizen_feature_key_manager_support             1
171 %define tizen_feature_message_port_support            1
172 %define tizen_feature_messaging_support               0
173
174 %if 0%{?tizen_is_emulator}
175 %define tizen_feature_nfc_emulation_support           0
176 %define tizen_feature_nfc_support                     0
177 %else
178 %define tizen_feature_nfc_emulation_support           0
179 %define tizen_feature_nfc_support                     1
180 %endif
181 %define tizen_feature_notification_support            1
182 %define tizen_feature_package_support                 1
183 %define tizen_feature_power_support                   1
184 %define tizen_feature_preference_support              1
185 %define tizen_feature_push_support                    1
186 %if 0%{?tizen_is_emulator}
187 %define tizen_feature_se_support                      0
188 %else
189 %define tizen_feature_se_support                      1
190 %endif
191 %define tizen_feature_sensor_support                  1
192 %define tizen_feature_sound_support                   1
193 %define tizen_feature_system_info_support             1
194 %define tizen_feature_system_setting_support          1
195 %if 0%{?tizen_is_emulator}
196 %define tizen_feature_telephony_support               1
197 %else
198 %define tizen_feature_telephony_support               0
199 %endif
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 BuildRequires: pkgconfig(appsvc)
313
314 %if %{with wayland}
315 %define display_type wayland
316 BuildRequires: pkgconfig(wayland-client)
317 %else
318 %define display_type x11
319 #BuildRequires: pkgconfig(x11)
320 #BuildRequires: pkgconfig(xrandr)
321 %endif
322
323 %if "%{?tizen_privilege_engine}" == "ACE"
324 BuildRequires: pkgconfig(security-privilege-checker)
325 %endif
326
327 %if "%{?tizen_privilege_engine}" == "CYNARA"
328 BuildRequires: pkgconfig(cynara-client)
329 BuildRequires: pkgconfig(libsmack)
330 %endif
331
332 %if 0%{?tizen_feature_account_support}
333 BuildRequires: pkgconfig(accounts-svc)
334 %endif
335
336 %if 0%{?tizen_feature_alarm_support}
337 BuildRequires: pkgconfig(capi-appfw-alarm)
338 BuildRequires: pkgconfig(alarm-service)
339 %endif
340
341 %if 0%{?tizen_feature_bookmark_support}
342 BuildRequires: pkgconfig(capi-web-bookmark)
343 BuildRequires: pkgconfig(bookmark-adaptor)
344 %endif
345
346 %if 0%{?tizen_feature_datacontrol_support}
347 BuildRequires: pkgconfig(capi-data-control)
348 %endif
349
350 %if 0%{?tizen_feature_download_support}
351 BuildRequires: pkgconfig(capi-web-url-download)
352 %endif
353
354 %if 0%{?tizen_feature_ham_support}
355 BuildRequires: pkgconfig(motion)
356 BuildRequires: pkgconfig(capi-system-sensor)
357 BuildRequires: pkgconfig(capi-location-manager)
358 BuildRequires: pkgconfig(sensor)
359 %endif
360
361 %if 0%{?tizen_feature_iotcon_support}
362 BuildRequires: pkgconfig(iotcon)
363 %endif
364
365 %if 0%{?tizen_feature_power_support}
366 BuildRequires: pkgconfig(deviced)
367 %endif
368
369 %if 0%{?tizen_feature_power_support}
370 BuildRequires: pkgconfig(capi-appfw-application)
371 %endif
372
373 %if 0%{?tizen_feature_push_support}
374 BuildRequires: pkgconfig(push)
375 %endif
376
377 %if 0%{?tizen_feature_key_manager_support}
378 BuildRequires: pkgconfig(key-manager)
379 %endif
380
381 %if 0%{?tizen_feature_media_controller_support}
382 BuildRequires: pkgconfig(capi-media-controller)
383 %endif
384
385 %if 0%{?tizen_feature_messaging_support}
386 BuildRequires:  pkgconfig(ecore-file)
387 BuildRequires:  pkgconfig(email-service)
388 BuildRequires:  pkgconfig(msg-service)
389 BuildRequires:  pkgconfig(db-util)
390 %endif
391
392 %if 0%{?tizen_feature_badge_support}
393 BuildRequires:  pkgconfig(badge)
394 %endif
395
396 %if 0%{?tizen_feature_calendar_support}
397 BuildRequires:  pkgconfig(calendar-service2)
398 %endif
399
400 %if 0%{?tizen_feature_contact_support}
401 BuildRequires:  pkgconfig(contacts-service2)
402 %endif
403
404 %if 0%{?tizen_feature_callhistory_support}
405 BuildRequires:  pkgconfig(contacts-service2)
406 %endif
407
408 %if 0%{?tizen_feature_exif_support}
409 BuildRequires:  pkgconfig(libexif)
410 %endif
411
412 %if 0%{?tizen_feature_nfc_support}
413 BuildRequires:  pkgconfig(capi-network-nfc)
414 %endif
415
416 %if 0%{?tizen_feature_fm_radio_support}
417 BuildRequires: pkgconfig(capi-media-radio)
418 %endif
419
420 %if 0%{?tizen_feature_feedback_support}
421 BuildRequires: pkgconfig(feedback)
422 %endif
423
424 %if 0%{?tizen_feature_se_support}
425 BuildRequires:  pkgconfig(smartcard-service)
426 BuildRequires:  pkgconfig(smartcard-service-common)
427 %endif
428
429 %if 0%{?tizen_feature_message_port_support}
430 BuildRequires: pkgconfig(capi-message-port)
431 %endif
432
433 %if 0%{?tizen_feature_notification_support}
434 BuildRequires: pkgconfig(notification)
435 %endif
436
437 %if 0%{?tizen_feature_sound_support}
438 BuildRequires:  pkgconfig(capi-media-sound-manager)
439 %endif
440
441 %if 0%{?tizen_feature_sensor_support}
442 BuildRequires: pkgconfig(capi-system-sensor)
443 %endif
444
445 %if 0%{?tizen_feature_media_key_support}
446 BuildRequires:  pkgconfig(capi-system-media-key)
447 %endif
448
449 %if 0%{?tizen_feature_widget_service_support}
450 BuildRequires: pkgconfig(widget_service)
451 %endif
452
453 %description
454 Tizen Web APIs implemented.
455
456 %package devel
457 Summary:    webapi-plugins development headers
458 Group:      Development/Libraries
459 Requires:   %{name} = %{version}
460
461 %description devel
462 webapi-plugins development headers
463
464 %prep
465 %setup -q
466
467 %build
468
469 export GYP_GENERATORS='ninja'
470 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{profile} -Dprivilege_engine=%{tizen_privilege_engine}"
471 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
472 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
473
474 # feature flags
475 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_is_emulator=%{?tizen_is_emulator}"
476 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_account_support=%{?tizen_feature_account_support}"
477 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_alarm_support=%{?tizen_feature_alarm_support}"
478 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_app_control_settings_support=%{?tizen_feature_app_control_settings_support}"
479 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_application_support=%{?tizen_feature_application_support}"
480 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_archive_support=%{?tizen_feature_archive_support}"
481 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_badge_support=%{?tizen_feature_badge_support}"
482 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bluetooth_support=%{?tizen_feature_bluetooth_support}"
483 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_bookmark_support=%{?tizen_feature_bookmark_support}"
484 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_calendar_support=%{?tizen_feature_calendar_support}"
485 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_callhistory_support=%{?tizen_feature_callhistory_support}"
486 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_contact_support=%{?tizen_feature_contact_support}"
487 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_content_support=%{?tizen_feature_content_support}"
488 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datacontrol_support=%{?tizen_feature_datacontrol_support}"
489 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_datasync_support=%{?tizen_feature_datasync_support}"
490 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_download_support=%{?tizen_feature_download_support}"
491 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_exif_support=%{?tizen_feature_exif_support}"
492 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_feedback_support=%{?tizen_feature_feedback_support}"
493 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_filesystem_support=%{?tizen_feature_filesystem_support}"
494 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_fm_radio_support=%{?tizen_feature_fm_radio_support}"
495 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_ham_support=%{?tizen_feature_ham_support}"
496 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_iotcon_support=%{?tizen_feature_iotcon_support}"
497 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_location_batch=%{?tizen_feature_location_batch}"
498 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_key_manager_support=%{?tizen_feature_key_manager_support}"
499 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_controller_support=%{?tizen_feature_media_controller_support}"
500 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_media_key_support=%{?tizen_feature_media_key_support}"
501 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_message_port_support=%{?tizen_feature_message_port_support}"
502 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_messaging_support=%{?tizen_feature_messaging_support}"
503 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nbs_support=%{?tizen_feature_nbs_support}"
504 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_emulation_support=%{?tizen_feature_nfc_emulation_support}"
505 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_nfc_support=%{?tizen_feature_nfc_support}"
506 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_notification_support=%{?tizen_feature_notification_support}"
507 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_package_support=%{?tizen_feature_package_support}"
508 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_power_support=%{?tizen_feature_power_support}"
509 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_preference_support=%{?tizen_feature_preference_support}"
510 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_push_support=%{?tizen_feature_push_support}"
511 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sap_support=%{?tizen_feature_sap_support}"
512 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sensor_support=%{?tizen_feature_sensor_support}"
513 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_se_support=%{?tizen_feature_se_support}"
514 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_sound_support=%{?tizen_feature_sound_support}"
515 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_feature_system_info_support}"
516 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_feature_system_setting_support}"
517 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_feature_telephony_support}"
518 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{?tizen_feature_time_support}"
519 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_feature_inputdevice_support}"
520 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_feature_web_setting_support}"
521 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_widget_service_support=%{?tizen_feature_widget_service_support}"
522 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_feature_wi_fi_support}"
523 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_feature_tvinputdevice_support}"
524
525 ./tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
526
527 ninja -C out/Default %{?_smp_mflags}
528
529 %install
530 mkdir -p %{buildroot}/usr/share/license
531 cp LICENSE %{buildroot}/usr/share/license/%{name}
532 cat LICENSE.BSD-2.0 >> %{buildroot}/usr/share/license/%{name}
533
534 # Extensions.
535 mkdir -p %{buildroot}%{crosswalk_extensions_path}
536 install -p -m 644 out/Default/libtizen*.so %{buildroot}%{crosswalk_extensions_path}
537
538 # devel files
539 mkdir -p %{buildroot}%{_libdir}/pkgconfig
540 sed -i s,__LIB_DIR__,%{crosswalk_extensions_path},g packaging/%{name}.pc.in
541 sed -i s,__INCLUDE_DIR__,%{_includedir}/%{name}/src,g packaging/%{name}.pc.in
542 cp packaging/%{name}.pc.in %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
543 mkdir -p %{buildroot}%{_includedir}/%{name}/src/common
544 install -p -m 644 src/common/*.h %{buildroot}%{_includedir}/%{name}/src/common
545 install -p -m 644 src/common/*.gypi %{buildroot}%{_includedir}/%{name}/src/common
546 install -p -m 644 src/common/XW_Extension.cc %{buildroot}%{_includedir}/%{name}/src/common
547 mkdir -p %{buildroot}%{_includedir}/%{name}/tools
548 install -p -m 644 tools/generate_api.py %{buildroot}%{_includedir}/%{name}/tools
549 install -p -m 644 tools/mergejs.py %{buildroot}%{_includedir}/%{name}/tools
550 install -p -m 644 tools/js_minimize.py %{buildroot}%{_includedir}/%{name}/tools
551 cp -a tools/gyp %{buildroot}%{_includedir}/%{name}/tools/gyp
552 cp -a tools/slimit %{buildroot}%{_includedir}/%{name}/tools/slimit
553 cp -a out/Default/desc_gentool %{buildroot}%{_includedir}/%{name}/tools/desc_gentool
554
555 # execute desc_gentool
556 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path} out/Default/desc_gentool \
557         %{crosswalk_extensions_path} \
558         %{buildroot}%{crosswalk_extensions_path} > plugins.json
559
560 # temporary plugins description for lazy loading
561 install -p -m 644 plugins.json %{buildroot}%{crosswalk_extensions_path}/plugins.json
562
563
564 %files
565 %{crosswalk_extensions_path}/libtizen*.so
566 %{crosswalk_extensions_path}/plugins.json
567 %{_datadir}/license/%{name}
568 %manifest webapi-plugins.manifest
569
570 %files devel
571 %{_includedir}/*
572 %{_libdir}/pkgconfig/*