Merge "DALi Version 2.0.19" into devel/master
[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.19
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 # Vector Image Renderer Plugin
154 ####################################
155 %package vector-image-renderer-plugin
156 Summary:    Plugin to render a vector image
157 Group:      System/Libraries
158 %if 0%{?tizen_65_or_greater}
159 BuildRequires:  pkgconfig(thorvg)
160 %endif
161
162 %description vector-image-renderer-plugin
163 Plugin to render a vector image
164
165
166 ####################################
167 # color controller Plugin
168 ####################################
169
170 %package color-controller-plugin
171 Summary:    Plugin to load color theme
172 Group:      System/Libraries
173
174 %description color-controller-plugin
175 Plugin to load color theme
176
177 ##############################
178 # Dali Web Engine LWE Plugin
179 ##############################
180
181 %package web-engine-lwe-plugin
182 Summary:    Plugin to support WebView for Dali
183 Group:      System/Libraries
184 %if 0%{?tizen_55_or_greater}
185 BuildRequires: pkgconfig(libtbm)
186 BuildRequires: pkgconfig(lightweight-web-engine)
187 %endif
188
189 %description web-engine-lwe-plugin
190 Web Engine LWE(Light-weight Web Engine) plugin to support WebView for Dali
191
192 ##############################
193 # Preparation
194 ##############################
195 %prep
196 %setup -q
197
198 #Use TZ_PATH when tizen version is 3.x or greater
199
200 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
201 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
202 %define dev_include_path %{_includedir}
203
204 # Use Image Loader Plugin
205 %define use_image_loader 0
206
207 ##############################
208 # Build
209 ##############################
210 %build
211 PREFIX+="/usr"
212 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
213 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
214
215 %if 0%{?tizen_version_major} >= 5
216 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
217 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
218 configure_flags="--enable-ecore-wl2"
219 %endif
220
221 %if "%{?profile}" == "tv"
222 CFLAGS+=" -DOS_TIZEN_TV"
223 CXXFLAGS+=" -DOS_TIZEN_TV"
224 %endif
225
226 libtoolize --force
227 cd %{_builddir}/%{name}-%{version}/build/tizen
228 autoreconf --install
229
230 %configure --prefix=$PREFIX \
231 %if 0%{?tizen_50_or_greater}
232            --with-tizen-50-or-greater \
233 %endif
234 %if 0%{?tizen_55_or_greater}
235            --with-tizen-55-or-greater \
236 %endif
237 %if 0%{?tizen_65_or_greater}
238            --with-tizen-65-or-greater \
239 %endif
240            --enable-ecore-wl2 \
241            --enable-keyextension
242 %if 0%{?use_image_loader}
243 %configure \
244            --enable-imageloader-extension
245 %endif
246
247 make %{?jobs:-j%jobs}
248
249 ##############################
250 # Installation
251 ##############################
252 %install
253 rm -rf %{buildroot}
254
255 # install dali.sh
256 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
257
258 %if "%{?profile}" != "common" && "%{?profile}" != "ivi"
259 install -m 0644 scripts/dali.sh %{buildroot}%{_sysconfdir}/profile.d
260 %endif
261
262 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
263 install -m 0644 scripts/other/dali.sh %{buildroot}%{_sysconfdir}/profile.d
264 %endif
265
266 cd build/tizen
267 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
268
269 %pre
270 exit 0
271
272 ##############################
273 #  Post Install new package
274 ##############################
275 %post
276 /sbin/ldconfig
277 exit 0
278
279 %post key-extension
280 /sbin/ldconfig
281 exit 0
282
283 %post video-player-plugin
284 /sbin/ldconfig
285 exit 0
286
287 %post camera-player-plugin
288 /sbin/ldconfig
289 exit 0
290
291 %if 0%{?tizen_55_or_greater}
292 %post web-engine-chromium-plugin
293 pushd %{_libdir}
294 ln -sf libdali2-web-engine-chromium-plugin.so libdali2-web-engine-plugin.so
295 popd
296 /sbin/ldconfig
297 exit 0
298 %endif
299
300 %post image-loader-plugin
301 /sbin/ldconfig
302 exit 0
303
304 %if 0%{?tizen_55_or_greater}
305 %post vector-animation-renderer-plugin
306 /sbin/ldconfig
307 exit 0
308 %endif
309
310 %if 0%{?tizen_65_or_greater}
311 %post vector-image-renderer-plugin
312 /sbin/ldconfig
313 exit 0
314 %endif
315
316 %post color-controller-plugin
317 /sbin/ldconfig
318 exit 0
319
320 %if 0%{?tizen_55_or_greater}
321 %post web-engine-lwe-plugin
322 /sbin/ldconfig
323 exit 0
324 %endif
325
326 ##############################
327 #   Pre Uninstall old package
328 ##############################
329 %preun
330 exit 0
331
332 ##############################
333 #   Post Uninstall old package
334 ##############################
335 %postun
336 /sbin/ldconfig
337 exit 0
338
339 %postun key-extension
340 /sbin/ldconfig
341 exit 0
342
343 %postun video-player-plugin
344 /sbin/ldconfig
345 exit 0
346
347 %postun camera-player-plugin
348 /sbin/ldconfig
349 exit 0
350
351 %if 0%{?tizen_55_or_greater}
352 %postun web-engine-chromium-plugin
353 /sbin/ldconfig
354 exit 0
355 %endif
356
357 %postun image-loader-plugin
358 /sbin/ldconfig
359 exit 0
360
361 %if 0%{?tizen_55_or_greater}
362 %postun vector-animation-renderer-plugin
363 /sbin/ldconfig
364 exit 0
365 %endif
366
367 %if 0%{?tizen_65_or_greater}
368 %postun vector-image-renderer-plugin
369 /sbin/ldconfig
370 exit 0
371 %endif
372
373 %postun color-controller-plugin
374 /sbin/ldconfig
375 exit 0
376
377 %if 0%{?tizen_55_or_greater}
378 %postun web-engine-lwe-plugin
379 /sbin/ldconfig
380 exit 0
381 %endif
382
383 ##############################
384 # Files in Binary Packages
385 ##############################
386
387 %files
388 %manifest dali-extension.manifest
389 %defattr(-,root,root,-)
390 %{_sysconfdir}/profile.d/dali.sh
391 %{_libdir}/libdali2-extension.so*
392 %license LICENSE
393
394 %files devel
395 %defattr(-,root,root,-)
396 %{_includedir}/dali-extension/*
397 %{_libdir}/pkgconfig/*.pc
398
399 %files key-extension
400 %manifest dali-extension.manifest
401 %defattr(-,root,root,-)
402 %{_libdir}/libdali2-key-extension.so*
403 %license LICENSE
404
405 %files video-player-plugin
406 %manifest dali-extension.manifest
407 %defattr(-,root,root,-)
408 %{_libdir}/libdali2-video-player-plugin.so*
409 %license LICENSE
410
411 %files camera-player-plugin
412 %manifest dali-extension.manifest
413 %defattr(-,root,root,-)
414 %{_libdir}/libdali2-camera-player-plugin.so*
415 %license LICENSE
416
417 %if 0%{?tizen_55_or_greater}
418 %files web-engine-chromium-plugin
419 %manifest dali-extension.manifest
420 %defattr(-,root,root,-)
421 %{_libdir}/libdali2-web-engine-chromium-plugin.so*
422 %license LICENSE
423 %endif
424
425 %if 0%{?use_image_loader}
426 %files image-loader-plugin
427 %manifest dali-extension.manifest
428 %defattr(-,root,root,-)
429 %{_libdir}/libdali2-image-loader-plugin.so*
430 %license LICENSE
431 %endif
432
433 %if 0%{?tizen_55_or_greater}
434 %files vector-animation-renderer-plugin
435 %manifest dali-extension.manifest
436 %defattr(-,root,root,-)
437 %{_libdir}/libdali2-vector-animation-renderer-plugin.so*
438 %license LICENSE
439 %endif
440
441 %if 0%{?tizen_65_or_greater}
442 %files vector-image-renderer-plugin
443 %manifest dali-extension.manifest
444 %defattr(-,root,root,-)
445 %{_libdir}/libdali2-vector-image-renderer-plugin.so*
446 %license LICENSE
447 %endif
448
449 %files color-controller-plugin
450 %manifest dali-extension.manifest
451 %defattr(-,root,root,-)
452 %{_libdir}/libdali2-color-controller-plugin.so*
453 %license LICENSE
454
455 %if 0%{?tizen_55_or_greater}
456 %files web-engine-lwe-plugin
457 %manifest dali-extension.manifest
458 %defattr(-,root,root,-)
459 %{_libdir}/libdali2-web-engine-lwe-plugin.so*
460 %license LICENSE
461 %endif