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}
267 ##############################
269 ##############################
271 %pre resources_360x360
274 pushd %{dali_toolkit_style_files}
280 %pre resources_480x800
283 pushd %{dali_toolkit_style_files}
289 %pre resources_720x1280
292 pushd %{dali_toolkit_style_files}
298 %pre resources_1920x1080
301 pushd %{dali_toolkit_style_files}
307 %pre resources_1920x1080_rpi
310 pushd %{dali_toolkit_style_files}
316 ##############################
318 ##############################
323 %post resources_360x360
324 pushd %{dali_toolkit_style_files}/360x360
325 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
328 %post resources_480x800
329 pushd %{dali_toolkit_style_files}/480x800
330 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
333 %post resources_720x1280
334 pushd %{dali_toolkit_style_files}/720x1280
335 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
338 %post resources_1920x1080
339 pushd %{dali_toolkit_style_files}/1920x1080
340 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
343 %post resources_1920x1080_rpi
344 pushd %{dali_toolkit_style_files}/1920x1080_rpi
345 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
348 ##############################
350 ##############################
352 %preun resources_360x360
355 %preun resources_360x360
356 pushd %{dali_toolkit_style_files}
358 mv dali-toolkit-default-theme.json ./360x360
363 %preun resources_480x800
366 %preun resources_480x800
367 pushd %{dali_toolkit_style_files}
369 mv dali-toolkit-default-theme.json ./480x800
374 %preun resources_720x1280
377 %preun resources_720x1280
378 pushd %{dali_toolkit_style_files}
380 mv dali-toolkit-default-theme.json ./720x1280
385 %preun resources_1920x1080
388 %preun resources_1920x1080
389 pushd %{dali_toolkit_style_files}
390 mv images ./1920x1080
391 mv dali-toolkit-default-theme.json ./1920x1080
396 %preun resources_1920x1080_rpi
399 %preun resources_1920x1080_rpi
400 pushd %{dali_toolkit_style_files}
401 mv images ./1920x1080_rpi
402 mv dali-toolkit-default-theme.json ./1920x1080_rpi
407 ##############################
409 ##############################
414 %postun resources_360x360
417 pushd %{dali_toolkit_style_files}
423 %postun resources_480x800
426 pushd %{dali_toolkit_style_files}
432 %postun resources_720x1280
435 pushd %{dali_toolkit_style_files}
441 %postun resources_1920x1080
444 pushd %{dali_toolkit_style_files}
450 %postun resources_1920x1080_rpi
453 pushd %{dali_toolkit_style_files}
459 ##############################
460 # Files in Binary Packages
461 ##############################
463 %if 0%{?enable_dali_smack_rules}
464 %manifest dali-toolkit.manifest-smack
466 %manifest dali-toolkit.manifest
468 %defattr(-,root,root,-)
469 %{_libdir}/libdali2-toolkit.so*
473 %defattr(-,root,root,-)
474 %{dev_include_path}/dali-toolkit/*
475 %{_libdir}/pkgconfig/dali2-toolkit.pc
476 %{_bindir}/dali-shader-generator
478 %files resources_360x360
479 %manifest dali-toolkit-resources.manifest
480 %defattr(-,root,root,-)
481 %{dali_toolkit_image_files}/*
482 %{dali_toolkit_sound_files}/*
483 %{dali_toolkit_style_files}/360x360/*
484 %{dali_toolkit_style_files}/default-feedback-theme.json
485 %{_datadir}/locale/*/LC_MESSAGES/*
487 %files resources_480x800
488 %manifest dali-toolkit-resources.manifest
489 %defattr(-,root,root,-)
490 %{dali_toolkit_image_files}/*
491 %{dali_toolkit_sound_files}/*
492 %{dali_toolkit_style_files}/480x800/*
493 %{dali_toolkit_style_files}/default-feedback-theme.json
494 %{_datadir}/locale/*/LC_MESSAGES/*
496 %files resources_720x1280
497 %manifest dali-toolkit-resources.manifest
498 %defattr(-,root,root,-)
499 %{dali_toolkit_image_files}/*
500 %{dali_toolkit_sound_files}/*
501 %{dali_toolkit_style_files}/720x1280/*
502 %{dali_toolkit_style_files}/default-feedback-theme.json
503 %{_datadir}/locale/*/LC_MESSAGES/*
505 %files resources_1920x1080
506 %manifest dali-toolkit-resources.manifest
507 %defattr(-,root,root,-)
508 %{dali_toolkit_image_files}/*
509 %{dali_toolkit_sound_files}/*
510 %{dali_toolkit_style_files}/1920x1080/*
511 %{dali_toolkit_style_files}/default-feedback-theme.json
512 %{_datadir}/locale/*/LC_MESSAGES/*
514 %files resources_1920x1080_rpi
515 %manifest dali-toolkit-resources.manifest
516 %defattr(-,root,root,-)
517 %{dali_toolkit_image_files}/*
518 %{dali_toolkit_sound_files}/*
519 %{dali_toolkit_style_files}/1920x1080_rpi/*
520 %{dali_toolkit_style_files}/default-feedback-theme.json
521 %{_datadir}/locale/*/LC_MESSAGES/*
523 %files -n %{dali2_scene3d}
524 %if 0%{?enable_dali_smack_rules}
525 %manifest dali-scene3d.manifest-smack
527 %manifest dali-scene3d.manifest
529 %defattr(-,root,root,-)
530 %{_libdir}/lib%{dali2_scene3d}.so
533 %files -n %{dali2_scene3d}-devel
534 %defattr(-,root,root,-)
535 %{_includedir}/dali-scene3d/public-api/*
536 %{_includedir}/dali-scene3d/dali-scene3d.h
537 %{_libdir}/pkgconfig/dali2-scene3d.pc
539 %files -n %{dali2_physics2d}
540 %if 0%{?enable_dali_smack_rules}
541 %manifest dali-physics-2d.manifest-smack
543 %manifest dali-physics-2d.manifest
545 %defattr(-,root,root,-)
546 %{_libdir}/libchipmunk.so*
549 %files -n %{dali2_physics2d}-devel
550 %defattr(-,root,root,-)
551 %{_includedir}/chipmunk/*
552 %{_libdir}/pkgconfig/dali2-physics-2d.pc
553 %{_libdir}/pkgconfig/chipmunk2d.pc
555 %files -n %{dali2_physics3d}
556 %if 0%{?enable_dali_smack_rules}
557 %manifest dali-physics-3d.manifest-smack
559 %manifest dali-physics-3d.manifest
561 %defattr(-,root,root,-)
562 %{_libdir}/libbullet3.so*
565 %files -n %{dali2_physics3d}-devel
566 %defattr(-,root,root,-)
567 %{_includedir}/bullet/*
568 %{_libdir}/pkgconfig/dali2-physics-3d.pc
569 %{_libdir}/pkgconfig/bullet3.pc