tizen 2.3.1 release
[framework/web/wearable/wrt-plugins-tizen.git] / packaging / wrt-plugins-tizen.spec
1 Name:       wrt-plugins-tizen
2 Summary:    JavaScript plugins for WebRuntime
3 Version:    0.5.67
4 Release:    0
5 Group:      Development/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8
9 %define    tizen_profile_mobile    0
10 %define    tizen_profile_wearable    1
11 %define    tizen_profile_tv    0
12
13 %define    tizen_feature_core_api_support    0
14 %define    tizen_feature_impl_backward_compatible_support    1
15
16 %define    tizen_feature_app_control_setting_support    1
17
18 # Tizen Web Device APIs
19 # Account API is optional in Tizen Wearable Profile.
20 %define    tizen_feature_account_support    0
21
22 # Archive API is optional in Tizen Wearable Profile.
23 %define    tizen_feature_archive_support    1
24
25 # Badge API is mandatory in Tizen Wearable Profile.
26 %define    tizen_feature_badge_support    1
27
28 # Bluetooth API is optional in Tizen Wearable Profile.
29 %ifarch %{arm}
30 # ARM
31 %define    tizen_feature_bluetooth_support    1
32 %define    tizen_feature_bluetooth_health_support    1
33 %define    tizen_feature_bluetooth_always_on    0
34 %else
35 # I586
36 %define    tizen_feature_bluetooth_support    0
37 %define    tizen_feature_bluetooth_health_support    0
38 %define    tizen_feature_bluetooth_always_on    0
39 %endif
40
41 # Bookmark API is optional in Tizen Wearable Profile.
42 %define    tizen_feature_bookmark_support    0
43
44 # Calendar API is mandatory in Tizen Wearable Profile.
45 %define    tizen_feature_calendar_support    0
46
47 # Contact API is optional in Tizen Wearable Profile.
48 %define    tizen_feature_contact_support    0
49
50 # Content API is mandatory in Tizen Wearable Profile.
51 %define    tizen_feature_content_support    1
52
53 # DataControl API is optional in Tizen Wearable Profile.
54 %define    tizen_feature_datacontrol_support    0
55
56 # DataSynchronization API is optional in Tizen Wearable Profile.
57 %define    tizen_feature_datasync_support    0
58
59 # Download API is optional in Tizen Wearable Profile.
60 %ifarch %{arm}
61 %define    tizen_feature_download_support    0
62 %else
63 %define    tizen_feature_download_support    1
64 %endif
65
66 # Exif API is optional in Tizen Wearable Profile.
67 %define    tizen_feature_exif_support    1
68
69 # FM Radio API is optional in Tizen Wearable Profile.
70 %define    tizen_feature_fm_radio_support    0
71
72 # HumanActivityMonitor(HAM) API is optional in Tizen Wearable Profile.
73 %define    tizen_feature_ham_support    1
74
75 # HumanActivityMonitor(HAM) - GPS type
76 %define    tizen_feature_location_batch    0
77
78 # MediayKey API is optional in Tizen Wearable Profile.
79 # tizen.org/feature/network.bluetooth.audio.media is required for MediayKey API
80 %ifarch %{arm}
81 %define    tizen_feature_mediakey_support    1
82 %else
83 %define    tizen_feature_mediakey_support    0
84 %endif
85
86 # MessagePort API is mandatory in Tizen Wearable Profile.
87 %define    tizen_feature_messageport_support    1
88
89 # Messaging API is optional in Tizen Wearable Profile.
90 %define    tizen_feature_messaging_support    0
91
92 # Messaging(Email) API is optional in Tizen Wearable Profile.
93 %define    tizen_feature_messaging_email_support    0
94
95 # NFC API is optional in Tizen Wearable Profile.
96 %ifarch %{arm}
97
98 %if 0%{?model_build_feature_nfc}
99 %define    tizen_feature_nfc_support    1
100 %define    tizen_feature_nfc_emulation_support    1
101 %else
102 %define    tizen_feature_nfc_support    0
103 %define    tizen_feature_nfc_emulation_support   0
104 %endif
105
106 %else
107 %define    tizen_feature_nfc_support    1
108 %define    tizen_feature_nfc_emulation_support    1
109 %endif
110
111 # Notification API is mandatory in Tizen Wearable Profile.
112 %define    tizen_feature_notification_support    1
113
114 # Power API is mandatory in Tizen Wearable Profile.
115 %define    tizen_feature_power_support    1
116
117 # Push API is optional in Tizen Wearable Profile.
118 %define    tizen_feature_push_support    0
119
120 # Sensor API is optional in Tizen Wearable Profile.
121 %define    tizen_feature_sensor_support    1
122
123 # Secure Element API is optional in Tizen Wearable Profile.
124 %ifarch %{arm}
125
126 %if 0%{?model_build_feature_smartcard }
127 %define    tizen_feature_se_support    1
128 %else
129 %define    tizen_feature_se_support    0
130 %endif
131
132 %else
133 %define    tizen_feature_se_support    0
134 %endif
135
136 # Sound API is mandatory in Tizen Wearable Profile.
137 %define    tizen_feature_sound_support    1
138
139 # SystemSetting API is optional in Tizen Wearable Profile.
140 %define    tizen_feature_system_setting_support    1
141 %define    tizen_feature_system_setting_home_screen_support    1
142 %define    tizen_feature_system_setting_lock_screen_support    0
143 %define    tizen_feature_system_setting_incoming_call_screen_support    1
144 %define    tizen_feature_system_setting_notification_email_screen_support    0
145
146 # Telephony feature is optional in Tizen Wearable Profile.
147 %define    tizen_feature_telephony_support    0
148
149 # WebSetting API is optional in Tizen Wearable Profile.
150 %define    tizen_feature_web_setting_support    0
151
152 # Wi-Fi feature is optional in Tizen Wearable Profile.
153 %define    tizen_feature_wi_fi_support    1
154
155 #- telephony related APIs
156 # CallHistory API is optional in Tizen Wearable Profile.
157 # NetworkBearerSelection API is optional in Tizen Wearable Profile.
158 %if 0%{?tizen_feature_telephony_support}
159 %define    tizen_feature_callhistory_support    1
160 %define    tizen_feature_nbs_support    1
161 %else
162 %define    tizen_feature_callhistory_support    0
163 %define    tizen_feature_nbs_support    0
164 %endif
165
166 BuildRequires:  pkgconfig(ewebkit2)
167 BuildRequires:  pkgconfig(dpl-efl)
168 BuildRequires:  pkgconfig(dpl-event-efl)
169 BuildRequires:  pkgconfig(wrt-plugins-types)
170 BuildRequires:  pkgconfig(wrt-plugins-commons)
171 BuildRequires:  pkgconfig(wrt-plugins-commons-javascript)
172 BuildRequires:  pkgconfig(wrt-plugins-plugin-manager)
173 BuildRequires:  pkgconfig(wrt-plugins-ipc-message)
174 BuildRequires:  pkgconfig(glib-2.0)
175 BuildRequires:  pkgconfig(ecore)
176 BuildRequires:  pkgconfig(dbus-1)
177 BuildRequires:  pkgconfig(libpcrecpp)
178 BuildRequires:  pkgconfig(dlog)
179 BuildRequires:  pkgconfig(capi-appfw-application)
180 BuildRequires:  pkgconfig(capi-appfw-app-manager)
181 BuildRequires:  pkgconfig(capi-appfw-alarm)
182 BuildRequires:  pkgconfig(capi-appfw-package-manager)
183 BuildRequires:  pkgconfig(storage)
184 BuildRequires:  pkgconfig(pkgmgr)
185 BuildRequires:  pkgconfig(pkgmgr-info)
186 BuildRequires:  pkgconfig(capi-system-info)
187 BuildRequires:  pkgconfig(libxml-2.0)
188 BuildRequires:  pkgconfig(capi-content-media-content)
189 BuildRequires:  pkgconfig(capi-media-metadata-extractor)
190 BuildRequires:  pkgconfig(appsvc)
191
192 BuildRequires:  pkgconfig(capi-system-device)
193
194 BuildRequires:  pkgconfig(capi-network-connection)
195 BuildRequires:  pkgconfig(notification)
196 BuildRequires:  pkgconfig(capi-system-runtime-info)
197 BuildRequires:  pkgconfig(capi-system-sensor)
198 BuildRequires:  pkgconfig(sensor)
199 BuildRequires:  pkgconfig(capi-system-system-settings)
200 BuildRequires:  pkgconfig(icu-i18n)
201 BuildRequires:  pkgconfig(icu-io)
202 BuildRequires:  pkgconfig(icu-le)
203 BuildRequires:  pkgconfig(icu-lx)
204 BuildRequires:  pkgconfig(icu-uc)
205
206 BuildRequires:  pkgconfig(tapi)
207 BuildRequires:  pkgconfig(capi-system-device)
208 BuildRequires:  expat-devel
209 BuildRequires:  cmake
210 BuildRequires:  gettext-devel
211
212 %if 0%{?tizen_feature_account_support}
213 BuildRequires:  pkgconfig(accounts-svc)
214 %endif
215
216 %if 0%{?tizen_feature_archive_support}
217 BuildRequires:  pkgconfig(minizip)
218 %endif
219
220 %if 0%{?tizen_feature_badge_support}
221 BuildRequires:  pkgconfig(badge)
222 %endif
223
224 %if 0%{?tizen_feature_bluetooth_support}
225 BuildRequires:  pkgconfig(capi-network-bluetooth)
226 %endif
227
228 %if 0%{?tizen_feature_bookmark_support}
229 BuildRequires:  pkgconfig(capi-web-bookmark)
230 %endif
231
232 %if 0%{?tizen_feature_calendar_support}
233 BuildRequires:  pkgconfig(calendar-service2)
234 %endif
235
236 %if 0%{?tizen_feature_contact_support}
237 BuildRequires:  pkgconfig(contacts-service2)
238 %endif
239
240 %if 0%{?tizen_feature_datacontrol_support}
241 BuildRequires:  pkgconfig(capi-data-control)
242 %endif
243
244 %if 0%{?tizen_feature_datasync_support}
245 BuildRequires:  pkgconfig(sync-agent)
246 %endif
247
248 %if 0%{?tizen_feature_download_support}
249 BuildRequires:  pkgconfig(capi-web-url-download)
250 %endif
251
252 %if 0%{?tizen_feature_exif_support}
253 BuildRequires:  pkgconfig(libexif)
254 %endif
255
256 %if 0%{?tizen_feature_fm_radio_support}
257 BuildRequires:  pkgconfig(capi-media-radio)
258 %endif
259
260 %if 0%{?tizen_feature_ham_support}
261 BuildRequires:  pkgconfig(sensor)
262 BuildRequires:  pkgconfig(glib-2.0)
263 BuildRequires:  pkgconfig(libcore-context-manager)
264 %endif
265
266 %if 0%{?tizen_feature_mediakey_support}
267 BuildRequires:  pkgconfig(capi-system-media-key)
268 %endif
269
270 %if 0%{?tizen_feature_messageport_support}
271 BuildRequires:  pkgconfig(message-port)
272 %endif
273
274 %if 0%{?tizen_feature_messaging_email_support}
275 BuildRequires:  pkgconfig(email-service)
276 %endif
277
278 %if 0%{?tizen_feature_nfc_support}
279 BuildRequires:  pkgconfig(capi-network-nfc)
280 %endif
281
282 %if 0%{?tizen_feature_power_support}
283 BuildRequires:  pkgconfig(deviced)
284 %endif
285
286 %if 0%{?tizen_feature_push_support}
287 BuildRequires:  pkgconfig(push)
288 %endif
289
290 %if 0%{?tizen_feature_se_support}
291 BuildRequires:  pkgconfig(smartcard-service-common)
292 BuildRequires:  pkgconfig(smartcard-service)
293 %endif
294
295 %if 0%{?tizen_feature_sensor_support}
296 BuildRequires:  pkgconfig(sensor)
297 BuildRequires:  pkgconfig(capi-system-sensor)
298 %endif
299
300 %if 0%{?tizen_feature_sound_support}
301 BuildRequires:  pkgconfig(capi-media-sound-manager)
302 BuildRequires:  pkgconfig(vconf)
303 %endif
304
305 %if 0%{?tizen_feature_wi_fi_support}
306 BuildRequires:  pkgconfig(capi-network-wifi)
307 %endif
308
309 Requires:  wrt-plugins-common
310
311 %description
312 JavaScript plugins for WebRuntime
313
314 %package devel
315 Summary:    Wrt-plugin-tizen development headers
316 Group:      Development/Libraries
317 Requires:   %{name} = %{version}
318
319 %description devel
320 Wrt-plugin-tizen development headers
321
322 %prep
323 %setup -q
324
325 %build
326
327 %define PREFIX "%{_libdir}/wrt-plugins"
328
329 export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
330
331 # enable debugging
332 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
333 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
334 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
335
336 cmake \
337 %if 0%{?tizen_profile_mobile}
338 -DENABLE_TIZEN_MOBILE_PROFILE=YES \
339 %endif
340 %if 0%{?tizen_profile_wearable}
341 -DENABLE_TIZEN_WEARABLE_PROFILE=YES \
342 %endif
343 %if 0%{?tizen_profile_tv}
344 -DENABLE_TIZEN_TV_PROFILE=YES \
345 %endif
346 %if 0%{?tizen_feature_impl_backward_compatible_support}
347 -DENABLE_IMPL_BACKWARD_COMPATIBLE=YES \
348 %endif
349 %if 0%{?tizen_feature_core_api_support}
350 -DENABLE_OPTIONAL_CORE_API=YES \
351 %endif
352 %if 0%{?tizen_feature_app_control_setting_support}
353 -DENABLE_TIZEN_APP_CONTROL_SETTING_SUPPORT=YES \
354 %endif
355 %if 0%{?tizen_feature_account_support}
356 -DENABLE_OPTIONAL_ACCOUNT=YES \
357 %endif
358 %if 0%{?tizen_feature_archive_support}
359 -DENABLE_OPTIONAL_ARCHIVE=YES \
360 %endif
361 %if 0%{?tizen_feature_badge_support}
362 -DENABLE_OPTIONAL_BADGE=YES \
363 %endif
364 %if 0%{?tizen_feature_bluetooth_support}
365 -DENABLE_OPTIONAL_BT=YES \
366 %endif
367 %if 0%{?tizen_feature_bluetooth_health_support}
368 -DENABLE_OPTIONAL_BT_HEALTH=YES \
369 %endif
370 %if 0%{?tizen_feature_bluetooth_always_on}
371 -DENABLE_OPTIONAL_BT_ALWAYS_ON=YES \
372 %endif
373 %if 0%{?tizen_feature_bookmark_support}
374 -DENABLE_OPTIONAL_BOOKMARK=YES \
375 %endif
376 %if 0%{?tizen_feature_calendar_support}
377 -DENABLE_OPTIONAL_CALENDAR=YES \
378 %endif
379 %if 0%{?tizen_feature_callhistory_support}
380 -DENABLE_OPTIONAL_CALL_HISTORY=YES \
381 %endif
382 %if 0%{?tizen_feature_contact_support}
383 -DENABLE_OPTIONAL_CONTACT=YES \
384 %endif
385 %if 0%{?tizen_feature_content_support}
386 -DENABLE_OPTIONAL_CONTENT=YES \
387 %endif
388 %if 0%{?tizen_feature_datacontrol_support}
389 -DENABLE_OPTIONAL_DATA_CONTROL=YES \
390 %endif
391 %if 0%{?tizen_feature_datasync_support}
392 -DENABLE_OPTIONAL_DATA_SYNC=YES \
393 %endif
394 %if 0%{?tizen_feature_download_support}
395 -DENABLE_OPTIONAL_DOWNLOAD=YES \
396 %endif
397 %if 0%{?tizen_feature_exif_support}
398 -DENABLE_OPTIONAL_EXIF=YES \
399 %endif
400 %if 0%{?tizen_feature_fm_radio_support}
401 -DENABLE_OPTIONAL_FM_RADIO=YES \
402 %endif
403 %if 0%{?tizen_feature_ham_support}
404 -DENABLE_OPTIONAL_HAM=YES \
405 %endif
406 %if 0%{?tizen_feature_location_batch}
407 -DENABLE_OPTIONAL_LOCATION_BATCH=YES \
408 %endif
409 %if 0%{?tizen_feature_mediakey_support}
410 -DENABLE_OPTIONAL_MEDIAKEY=YES \
411 %endif
412 %if 0%{?tizen_feature_messageport_support}
413 -DENABLE_OPTIONAL_MESSAGE_PORT=YES \
414 %endif
415 %if 0%{?tizen_feature_messaging_support}
416 -DENABLE_OPTIONAL_MESSAGING=YES \
417 %endif
418 %if 0%{?tizen_feature_messaging_email_support}
419 -DENABLE_OPTIONAL_MESSAGING_EMAIL=YES \
420 %endif
421 %if 0%{?tizen_feature_nbs_support}
422 -DENABLE_OPTIONAL_NBS=YES \
423 %endif
424 %if 0%{?tizen_feature_nfc_support}
425 -DENABLE_OPTIONAL_NFC=YES \
426 %endif
427 %if 0%{?tizen_feature_nfc_emulation_support}
428 -DENABLE_OPTIONAL_NFC_EMULATION=YES \
429 %endif
430 %if 0%{?tizen_feature_notification_support}
431 -DENABLE_OPTIONAL_NOTIFICATION=YES \
432 %endif
433 %if 0%{?tizen_feature_power_support}
434 -DENABLE_OPTIONAL_POWER=YES \
435 %endif
436 %if 0%{?tizen_feature_push_support}
437 -DENABLE_OPTIONAL_PUSH=YES \
438 %endif
439 %if 0%{?tizen_feature_se_support}
440 -DENABLE_OPTIONAL_SE=YES \
441 %endif
442 %if 0%{?tizen_feature_sensor_support}
443 -DENABLE_OPTIONAL_SENSOR=YES \
444 %endif
445 %if 0%{?tizen_feature_sound_support}
446 -DENABLE_OPTIONAL_SOUND=YES \
447 %endif
448 %if 0%{?tizen_feature_system_setting_support}
449 -DENABLE_OPTIONAL_SYSTEM_SETTING=YES \
450 %endif
451 %if 0%{?tizen_feature_system_setting_home_screen_support}
452 -DENABLE_OPTIONAL_SYSTEM_SETTING_HOME_SCREEN=YES \
453 %endif
454 %if 0%{?define tizen_feature_system_setting_lock_screen_support}
455 -DENABLE_OPTIONAL_SYSTEM_SETTING_LOCK_SCREEN=YES \
456 %endif
457 %if 0%{?tizen_feature_system_setting_incoming_call_screen_support}
458 -DENABLE_OPTIONAL_SYSTEM_SETTING_INCOMING_CALL=YES \
459 %endif
460 %if 0%{?tizen_feature_system_setting_notification_email_screen_support}
461 -DENABLE_OPTIONAL_SYSTEM_SETTING_EMAIL_SCREEN=YES \
462 %endif
463 %if 0%{?tizen_feature_telephony_support}
464 -DENABLE_OPTIONAL_TELEPHONY=YES \
465 %endif
466 %if 0%{?tizen_feature_web_setting_support}
467 -DENABLE_OPTIONAL_WEB_SETTING=YES \
468 %endif
469 %if 0%{?tizen_feature_wi_fi_support}
470 -DENABLE_OPTIONAL_WI_FI=YES \
471 %endif
472 -DCMAKE_INSTALL_PREFIX=%{_prefix} -DDPL_LOG="OFF" -DENABLE_TIME_TRACER="OFF"
473
474 make %{?jobs:-j%jobs}
475
476 %install
477 rm -rf %{buildroot}
478 %make_install
479 mkdir -p %{buildroot}/usr/share/license
480 cp LICENSE %{buildroot}/usr/share/license/%{name}
481
482 %post
483
484 %postun
485
486
487 %files
488 %manifest wrt-plugins-tizen.manifest 
489 %{_libdir}/wrt-plugins/*
490 /usr/etc/tizen-apis/*
491 /usr/share/license/*
492
493 %files devel
494 %{_includedir}/*
495 %{_libdir}/pkgconfig/*