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)
25 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
26 BuildRequires: asan-force-options
27 BuildRequires: asan-build-env
28 BuildRequires: libasan
31 #############################
33 #############################
36 Dali 3D engine Toolkit - a set of controls that provide
37 user interface functionality.
39 ##############################
41 ##############################
42 %package resources_360x360
43 Summary: default resource files for 360x360
44 Requires: %{name} = %{version}-%{release}
45 Conflicts: %{name}-resources_480x800
46 Conflicts: %{name}-resources_720x1280
47 Conflicts: %{name}-resources_1920x1080
48 Conflicts: %{name}-resources_1920x1080_rpi
49 %description resources_360x360
50 dali-toolkit default resource files for 360x360
51 Contain po / sounds / common images / style / style images
53 %package resources_480x800
54 Summary: default resource files for 480x800
55 Requires: %{name} = %{version}-%{release}
56 Conflicts: %{name}-resources_360x360
57 Conflicts: %{name}-resources_720x1280
58 Conflicts: %{name}-resources_1920x1080
59 Conflicts: %{name}-resources_1920x1080_rpi
60 %description resources_480x800
61 dali-toolkit default resource files for 480x800
62 Contain po / sounds / common images / style / style images
64 %package resources_720x1280
65 Summary: default resource files for 720x1280
66 Requires: %{name} = %{version}-%{release}
67 Conflicts: %{name}-resources_360x360
68 Conflicts: %{name}-resources_480x800
69 Conflicts: %{name}-resources_1920x1080
70 Conflicts: %{name}-resources_1920x1080_rpi
71 %description resources_720x1280
72 dali-toolkit default resource files for 720x1280
73 Contain po / sounds / common images / style / style images
75 %package resources_1920x1080
76 Summary: default resource files for 1920x1080
77 Requires: %{name} = %{version}-%{release}
78 Conflicts: %{name}-resources_360x360
79 Conflicts: %{name}-resources_480x800
80 Conflicts: %{name}-resources_720x1280
81 Conflicts: %{name}-resources_1920x1080_rpi
82 %description resources_1920x1080
83 dali-toolkit default resource files for 1920x1080
84 Contain po / sounds / common images / style / style images
86 %package resources_1920x1080_rpi
87 Summary: default resource files for 1920x1080 on Raspberry Pi 4
88 Requires: %{name} = %{version}-%{release}
89 Conflicts: %{name}-resources_360x360
90 Conflicts: %{name}-resources_480x800
91 Conflicts: %{name}-resources_720x1280
92 Conflicts: %{name}-resources_1920x1080
93 %description resources_1920x1080_rpi
94 dali-toolkit default resource files for 1920x1080 on Raspberry Pi 4
95 Contain po / sounds / common images / style / style images
98 ##############################
100 ##############################
102 Summary: Application development package for Dali 3D engine toolkit
103 Group: Development/Building
104 Requires: %{name} = %{version}-%{release}
107 Application development package for Dali 3D engine toolkit - headers and package config
109 ##############################
111 ##############################
112 %define dali2_scene3d dali2-scene3d
113 %package -n %{dali2_scene3d}
114 Summary: DLI scene loading library
115 Group: System/Libraries
117 Requires: dali2-toolkit
119 %description -n %{dali2_scene3d}
120 Provides functionality for loading and displaying DLI format scenes. See README.md for more details.
122 %package -n %{dali2_scene3d}-devel
123 Summary: Development components for dali-scene3d
124 Group: Development/Building
125 Requires: %{dali2_scene3d} = %{version}-%{release}
127 %description -n %{dali2_scene3d}-devel
128 Development components for dali-scene3d.
130 ##############################
132 ##############################
133 %define dali2_physics2d dali2-physics-2d
134 %package -n %{dali2_physics2d}
135 Summary: Physics library 2D
136 Group: System/Libraries
139 %description -n %{dali2_physics2d}
140 Provides functionality for 2D physics simulation. See README.md for more details.
142 %package -n %{dali2_physics2d}-devel
143 Summary: Development components for dali2-physics-2d
144 Group: Development/Building
145 Requires: %{dali2_physics2d} = %{version}-%{release}
147 %description -n %{dali2_physics2d}-devel
148 Development components for dali2-physics-2d.
150 ##############################
152 ##############################
153 %define dali2_physics3d dali2-physics-3d
154 %package -n %{dali2_physics3d}
155 Summary: Physics library 3D
156 Group: System/Libraries
159 %description -n %{dali2_physics3d}
160 Provides functionality for 3D physics simulation. See README.md for more details.
162 %package -n %{dali2_physics3d}-devel
163 Summary: Development components for dali2-physics-3d
164 Group: Development/Building
165 Requires: %{dali2_physics3d} = %{version}-%{release}
167 %description -n %{dali2_physics3d}-devel
168 Development components for dali2-physics-3d.
170 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
171 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
173 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
174 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
175 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
176 %define dev_include_path %{_includedir}
178 %define dali_xml_file_dir %TZ_SYS_RO_PACKAGES
180 ##############################
182 ##############################
186 ##############################
188 ##############################
192 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
195 language=${language%.po}
196 msgfmt -o ${language}.mo ${language}.po
201 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
202 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
204 %if 0%{?enable_coverage}
205 CXXFLAGS+=" --coverage "
206 LDFLAGS+=" --coverage "
210 CXXFLAGS+=" -D_ARCH_ARM_"
213 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
214 CFLAGS+=" -fsanitize=address"
215 CXXFLAGS+=" -fsanitize=address"
216 LDFLAGS+=" -fsanitize=address"
220 cd %{_builddir}/dali2-toolkit-%{version}/build/tizen
222 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
223 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
226 %if 0%{?enable_debug}
227 -DCMAKE_BUILD_TYPE=Debug \
230 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
231 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
232 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
235 make %{?jobs:-j%jobs}
237 ##############################
239 ##############################
244 pushd %{_builddir}/%{name}-%{version}/build/tizen
249 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
252 language=${language%.mo}
253 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
254 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
259 # Remove default style and style images which are for Linux build
260 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
262 # Make folder to contain style and style images
263 # After making folder, copy local style and style images to new folder
264 pushd %{_builddir}/%{name}-%{version}
265 mkdir -p %{buildroot}%{dali_toolkit_style_files}/360x360
266 cp -r dali-toolkit/styles/360x360/* %{buildroot}%{dali_toolkit_style_files}/360x360
267 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
268 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
269 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
270 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
271 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
272 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
273 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080_rpi
274 cp -r dali-toolkit/styles/1920x1080_rpi/* %{buildroot}%{dali_toolkit_style_files}/1920x1080_rpi
276 # Copy default feedback theme
277 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
280 ##############################
282 ##############################
284 %pre resources_360x360
287 pushd %{dali_toolkit_style_files}
293 %pre resources_480x800
296 pushd %{dali_toolkit_style_files}
302 %pre resources_720x1280
305 pushd %{dali_toolkit_style_files}
311 %pre resources_1920x1080
314 pushd %{dali_toolkit_style_files}
320 %pre resources_1920x1080_rpi
323 pushd %{dali_toolkit_style_files}
329 ##############################
331 ##############################
336 %post resources_360x360
337 pushd %{dali_toolkit_style_files}/360x360
338 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
341 %post resources_480x800
342 pushd %{dali_toolkit_style_files}/480x800
343 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
346 %post resources_720x1280
347 pushd %{dali_toolkit_style_files}/720x1280
348 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
351 %post resources_1920x1080
352 pushd %{dali_toolkit_style_files}/1920x1080
353 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
356 %post resources_1920x1080_rpi
357 pushd %{dali_toolkit_style_files}/1920x1080_rpi
358 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
361 ##############################
363 ##############################
365 %preun resources_360x360
368 %preun resources_360x360
369 pushd %{dali_toolkit_style_files}
371 mv dali-toolkit-default-theme.json ./360x360
376 %preun resources_480x800
379 %preun resources_480x800
380 pushd %{dali_toolkit_style_files}
382 mv dali-toolkit-default-theme.json ./480x800
387 %preun resources_720x1280
390 %preun resources_720x1280
391 pushd %{dali_toolkit_style_files}
393 mv dali-toolkit-default-theme.json ./720x1280
398 %preun resources_1920x1080
401 %preun resources_1920x1080
402 pushd %{dali_toolkit_style_files}
403 mv images ./1920x1080
404 mv dali-toolkit-default-theme.json ./1920x1080
409 %preun resources_1920x1080_rpi
412 %preun resources_1920x1080_rpi
413 pushd %{dali_toolkit_style_files}
414 mv images ./1920x1080_rpi
415 mv dali-toolkit-default-theme.json ./1920x1080_rpi
420 ##############################
422 ##############################
427 %postun resources_360x360
430 pushd %{dali_toolkit_style_files}
436 %postun resources_480x800
439 pushd %{dali_toolkit_style_files}
445 %postun resources_720x1280
448 pushd %{dali_toolkit_style_files}
454 %postun resources_1920x1080
457 pushd %{dali_toolkit_style_files}
463 %postun resources_1920x1080_rpi
466 pushd %{dali_toolkit_style_files}
472 ##############################
473 # Files in Binary Packages
474 ##############################
476 %if 0%{?enable_dali_smack_rules}
477 %manifest dali-toolkit.manifest-smack
479 %manifest dali-toolkit.manifest
481 %defattr(-,root,root,-)
482 %{_libdir}/libdali2-toolkit.so*
486 %defattr(-,root,root,-)
487 %{dev_include_path}/dali-toolkit/*
488 %{_libdir}/pkgconfig/dali2-toolkit.pc
489 %{_bindir}/dali-shader-generator
491 %files resources_360x360
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}/360x360/*
497 %{dali_toolkit_style_files}/default-feedback-theme.json
498 %{_datadir}/locale/*/LC_MESSAGES/*
500 %files resources_480x800
501 %manifest dali-toolkit-resources.manifest
502 %defattr(-,root,root,-)
503 %{dali_toolkit_image_files}/*
504 %{dali_toolkit_sound_files}/*
505 %{dali_toolkit_style_files}/480x800/*
506 %{dali_toolkit_style_files}/default-feedback-theme.json
507 %{_datadir}/locale/*/LC_MESSAGES/*
509 %files resources_720x1280
510 %manifest dali-toolkit-resources.manifest
511 %defattr(-,root,root,-)
512 %{dali_toolkit_image_files}/*
513 %{dali_toolkit_sound_files}/*
514 %{dali_toolkit_style_files}/720x1280/*
515 %{dali_toolkit_style_files}/default-feedback-theme.json
516 %{_datadir}/locale/*/LC_MESSAGES/*
518 %files resources_1920x1080
519 %manifest dali-toolkit-resources.manifest
520 %defattr(-,root,root,-)
521 %{dali_toolkit_image_files}/*
522 %{dali_toolkit_sound_files}/*
523 %{dali_toolkit_style_files}/1920x1080/*
524 %{dali_toolkit_style_files}/default-feedback-theme.json
525 %{_datadir}/locale/*/LC_MESSAGES/*
527 %files resources_1920x1080_rpi
528 %manifest dali-toolkit-resources.manifest
529 %defattr(-,root,root,-)
530 %{dali_toolkit_image_files}/*
531 %{dali_toolkit_sound_files}/*
532 %{dali_toolkit_style_files}/1920x1080_rpi/*
533 %{dali_toolkit_style_files}/default-feedback-theme.json
534 %{_datadir}/locale/*/LC_MESSAGES/*
536 %files -n %{dali2_scene3d}
537 %if 0%{?enable_dali_smack_rules}
538 %manifest dali-scene3d.manifest-smack
540 %manifest dali-scene3d.manifest
542 %defattr(-,root,root,-)
543 %{_libdir}/lib%{dali2_scene3d}.so
546 %files -n %{dali2_scene3d}-devel
547 %defattr(-,root,root,-)
548 %{_includedir}/dali-scene3d/public-api/*
549 %{_includedir}/dali-scene3d/dali-scene3d.h
550 %{_libdir}/pkgconfig/dali2-scene3d.pc
552 %files -n %{dali2_physics2d}
553 %if 0%{?enable_dali_smack_rules}
554 %manifest dali-physics-2d.manifest-smack
556 %manifest dali-physics-2d.manifest
558 %defattr(-,root,root,-)
559 %{_libdir}/libchipmunk.so*
560 %{_libdir}/libdali2-physics-2d.so*
563 %files -n %{dali2_physics2d}-devel
564 %defattr(-,root,root,-)
565 %{_includedir}/dali-physics/integration-api/*
566 %{_includedir}/dali-physics/public-api/*
567 %{_includedir}/dali-physics/dali-physics.h
568 %{_includedir}/chipmunk/*
569 %{_libdir}/pkgconfig/chipmunk2d.pc
570 %{_libdir}/pkgconfig/dali2-physics-2d.pc
572 %files -n %{dali2_physics3d}
573 %if 0%{?enable_dali_smack_rules}
574 %manifest dali-physics-3d.manifest-smack
576 %manifest dali-physics-3d.manifest
578 %defattr(-,root,root,-)
579 %{_libdir}/libbullet3.so*
580 %{_libdir}/libdali2-physics-3d.so*
583 %files -n %{dali2_physics3d}-devel
584 %defattr(-,root,root,-)
585 %{_includedir}/dali-physics/integration-api/*
586 %{_includedir}/dali-physics/public-api/*
587 %{_includedir}/dali-physics/dali-physics.h
588 %{_includedir}/bullet/*
589 %{_libdir}/pkgconfig/dali2-physics-3d.pc
590 %{_libdir}/pkgconfig/bullet3.pc