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