2 Summary: Dali 3D engine Toolkit
5 Group: System/Libraries
6 License: Apache-2.0 and BSD-3-Clause and MIT
7 URL: https://review.tizen.org/git/?p=platform/core/uifw/dali-toolkit.git;a=summary
8 Source0: %{name}-%{version}.tar.gz
10 Requires(post): /sbin/ldconfig
11 Requires(postun): /sbin/ldconfig
13 BuildRequires: pkgconfig
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(dali2-core)
16 BuildRequires: pkgconfig(dali2-adaptor)
17 BuildRequires: pkgconfig(gles20)
18 BuildRequires: pkgconfig(glesv2)
19 BuildRequires: pkgconfig(egl)
21 BuildRequires: gettext
22 BuildRequires: pkgconfig(libtzplatform-config)
24 #############################
26 #############################
29 Dali 3D engine Toolkit - a set of controls that provide
30 user interface functionality.
32 ##############################
34 ##############################
35 %package resources_360x360
36 Summary: default resource files for 360x360
37 Requires: %{name} = %{version}-%{release}
38 Conflicts: %{name}-resources_480x800
39 Conflicts: %{name}-resources_720x1280
40 Conflicts: %{name}-resources_1920x1080
41 Conflicts: %{name}-resources_1920x1080_rpi
42 %description resources_360x360
43 dali-toolkit default resource files for 360x360
44 Contain po / sounds / common images / style / style images
46 %package resources_480x800
47 Summary: default resource files for 480x800
48 Requires: %{name} = %{version}-%{release}
49 Conflicts: %{name}-resources_360x360
50 Conflicts: %{name}-resources_720x1280
51 Conflicts: %{name}-resources_1920x1080
52 Conflicts: %{name}-resources_1920x1080_rpi
53 %description resources_480x800
54 dali-toolkit default resource files for 480x800
55 Contain po / sounds / common images / style / style images
57 %package resources_720x1280
58 Summary: default resource files for 720x1280
59 Requires: %{name} = %{version}-%{release}
60 Conflicts: %{name}-resources_360x360
61 Conflicts: %{name}-resources_480x800
62 Conflicts: %{name}-resources_1920x1080
63 Conflicts: %{name}-resources_1920x1080_rpi
64 %description resources_720x1280
65 dali-toolkit default resource files for 720x1280
66 Contain po / sounds / common images / style / style images
68 %package resources_1920x1080
69 Summary: default resource files for 1920x1080
70 Requires: %{name} = %{version}-%{release}
71 Conflicts: %{name}-resources_360x360
72 Conflicts: %{name}-resources_480x800
73 Conflicts: %{name}-resources_720x1280
74 Conflicts: %{name}-resources_1920x1080_rpi
75 %description resources_1920x1080
76 dali-toolkit default resource files for 1920x1080
77 Contain po / sounds / common images / style / style images
79 %package resources_1920x1080_rpi
80 Summary: default resource files for 1920x1080 on Raspberry Pi 4
81 Requires: %{name} = %{version}-%{release}
82 Conflicts: %{name}-resources_360x360
83 Conflicts: %{name}-resources_480x800
84 Conflicts: %{name}-resources_720x1280
85 Conflicts: %{name}-resources_1920x1080
86 %description resources_1920x1080_rpi
87 dali-toolkit default resource files for 1920x1080 on Raspberry Pi 4
88 Contain po / sounds / common images / style / style images
91 ##############################
93 ##############################
95 Summary: Application development package for Dali 3D engine toolkit
96 Group: Development/Building
97 Requires: %{name} = %{version}-%{release}
100 Application development package for Dali 3D engine toolkit - headers and package config
102 ##############################
104 ##############################
105 %define dali2_scene3d dali2-scene3d
106 %package -n %{dali2_scene3d}
107 Summary: DLI scene loading library
108 Group: System/Libraries
110 Requires: dali2-toolkit
112 %description -n %{dali2_scene3d}
113 Provides functionality for loading and displaying DLI format scenes. See README.md for more details.
115 %package -n %{dali2_scene3d}-devel
116 Summary: Development components for dali-scene3d
117 Group: Development/Building
118 Requires: %{dali2_scene3d} = %{version}-%{release}
120 %description -n %{dali2_scene3d}-devel
121 Development components for dali-scene3d.
123 ##############################
125 ##############################
126 %define dali2_physics2d dali2-physics-2d
127 %package -n %{dali2_physics2d}
128 Summary: Physics library 2D
129 Group: System/Libraries
132 %description -n %{dali2_physics2d}
133 Provides functionality for 2D physics simulation. See README.md for more details.
135 %package -n %{dali2_physics2d}-devel
136 Summary: Development components for dali2-physics-2d
137 Group: Development/Building
138 Requires: %{dali2_physics2d} = %{version}-%{release}
140 %description -n %{dali2_physics2d}-devel
141 Development components for dali2-physics-2d.
143 ##############################
145 ##############################
146 %define dali2_physics3d dali2-physics-3d
147 %package -n %{dali2_physics3d}
148 Summary: Physics library 3D
149 Group: System/Libraries
152 %description -n %{dali2_physics3d}
153 Provides functionality for 3D physics simulation. See README.md for more details.
155 %package -n %{dali2_physics3d}-devel
156 Summary: Development components for dali2-physics-3d
157 Group: Development/Building
158 Requires: %{dali2_physics3d} = %{version}-%{release}
160 %description -n %{dali2_physics3d}-devel
161 Development components for dali2-physics-3d.
163 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
164 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
166 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
167 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
168 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
169 %define dev_include_path %{_includedir}
171 %define dali_xml_file_dir %TZ_SYS_RO_PACKAGES
173 ##############################
175 ##############################
179 ##############################
181 ##############################
185 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
188 language=${language%.po}
189 msgfmt -o ${language}.mo ${language}.po
194 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
195 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
197 %if 0%{?enable_coverage}
198 CXXFLAGS+=" --coverage "
199 LDFLAGS+=" --coverage "
203 CXXFLAGS+=" -D_ARCH_ARM_"
207 cd %{_builddir}/dali2-toolkit-%{version}/build/tizen
209 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
210 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
213 %if 0%{?enable_debug}
214 -DCMAKE_BUILD_TYPE=Debug \
217 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
218 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
219 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
222 make %{?jobs:-j%jobs}
224 ##############################
226 ##############################
231 pushd %{_builddir}/%{name}-%{version}/build/tizen
236 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
239 language=${language%.mo}
240 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
241 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
246 # Remove default style and style images which are for Linux build
247 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
249 # Make folder to contain style and style images
250 # After making folder, copy local style and style images to new folder
251 pushd %{_builddir}/%{name}-%{version}
252 mkdir -p %{buildroot}%{dali_toolkit_style_files}/360x360
253 cp -r dali-toolkit/styles/360x360/* %{buildroot}%{dali_toolkit_style_files}/360x360
254 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
255 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
256 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
257 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
258 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
259 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
260 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080_rpi
261 cp -r dali-toolkit/styles/1920x1080_rpi/* %{buildroot}%{dali_toolkit_style_files}/1920x1080_rpi
263 # Copy default feedback theme
264 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
266 # Copy default debug image visual shader script
267 cp dali-toolkit/styles/debug-image-visual-shader-script.json %{buildroot}%{dali_toolkit_style_files}
270 ##############################
272 ##############################
274 %pre resources_360x360
277 pushd %{dali_toolkit_style_files}
283 %pre resources_480x800
286 pushd %{dali_toolkit_style_files}
292 %pre resources_720x1280
295 pushd %{dali_toolkit_style_files}
301 %pre resources_1920x1080
304 pushd %{dali_toolkit_style_files}
310 %pre resources_1920x1080_rpi
313 pushd %{dali_toolkit_style_files}
319 ##############################
321 ##############################
326 %post resources_360x360
327 pushd %{dali_toolkit_style_files}/360x360
328 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
331 %post resources_480x800
332 pushd %{dali_toolkit_style_files}/480x800
333 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
336 %post resources_720x1280
337 pushd %{dali_toolkit_style_files}/720x1280
338 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
341 %post resources_1920x1080
342 pushd %{dali_toolkit_style_files}/1920x1080
343 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
346 %post resources_1920x1080_rpi
347 pushd %{dali_toolkit_style_files}/1920x1080_rpi
348 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
351 ##############################
353 ##############################
355 %preun resources_360x360
358 %preun resources_360x360
359 pushd %{dali_toolkit_style_files}
361 mv dali-toolkit-default-theme.json ./360x360
366 %preun resources_480x800
369 %preun resources_480x800
370 pushd %{dali_toolkit_style_files}
372 mv dali-toolkit-default-theme.json ./480x800
377 %preun resources_720x1280
380 %preun resources_720x1280
381 pushd %{dali_toolkit_style_files}
383 mv dali-toolkit-default-theme.json ./720x1280
388 %preun resources_1920x1080
391 %preun resources_1920x1080
392 pushd %{dali_toolkit_style_files}
393 mv images ./1920x1080
394 mv dali-toolkit-default-theme.json ./1920x1080
399 %preun resources_1920x1080_rpi
402 %preun resources_1920x1080_rpi
403 pushd %{dali_toolkit_style_files}
404 mv images ./1920x1080_rpi
405 mv dali-toolkit-default-theme.json ./1920x1080_rpi
410 ##############################
412 ##############################
417 %postun resources_360x360
420 pushd %{dali_toolkit_style_files}
426 %postun resources_480x800
429 pushd %{dali_toolkit_style_files}
435 %postun resources_720x1280
438 pushd %{dali_toolkit_style_files}
444 %postun resources_1920x1080
447 pushd %{dali_toolkit_style_files}
453 %postun resources_1920x1080_rpi
456 pushd %{dali_toolkit_style_files}
462 ##############################
463 # Files in Binary Packages
464 ##############################
466 %if 0%{?enable_dali_smack_rules}
467 %manifest dali-toolkit.manifest-smack
469 %manifest dali-toolkit.manifest
471 %defattr(-,root,root,-)
472 %{_libdir}/libdali2-toolkit.so*
476 %defattr(-,root,root,-)
477 %{dev_include_path}/dali-toolkit/*
478 %{_libdir}/pkgconfig/dali2-toolkit.pc
479 %{_bindir}/dali-shader-generator
481 %files resources_360x360
482 %manifest dali-toolkit-resources.manifest
483 %defattr(-,root,root,-)
484 %{dali_toolkit_image_files}/*
485 %{dali_toolkit_sound_files}/*
486 %{dali_toolkit_style_files}/360x360/*
487 %{dali_toolkit_style_files}/debug-image-visual-shader-script.json
488 %{dali_toolkit_style_files}/default-feedback-theme.json
489 %{_datadir}/locale/*/LC_MESSAGES/*
491 %files resources_480x800
492 %manifest dali-toolkit-resources.manifest
493 %defattr(-,root,root,-)
494 %{dali_toolkit_image_files}/*
495 %{dali_toolkit_sound_files}/*
496 %{dali_toolkit_style_files}/480x800/*
497 %{dali_toolkit_style_files}/debug-image-visual-shader-script.json
498 %{dali_toolkit_style_files}/default-feedback-theme.json
499 %{_datadir}/locale/*/LC_MESSAGES/*
501 %files resources_720x1280
502 %manifest dali-toolkit-resources.manifest
503 %defattr(-,root,root,-)
504 %{dali_toolkit_image_files}/*
505 %{dali_toolkit_sound_files}/*
506 %{dali_toolkit_style_files}/720x1280/*
507 %{dali_toolkit_style_files}/debug-image-visual-shader-script.json
508 %{dali_toolkit_style_files}/default-feedback-theme.json
509 %{_datadir}/locale/*/LC_MESSAGES/*
511 %files resources_1920x1080
512 %manifest dali-toolkit-resources.manifest
513 %defattr(-,root,root,-)
514 %{dali_toolkit_image_files}/*
515 %{dali_toolkit_sound_files}/*
516 %{dali_toolkit_style_files}/1920x1080/*
517 %{dali_toolkit_style_files}/debug-image-visual-shader-script.json
518 %{dali_toolkit_style_files}/default-feedback-theme.json
519 %{_datadir}/locale/*/LC_MESSAGES/*
521 %files resources_1920x1080_rpi
522 %manifest dali-toolkit-resources.manifest
523 %defattr(-,root,root,-)
524 %{dali_toolkit_image_files}/*
525 %{dali_toolkit_sound_files}/*
526 %{dali_toolkit_style_files}/1920x1080_rpi/*
527 %{dali_toolkit_style_files}/debug-image-visual-shader-script.json
528 %{dali_toolkit_style_files}/default-feedback-theme.json
529 %{_datadir}/locale/*/LC_MESSAGES/*
531 %files -n %{dali2_scene3d}
532 %if 0%{?enable_dali_smack_rules}
533 %manifest dali-scene3d.manifest-smack
535 %manifest dali-scene3d.manifest
537 %defattr(-,root,root,-)
538 %{_libdir}/lib%{dali2_scene3d}.so
541 %files -n %{dali2_scene3d}-devel
542 %defattr(-,root,root,-)
543 %{_includedir}/dali-scene3d/public-api/*
544 %{_includedir}/dali-scene3d/dali-scene3d.h
545 %{_libdir}/pkgconfig/dali2-scene3d.pc
547 %files -n %{dali2_physics2d}
548 %if 0%{?enable_dali_smack_rules}
549 %manifest dali-physics-2d.manifest-smack
551 %manifest dali-physics-2d.manifest
553 %defattr(-,root,root,-)
554 %{_libdir}/libchipmunk.so*
555 %{_libdir}/libdali2-physics-2d.so*
558 %files -n %{dali2_physics2d}-devel
559 %defattr(-,root,root,-)
560 %{_includedir}/dali-physics/integration-api/*
561 %{_includedir}/dali-physics/public-api/*
562 %{_includedir}/dali-physics/dali-physics.h
563 %{_includedir}/chipmunk/*
564 %{_libdir}/pkgconfig/chipmunk2d.pc
565 %{_libdir}/pkgconfig/dali2-physics-2d.pc
567 %files -n %{dali2_physics3d}
568 %if 0%{?enable_dali_smack_rules}
569 %manifest dali-physics-3d.manifest-smack
571 %manifest dali-physics-3d.manifest
573 %defattr(-,root,root,-)
574 %{_libdir}/libbullet3.so*
575 %{_libdir}/libdali2-physics-3d.so*
578 %files -n %{dali2_physics3d}-devel
579 %defattr(-,root,root,-)
580 %{_includedir}/dali-physics/integration-api/*
581 %{_includedir}/dali-physics/public-api/*
582 %{_includedir}/dali-physics/dali-physics.h
583 %{_includedir}/bullet/*
584 %{_libdir}/pkgconfig/dali2-physics-3d.pc
585 %{_libdir}/pkgconfig/bullet3.pc