2 # This spec file is used to build DALi Extensions
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
9 Summary: The DALi Tizen Extensions
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
17 %if 0%{?tizen_version_major} >= 4
18 %define tizen_40_or_greater 1
21 %if 0%{?tizen_version_major} >= 5
22 %define tizen_50_or_greater 1
25 %if ( 0%{?tizen_version_major} == 5 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 6
26 %define tizen_55_or_greater 1
29 %if ( 0%{?tizen_version_major} == 6 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 7
30 %define tizen_65_or_greater 1
33 %if %{undefined NO_WEB_FRAMEWORK}
34 %define enable_web_engine_plugin 1
37 %define enable_color_controller 1
39 Requires(post): /sbin/ldconfig
40 Requires(postun): /sbin/ldconfig
42 BuildRequires: pkgconfig
43 BuildRequires: pkgconfig(dali2-core)
44 BuildRequires: pkgconfig(dali2-adaptor)
45 BuildRequires: pkgconfig(dali2-toolkit)
46 BuildRequires: pkgconfig(dlog)
48 BuildRequires: pkgconfig(dali2-adaptor-integration)
49 BuildRequires: pkgconfig(ecore-wl2)
52 %if 0%{?enable_evas_plugin}
53 BuildRequires: pkgconfig(elementary)
54 BuildRequires: pkgconfig(evas)
57 %if 0%{?tizen_65_or_greater}
58 BuildRequires: pkgconfig(rive_tizen)
62 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
63 BuildRequires: asan-force-options
64 BuildRequires: asan-build-env
65 BuildRequires: libasan
72 #############################
74 ##############################
76 Summary: Development components for the DALi Extension
77 Group: Development/Building
78 Requires: %{name} = %{version}-%{release}
81 Development components for the DALi Tizen Extensions - public headers and package configs
83 ##############################
85 ##############################
87 %package key-extension
88 Summary: Plugin to support extension keys for Dali
89 Group: System/Libraries
91 %description key-extension
92 Plugin to support extension keys for Dali
94 ##############################
95 # Dali VideoPlayer Plugin
96 ##############################
98 %package video-player-plugin
99 Summary: Plugin to play a video file for Dali
100 Group: System/Libraries
101 BuildRequires: pkgconfig(capi-media-player)
102 BuildRequires: pkgconfig(capi-system-info)
103 # dali-adaptor uses ecore mainloop
104 %if 0%{?tizen_version_major} >= 5
105 BuildRequires: pkgconfig(ecore-wl2)
107 BuildRequires: pkgconfig(ecore-wayland)
110 %description video-player-plugin
111 VideoPlayer plugin to play a video file for Dali
113 ##############################
114 # Dali CameraPlayer Plugin
115 ##############################
117 %package camera-player-plugin
118 Summary: Plugin to play a camera file for Dali
119 Group: System/Libraries
120 BuildRequires: pkgconfig(capi-media-camera)
121 # dali-adaptor uses ecore mainloop
122 BuildRequires: pkgconfig(ecore-wl2)
124 %description camera-player-plugin
125 CameraPlayer plugin to play a camera file for Dali
127 ##############################
128 # Dali Web Engine chromium Plugin
129 ##############################
131 %package web-engine-chromium-plugin
132 Summary: Plugin to support WebView for Dali
133 Group: System/Libraries
134 %if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
135 BuildRequires: pkgconfig(libtbm)
136 BuildRequires: pkgconfig(chromium-efl)
137 BuildRequires: pkgconfig(elementary)
140 %description web-engine-chromium-plugin
141 Web Engine chromium plugin to support WebView for Dali
143 ##############################
144 # Dali Image Loader Plugin
145 ##############################
147 %package image-loader-plugin
148 Summary: Plugin to image loading for Dali
149 Group: System/Libraries
151 %description image-loader-plugin
152 Image Loader plugin to image loading file for Dali
154 ####################################
155 # Vector Animation Renderer Plugin
156 ####################################
157 %package vector-animation-renderer-plugin
158 Summary: Plugin to render a vector animation
159 Group: System/Libraries
160 %if 0%{?tizen_55_or_greater}
161 BuildRequires: pkgconfig(rlottie)
164 %description vector-animation-renderer-plugin
165 Plugin to render a vector animation
167 ####################################
168 # color controller Plugin
169 ####################################
171 %package color-controller-plugin
172 Summary: Plugin to load color theme
173 Group: System/Libraries
175 %description color-controller-plugin
176 Plugin to load color theme
178 ##############################
179 # Dali Web Engine LWE Plugin
180 ##############################
182 %package web-engine-lwe-plugin
183 Summary: Plugin to support WebView for Dali
184 Group: System/Libraries
185 %if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
186 BuildRequires: pkgconfig(libtbm)
187 BuildRequires: pkgconfig(lightweight-web-engine)
190 %description web-engine-lwe-plugin
191 Web Engine LWE(Light-weight Web Engine) plugin to support WebView for Dali
193 ####################################
194 # Rive Animation View Plugin
195 ####################################
196 %package rive-animation-view
197 Summary: Plugin to render a rive animation
198 Group: System/Libraries
199 Requires: dali2-extension-rive-animation-view = %{version}-%{release}
200 %if 0%{?tizen_65_or_greater}
201 BuildRequires: pkgconfig(thorvg)
202 BuildRequires: pkgconfig(rive_tizen)
205 %description rive-animation-view
206 Plugin to render a rive animation
208 %package rive-animation-view-devel
209 Summary: Development components for rive animation view
210 Group: System/Libraries
211 Requires: dali2-extension-rive-animation-view = %{version}-%{release}
213 %description rive-animation-view-devel
214 Header & package configuration of rive-animation-view
216 ##############################
218 ##############################
222 #Use TZ_PATH when tizen version is 3.x or greater
224 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
225 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
226 %define dev_include_path %{_includedir}
228 ##############################
230 ##############################
233 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
234 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
236 %if 0%{?tizen_version_major} >= 5
237 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
238 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
239 configure_flags="--enable-ecore-wl2"
242 %if "%{?profile}" == "tv"
243 CFLAGS+=" -DOS_TIZEN_TV"
244 CXXFLAGS+=" -DOS_TIZEN_TV"
247 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
248 CFLAGS+=" -fsanitize=address"
249 CXXFLAGS+=" -fsanitize=address"
250 LDFLAGS+=" -fsanitize=address"
254 cd %{_builddir}/%{name}-%{version}/build/tizen
257 %configure --prefix=$PREFIX \
258 %if 0%{?enable_debug}
261 %if 0%{?tizen_50_or_greater}
262 --with-tizen-50-or-greater \
264 %if 0%{?tizen_55_or_greater}
265 --with-tizen-55-or-greater \
267 %if 0%{?tizen_65_or_greater}
268 --with-tizen-65-or-greater \
270 %if 0%{?enable_web_engine_plugin} == 1
271 --enable-web-engine-plugin \
273 %if 0%{?enable_image_loader}
274 --enable-imageloader-extension \
276 %if 0%{?enable_color_controller}
277 --enable-color-controller \
279 %if 0%{?enable_evas_plugin}
280 --enable-evas-plugin \
283 --enable-keyextension
285 make %{?jobs:-j%jobs}
287 ##############################
289 ##############################
294 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
296 %if "%{?profile}" != "common" && "%{?profile}" != "ivi"
297 install -m 0644 scripts/dali.sh %{buildroot}%{_sysconfdir}/profile.d
300 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
301 install -m 0644 scripts/other/dali.sh %{buildroot}%{_sysconfdir}/profile.d
305 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
310 ##############################
311 # Post Install new package
312 ##############################
321 %post video-player-plugin
325 %post camera-player-plugin
329 %if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
330 %post web-engine-chromium-plugin
332 ln -sf libdali2-web-engine-chromium-plugin.so libdali2-web-engine-plugin.so
338 %if 0%{?enable_image_loader}
339 %post image-loader-plugin
344 %if 0%{?tizen_55_or_greater}
345 %post vector-animation-renderer-plugin
350 %if 0%{?tizen_65_or_greater}
351 %post rive-animation-view
356 %if 0%{?enable_color_controller}
357 %post color-controller-plugin
362 %if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
363 %post web-engine-lwe-plugin
368 ##############################
369 # Pre Uninstall old package
370 ##############################
374 ##############################
375 # Post Uninstall old package
376 ##############################
381 %postun key-extension
385 %postun video-player-plugin
389 %postun camera-player-plugin
393 %if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
394 %postun web-engine-chromium-plugin
399 %if 0%{?enable_image_loader}
400 %postun image-loader-plugin
405 %if 0%{?tizen_55_or_greater}
406 %postun vector-animation-renderer-plugin
411 %if 0%{?tizen_65_or_greater}
412 %postun rive-animation-view
417 %if 0%{?enable_color_controller}
418 %postun color-controller-plugin
423 %if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
424 %postun web-engine-lwe-plugin
429 ##############################
430 # Files in Binary Packages
431 ##############################
434 %manifest dali-extension.manifest
435 %defattr(-,root,root,-)
436 %{_sysconfdir}/profile.d/dali.sh
437 %{_libdir}/libdali2-extension.so*
441 %defattr(-,root,root,-)
442 %{_includedir}/dali-extension/*
443 %{_libdir}/pkgconfig/dali2-extension.pc
446 %manifest dali-extension.manifest
447 %defattr(-,root,root,-)
448 %{_libdir}/libdali2-key-extension.so*
451 %files video-player-plugin
452 %manifest dali-extension.manifest
453 %defattr(-,root,root,-)
454 %{_libdir}/libdali2-video-player-plugin.so*
457 %if 0%{?tizen_65_or_greater}
458 %files camera-player-plugin
459 %manifest dali-extension.manifest
460 %defattr(-,root,root,-)
461 %{_libdir}/libdali2-camera-player-plugin.so*
465 %if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
466 %files web-engine-chromium-plugin
467 %manifest dali-extension.manifest
468 %defattr(-,root,root,-)
469 %{_libdir}/libdali2-web-engine-chromium-plugin.so*
473 %if 0%{?enable_image_loader}
474 %files image-loader-plugin
475 %manifest dali-extension.manifest
476 %defattr(-,root,root,-)
477 %{_libdir}/libdali2-image-loader-plugin.so*
481 %if 0%{?tizen_55_or_greater}
482 %files vector-animation-renderer-plugin
483 %manifest dali-extension.manifest
484 %defattr(-,root,root,-)
485 %{_libdir}/libdali2-vector-animation-renderer-plugin.so*
489 %if 0%{?tizen_65_or_greater}
490 %files rive-animation-view
491 %manifest dali-extension.manifest
492 %defattr(-,root,root,-)
493 %{_libdir}/libdali2-extension-rive-animation-view.so*
496 %files rive-animation-view-devel
497 %defattr(-,root,root,-)
498 %{_includedir}/dali-extension/devel-api/rive-animation-view/*
499 %{_libdir}/pkgconfig/dali2-extension-rive-animation-view.pc
502 %if 0%{?enable_color_controller}
503 %files color-controller-plugin
504 %manifest dali-extension.manifest
505 %defattr(-,root,root,-)
506 %{_libdir}/libdali2-color-controller-plugin.so*
510 %if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
511 %files web-engine-lwe-plugin
512 %manifest dali-extension.manifest
513 %defattr(-,root,root,-)
514 %{_libdir}/libdali2-web-engine-lwe-plugin.so*