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 Requires(post): /sbin/ldconfig
34 Requires(postun): /sbin/ldconfig
36 BuildRequires: pkgconfig
37 BuildRequires: pkgconfig(dali2-core)
38 BuildRequires: pkgconfig(dali2-adaptor)
39 BuildRequires: pkgconfig(dali2-toolkit)
40 BuildRequires: pkgconfig(dlog)
43 BuildRequires: pkgconfig(dali2-adaptor-integration)
44 BuildRequires: pkgconfig(elementary)
45 BuildRequires: pkgconfig(evas)
46 BuildRequires: pkgconfig(ecore-wl2)
48 %if 0%{?tizen_65_or_greater}
49 BuildRequires: pkgconfig(rive_tizen)
56 #############################
58 ##############################
60 Summary: Development components for the DALi Extension
61 Group: Development/Building
62 Requires: %{name} = %{version}-%{release}
65 Development components for the DALi Tizen Extensions - public headers and package configs
67 ##############################
69 ##############################
71 %package key-extension
72 Summary: Plugin to support extension keys for Dali
73 Group: System/Libraries
75 %description key-extension
76 Plugin to support extension keys for Dali
78 ##############################
79 # Dali VideoPlayer Plugin
80 ##############################
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)
91 BuildRequires: pkgconfig(ecore-wayland)
94 %description video-player-plugin
95 VideoPlayer plugin to play a video file for Dali
97 ##############################
98 # Dali CameraPlayer Plugin
99 ##############################
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)
108 %description camera-player-plugin
109 CameraPlayer plugin to play a camera file for Dali
111 ##############################
112 # Dali Web Engine chromium Plugin
113 ##############################
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)
124 %description web-engine-chromium-plugin
125 Web Engine chromium plugin to support WebView for Dali
127 ##############################
128 # Dali Image Loader Plugin
129 ##############################
131 %package image-loader-plugin
132 Summary: Plugin to image loading for Dali
133 Group: System/Libraries
135 %description image-loader-plugin
136 Image Loader plugin to image loading file for Dali
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)
148 %description vector-animation-renderer-plugin
149 Plugin to render a vector animation
151 ####################################
152 # color controller Plugin
153 ####################################
155 %package color-controller-plugin
156 Summary: Plugin to load color theme
157 Group: System/Libraries
159 %description color-controller-plugin
160 Plugin to load color theme
162 ##############################
163 # Dali Web Engine LWE Plugin
164 ##############################
166 %package web-engine-lwe-plugin
167 Summary: Plugin to support WebView for Dali
168 Group: System/Libraries
169 %if 0%{?tizen_55_or_greater}
170 BuildRequires: pkgconfig(libtbm)
171 BuildRequires: pkgconfig(lightweight-web-engine)
174 %description web-engine-lwe-plugin
175 Web Engine LWE(Light-weight Web Engine) plugin to support WebView for Dali
177 ####################################
178 # Rive Animation View Plugin
179 ####################################
180 %package rive-animation-view
181 Summary: Plugin to render a rive animation
182 Group: System/Libraries
183 Requires: dali2-extension-rive-animation-view = %{version}-%{release}
184 %if 0%{?tizen_65_or_greater}
185 BuildRequires: pkgconfig(thorvg)
186 BuildRequires: pkgconfig(rive_tizen)
189 %description rive-animation-view
190 Plugin to render a rive animation
192 %package rive-animation-view-devel
193 Summary: Development components for rive animation view
194 Group: System/Libraries
195 Requires: dali2-extension-rive-animation-view = %{version}-%{release}
197 %description rive-animation-view-devel
198 Header & package configuration of rive-animation-view
200 ##############################
202 ##############################
206 #Use TZ_PATH when tizen version is 3.x or greater
208 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
209 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
210 %define dev_include_path %{_includedir}
212 # Use Image Loader Plugin
213 %define use_image_loader 0
215 ##############################
217 ##############################
220 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
221 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
223 %if 0%{?tizen_version_major} >= 5
224 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
225 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
226 configure_flags="--enable-ecore-wl2"
229 %if "%{?profile}" == "tv"
230 CFLAGS+=" -DOS_TIZEN_TV"
231 CXXFLAGS+=" -DOS_TIZEN_TV"
235 cd %{_builddir}/%{name}-%{version}/build/tizen
238 %configure --prefix=$PREFIX \
239 %if 0%{?enable_debug}
242 %if 0%{?tizen_50_or_greater}
243 --with-tizen-50-or-greater \
245 %if 0%{?tizen_55_or_greater}
246 --with-tizen-55-or-greater \
248 %if 0%{?tizen_65_or_greater}
249 --with-tizen-65-or-greater \
252 --enable-keyextension
253 %if 0%{?use_image_loader}
255 --enable-imageloader-extension
258 make %{?jobs:-j%jobs}
260 ##############################
262 ##############################
267 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
269 %if "%{?profile}" != "common" && "%{?profile}" != "ivi"
270 install -m 0644 scripts/dali.sh %{buildroot}%{_sysconfdir}/profile.d
273 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
274 install -m 0644 scripts/other/dali.sh %{buildroot}%{_sysconfdir}/profile.d
278 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
283 ##############################
284 # Post Install new package
285 ##############################
294 %post video-player-plugin
298 %post camera-player-plugin
302 %if 0%{?tizen_55_or_greater}
303 %post web-engine-chromium-plugin
305 ln -sf libdali2-web-engine-chromium-plugin.so libdali2-web-engine-plugin.so
311 %post image-loader-plugin
315 %if 0%{?tizen_55_or_greater}
316 %post vector-animation-renderer-plugin
321 %if 0%{?tizen_65_or_greater}
322 %post rive-animation-view
327 %post color-controller-plugin
331 %if 0%{?tizen_55_or_greater}
332 %post web-engine-lwe-plugin
337 ##############################
338 # Pre Uninstall old package
339 ##############################
343 ##############################
344 # Post Uninstall old package
345 ##############################
350 %postun key-extension
354 %postun video-player-plugin
358 %postun camera-player-plugin
362 %if 0%{?tizen_55_or_greater}
363 %postun web-engine-chromium-plugin
368 %postun image-loader-plugin
372 %if 0%{?tizen_55_or_greater}
373 %postun vector-animation-renderer-plugin
378 %if 0%{?tizen_65_or_greater}
379 %postun rive-animation-view
384 %postun color-controller-plugin
388 %if 0%{?tizen_55_or_greater}
389 %postun web-engine-lwe-plugin
394 ##############################
395 # Files in Binary Packages
396 ##############################
399 %manifest dali-extension.manifest
400 %defattr(-,root,root,-)
401 %{_sysconfdir}/profile.d/dali.sh
402 %{_libdir}/libdali2-extension.so*
406 %defattr(-,root,root,-)
407 %{_includedir}/dali-extension/*
408 %{_libdir}/pkgconfig/dali2-extension.pc
411 %manifest dali-extension.manifest
412 %defattr(-,root,root,-)
413 %{_libdir}/libdali2-key-extension.so*
416 %files video-player-plugin
417 %manifest dali-extension.manifest
418 %defattr(-,root,root,-)
419 %{_libdir}/libdali2-video-player-plugin.so*
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*
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*
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*
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*
454 %if 0%{?tizen_65_or_greater}
455 %files rive-animation-view
456 %manifest dali-extension.manifest
457 %defattr(-,root,root,-)
458 %{_libdir}/libdali2-extension-rive-animation-view.so*
461 %files rive-animation-view-devel
462 %defattr(-,root,root,-)
463 %{_includedir}/dali-extension/devel-api/rive-animation-view/*
464 %{_libdir}/pkgconfig/dali2-extension-rive-animation-view.pc
467 %files color-controller-plugin
468 %manifest dali-extension.manifest
469 %defattr(-,root,root,-)
470 %{_libdir}/libdali2-color-controller-plugin.so*
473 %if 0%{?tizen_55_or_greater}
474 %files web-engine-lwe-plugin
475 %manifest dali-extension.manifest
476 %defattr(-,root,root,-)
477 %{_libdir}/libdali2-web-engine-lwe-plugin.so*