vector-animation-renderer: Implements rive animation
[platform/core/uifw/dali-extension.git] / packaging / dali-extension.spec
1 # NOTES
2 # This spec file is used to build DALi Extensions
3 #
4 # gbs will try to download the build.conf for the platform automatically from the repo location when
5 # performing a gbs build ( use gbs build -v to see it download location) E.g.
6 # http://download.tizen.org/snapshots/tizen/tv/tizen-tv/repos/arm-wayland/packages/repodata/xxxx-build.conf.gz
7
8 Name:       dali2-extension
9 Summary:    The DALi Tizen Extensions
10 Version:    2.0.23
11 Release:    1
12 Group:      System/Libraries
13 License:    Apache-2.0 and BSD-3-Clause and MIT
14 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-extensions.git;a=summary
15 Source0:    %{name}-%{version}.tar.gz
16
17 Requires(post): /sbin/ldconfig
18 Requires(postun): /sbin/ldconfig
19
20 BuildRequires:  pkgconfig
21 BuildRequires:  pkgconfig(dali2-core)
22 BuildRequires:  pkgconfig(dali2-adaptor)
23 BuildRequires:  pkgconfig(dali2-toolkit)
24 BuildRequires:  pkgconfig(dlog)
25
26 # For evas-plugin
27 BuildRequires:  pkgconfig(dali2-adaptor-integration)
28 BuildRequires:  pkgconfig(elementary)
29 BuildRequires:  pkgconfig(evas)
30 BuildRequires:  pkgconfig(ecore-wl2)
31
32 %description
33 dali-extension
34
35 %if 0%{?tizen_version_major} >= 4
36 %define tizen_40_or_greater 1
37 %endif
38
39 %if 0%{?tizen_version_major} >= 5
40 %define tizen_50_or_greater 1
41 %endif
42
43 %if ( 0%{?tizen_version_major} == 5 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 6
44 %define tizen_55_or_greater 1
45 %endif
46
47 %if ( 0%{?tizen_version_major} == 6 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 7
48 %define tizen_65_or_greater 1
49 %endif
50
51
52 # # Note
53 # %if 0%{?tizen_version_major} >= 6
54 # %define tizen_60_or_greater 1
55 # %endif
56
57 ##############################
58 # devel
59 ##############################
60 %package devel
61 Summary:    Development components for the DALi Extension
62 Group:      Development/Building
63 Requires:   %{name} = %{version}-%{release}
64
65 %description devel
66 Development components for the DALi Tizen Extensions - public headers and package configs
67
68 ##############################
69 # Dali Key Extension
70 ##############################
71
72 %package key-extension
73 Summary:    Plugin to support extension keys for Dali
74 Group:      System/Libraries
75
76 %description key-extension
77 Plugin to support extension keys for Dali
78
79 ##############################
80 # Dali VideoPlayer Plugin
81 ##############################
82
83 %package video-player-plugin
84 Summary:    Plugin to play a video file for Dali
85 Group:      System/Libraries
86 BuildRequires: pkgconfig(capi-media-player)
87 BuildRequires: pkgconfig(capi-system-info)
88 # dali-adaptor uses ecore mainloop
89 %if 0%{?tizen_version_major} >= 5
90 BuildRequires:  pkgconfig(ecore-wl2)
91 %else
92 BuildRequires:  pkgconfig(ecore-wayland)
93 %endif
94
95 %description video-player-plugin
96 VideoPlayer plugin to play a video file for Dali
97
98 ##############################
99 # Dali CameraPlayer Plugin
100 ##############################
101
102 %package camera-player-plugin
103 Summary:    Plugin to play a camera file for Dali
104 Group:      System/Libraries
105 BuildRequires: pkgconfig(capi-media-camera)
106 # dali-adaptor uses ecore mainloop
107 BuildRequires:  pkgconfig(ecore-wl2)
108
109 %description camera-player-plugin
110 CameraPlayer plugin to play a camera file for Dali
111
112 ##############################
113 # Dali Web Engine chromium Plugin
114 ##############################
115
116 %package web-engine-chromium-plugin
117 Summary:    Plugin to support WebView for Dali
118 Group:      System/Libraries
119 %if 0%{?tizen_55_or_greater}
120 BuildRequires: pkgconfig(libtbm)
121 BuildRequires: pkgconfig(chromium-efl)
122 BuildRequires: pkgconfig(elementary)
123 %endif
124
125 %description web-engine-chromium-plugin
126 Web Engine chromium plugin to support WebView for Dali
127
128 ##############################
129 # Dali Image Loader Plugin
130 ##############################
131
132 %package image-loader-plugin
133 Summary:    Plugin to image loading for Dali
134 Group:      System/Libraries
135
136 %description image-loader-plugin
137 Image Loader plugin to image loading file for Dali
138
139 ####################################
140 # Vector Animation Renderer Plugin
141 ####################################
142 %package vector-animation-renderer-plugin
143 Summary:    Plugin to render a vector animation
144 Group:      System/Libraries
145 %if 0%{?tizen_55_or_greater}
146 BuildRequires:  pkgconfig(rlottie)
147 %endif
148
149 %description vector-animation-renderer-plugin
150 Plugin to render a vector animation
151
152 ####################################
153 # Rive Animation Renderer Plugin
154 ####################################
155 %package rive-animation-renderer-plugin
156 Summary:    Plugin to render a rive animation
157 Group:      System/Libraries
158 %if 0%{?tizen_65_or_greater}
159 BuildRequires:  pkgconfig(rive_tizen)
160 %endif
161 %description rive-animation-renderer-plugin
162
163 ####################################
164 # Vector Image Renderer Plugin
165 ####################################
166 %package vector-image-renderer-plugin
167 Summary:    Plugin to render a vector image
168 Group:      System/Libraries
169 %if 0%{?tizen_65_or_greater}
170 BuildRequires:  pkgconfig(thorvg)
171 %endif
172
173 %description vector-image-renderer-plugin
174 Plugin to render a vector image
175
176
177 ####################################
178 # color controller Plugin
179 ####################################
180
181 %package color-controller-plugin
182 Summary:    Plugin to load color theme
183 Group:      System/Libraries
184
185 %description color-controller-plugin
186 Plugin to load color theme
187
188 ##############################
189 # Dali Web Engine LWE Plugin
190 ##############################
191
192 %package web-engine-lwe-plugin
193 Summary:    Plugin to support WebView for Dali
194 Group:      System/Libraries
195 %if 0%{?tizen_55_or_greater}
196 BuildRequires: pkgconfig(libtbm)
197 BuildRequires: pkgconfig(lightweight-web-engine)
198 %endif
199
200 %description web-engine-lwe-plugin
201 Web Engine LWE(Light-weight Web Engine) plugin to support WebView for Dali
202
203 ##############################
204 # Preparation
205 ##############################
206 %prep
207 %setup -q
208
209 #Use TZ_PATH when tizen version is 3.x or greater
210
211 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
212 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
213 %define dev_include_path %{_includedir}
214
215 # Use Image Loader Plugin
216 %define use_image_loader 0
217
218 ##############################
219 # Build
220 ##############################
221 %build
222 PREFIX+="/usr"
223 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
224 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
225
226 %if 0%{?tizen_version_major} >= 5
227 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
228 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
229 configure_flags="--enable-ecore-wl2"
230 %endif
231
232 %if "%{?profile}" == "tv"
233 CFLAGS+=" -DOS_TIZEN_TV"
234 CXXFLAGS+=" -DOS_TIZEN_TV"
235 %endif
236
237 libtoolize --force
238 cd %{_builddir}/%{name}-%{version}/build/tizen
239 autoreconf --install
240
241 %configure --prefix=$PREFIX \
242 %if 0%{?tizen_50_or_greater}
243            --with-tizen-50-or-greater \
244 %endif
245 %if 0%{?tizen_55_or_greater}
246            --with-tizen-55-or-greater \
247 %endif
248 %if 0%{?tizen_65_or_greater}
249            --with-tizen-65-or-greater \
250 %endif
251            --enable-ecore-wl2 \
252            --enable-keyextension
253 %if 0%{?use_image_loader}
254 %configure \
255            --enable-imageloader-extension
256 %endif
257
258 make %{?jobs:-j%jobs}
259
260 ##############################
261 # Installation
262 ##############################
263 %install
264 rm -rf %{buildroot}
265
266 # install dali.sh
267 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
268
269 %if "%{?profile}" != "common" && "%{?profile}" != "ivi"
270 install -m 0644 scripts/dali.sh %{buildroot}%{_sysconfdir}/profile.d
271 %endif
272
273 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
274 install -m 0644 scripts/other/dali.sh %{buildroot}%{_sysconfdir}/profile.d
275 %endif
276
277 cd build/tizen
278 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
279
280 %pre
281 exit 0
282
283 ##############################
284 #  Post Install new package
285 ##############################
286 %post
287 /sbin/ldconfig
288 exit 0
289
290 %post key-extension
291 /sbin/ldconfig
292 exit 0
293
294 %post video-player-plugin
295 /sbin/ldconfig
296 exit 0
297
298 %post camera-player-plugin
299 /sbin/ldconfig
300 exit 0
301
302 %if 0%{?tizen_55_or_greater}
303 %post web-engine-chromium-plugin
304 pushd %{_libdir}
305 ln -sf libdali2-web-engine-chromium-plugin.so libdali2-web-engine-plugin.so
306 popd
307 /sbin/ldconfig
308 exit 0
309 %endif
310
311 %post image-loader-plugin
312 /sbin/ldconfig
313 exit 0
314
315 %if 0%{?tizen_55_or_greater}
316 %post vector-animation-renderer-plugin
317 /sbin/ldconfig
318 exit 0
319 %endif
320
321 %if 0%{?tizen_65_or_greater}
322 %post vector-image-renderer-plugin
323 /sbin/ldconfig
324 exit 0
325 %endif
326
327 %post color-controller-plugin
328 /sbin/ldconfig
329 exit 0
330
331 %if 0%{?tizen_55_or_greater}
332 %post web-engine-lwe-plugin
333 /sbin/ldconfig
334 exit 0
335 %endif
336
337 ##############################
338 #   Pre Uninstall old package
339 ##############################
340 %preun
341 exit 0
342
343 ##############################
344 #   Post Uninstall old package
345 ##############################
346 %postun
347 /sbin/ldconfig
348 exit 0
349
350 %postun key-extension
351 /sbin/ldconfig
352 exit 0
353
354 %postun video-player-plugin
355 /sbin/ldconfig
356 exit 0
357
358 %postun camera-player-plugin
359 /sbin/ldconfig
360 exit 0
361
362 %if 0%{?tizen_55_or_greater}
363 %postun web-engine-chromium-plugin
364 /sbin/ldconfig
365 exit 0
366 %endif
367
368 %postun image-loader-plugin
369 /sbin/ldconfig
370 exit 0
371
372 %if 0%{?tizen_55_or_greater}
373 %postun vector-animation-renderer-plugin
374 /sbin/ldconfig
375 exit 0
376 %endif
377
378 %if 0%{?tizen_65_or_greater}
379 %postun vector-image-renderer-plugin
380 /sbin/ldconfig
381 exit 0
382 %endif
383
384 %postun color-controller-plugin
385 /sbin/ldconfig
386 exit 0
387
388 %if 0%{?tizen_55_or_greater}
389 %postun web-engine-lwe-plugin
390 /sbin/ldconfig
391 exit 0
392 %endif
393
394 ##############################
395 # Files in Binary Packages
396 ##############################
397
398 %files
399 %manifest dali-extension.manifest
400 %defattr(-,root,root,-)
401 %{_sysconfdir}/profile.d/dali.sh
402 %{_libdir}/libdali2-extension.so*
403 %license LICENSE
404
405 %files devel
406 %defattr(-,root,root,-)
407 %{_includedir}/dali-extension/*
408 %{_libdir}/pkgconfig/*.pc
409
410 %files key-extension
411 %manifest dali-extension.manifest
412 %defattr(-,root,root,-)
413 %{_libdir}/libdali2-key-extension.so*
414 %license LICENSE
415
416 %files video-player-plugin
417 %manifest dali-extension.manifest
418 %defattr(-,root,root,-)
419 %{_libdir}/libdali2-video-player-plugin.so*
420 %license LICENSE
421
422 %if 0%{?tizen_65_or_greater}
423 %files camera-player-plugin
424 %manifest dali-extension.manifest
425 %defattr(-,root,root,-)
426 %{_libdir}/libdali2-camera-player-plugin.so*
427 %license LICENSE
428 %endif
429
430 %if 0%{?tizen_55_or_greater}
431 %files web-engine-chromium-plugin
432 %manifest dali-extension.manifest
433 %defattr(-,root,root,-)
434 %{_libdir}/libdali2-web-engine-chromium-plugin.so*
435 %license LICENSE
436 %endif
437
438 %if 0%{?use_image_loader}
439 %files image-loader-plugin
440 %manifest dali-extension.manifest
441 %defattr(-,root,root,-)
442 %{_libdir}/libdali2-image-loader-plugin.so*
443 %license LICENSE
444 %endif
445
446 %if 0%{?tizen_55_or_greater}
447 %files vector-animation-renderer-plugin
448 %manifest dali-extension.manifest
449 %defattr(-,root,root,-)
450 %{_libdir}/libdali2-vector-animation-renderer-plugin.so*
451 %license LICENSE
452 %endif
453
454 %if 0%{?tizen_65_or_greater}
455 %files vector-image-renderer-plugin
456 %manifest dali-extension.manifest
457 %defattr(-,root,root,-)
458 %{_libdir}/libdali2-vector-image-renderer-plugin.so*
459 %license LICENSE
460 %endif
461
462 %if 0%{?tizen_65_or_greater}
463 %files rive-animation-renderer-plugin
464 %manifest dali-extension.manifest
465 %defattr(-,root,root,-)
466 %{_libdir}/libdali2-rive-animation-renderer-plugin.so*
467 %license LICENSE
468 %endif
469
470 %files color-controller-plugin
471 %manifest dali-extension.manifest
472 %defattr(-,root,root,-)
473 %{_libdir}/libdali2-color-controller-plugin.so*
474 %license LICENSE
475
476 %if 0%{?tizen_55_or_greater}
477 %files web-engine-lwe-plugin
478 %manifest dali-extension.manifest
479 %defattr(-,root,root,-)
480 %{_libdir}/libdali2-web-engine-lwe-plugin.so*
481 %license LICENSE
482 %endif