DALi Version 2.1.31
[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.31
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 # color controller Plugin
153 ####################################
154
155 %package color-controller-plugin
156 Summary:    Plugin to load color theme
157 Group:      System/Libraries
158
159 %description color-controller-plugin
160 Plugin to load color theme
161
162 ##############################
163 # Dali Web Engine LWE Plugin
164 ##############################
165
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)
172 %endif
173
174 %description web-engine-lwe-plugin
175 Web Engine LWE(Light-weight Web Engine) plugin to support WebView for Dali
176
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)
187 %endif
188
189 %description rive-animation-view
190 Plugin to render a rive animation
191
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}
196
197 %description rive-animation-view-devel
198 Header & package configuration of rive-animation-view
199
200 ##############################
201 # Preparation
202 ##############################
203 %prep
204 %setup -q
205
206 #Use TZ_PATH when tizen version is 3.x or greater
207
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}
211
212 # Use Image Loader Plugin
213 %define use_image_loader 0
214
215 ##############################
216 # Build
217 ##############################
218 %build
219 PREFIX+="/usr"
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 "
222
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"
227 %endif
228
229 %if "%{?profile}" == "tv"
230 CFLAGS+=" -DOS_TIZEN_TV"
231 CXXFLAGS+=" -DOS_TIZEN_TV"
232 %endif
233
234 libtoolize --force
235 cd %{_builddir}/%{name}-%{version}/build/tizen
236 autoreconf --install
237
238 %configure --prefix=$PREFIX \
239 %if 0%{?enable_debug}
240            --enable-debug \
241 %endif
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 rive-animation-view
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 rive-animation-view
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/dali2-extension.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 rive-animation-view
456 %manifest dali-extension.manifest
457 %defattr(-,root,root,-)
458 %{_libdir}/libdali2-extension-rive-animation-view.so*
459 %license LICENSE
460
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
465 %endif
466
467 %files color-controller-plugin
468 %manifest dali-extension.manifest
469 %defattr(-,root,root,-)
470 %{_libdir}/libdali2-color-controller-plugin.so*
471 %license LICENSE
472
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*
478 %license LICENSE
479 %endif