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 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
124 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
126 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
127 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
128 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
129 %define dev_include_path %{_includedir}
131 %define dali_xml_file_dir %TZ_SYS_RO_PACKAGES
133 ##############################
135 ##############################
139 ##############################
141 ##############################
145 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
148 language=${language%.po}
149 msgfmt -o ${language}.mo ${language}.po
154 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
155 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
157 %if 0%{?enable_coverage}
158 CXXFLAGS+=" --coverage "
159 LDFLAGS+=" --coverage "
163 CXXFLAGS+=" -D_ARCH_ARM_"
167 cd %{_builddir}/dali2-toolkit-%{version}/build/tizen
169 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
170 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
173 %if 0%{?enable_debug}
174 -DCMAKE_BUILD_TYPE=Debug \
177 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
178 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
179 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
182 make %{?jobs:-j%jobs}
184 ##############################
186 ##############################
191 pushd %{_builddir}/%{name}-%{version}/build/tizen
196 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
199 language=${language%.mo}
200 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
201 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
206 # Remove default style and style images which are for Linux build
207 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
209 # Make folder to contain style and style images
210 # After making folder, copy local style and style images to new folder
211 pushd %{_builddir}/%{name}-%{version}
212 mkdir -p %{buildroot}%{dali_toolkit_style_files}/360x360
213 cp -r dali-toolkit/styles/360x360/* %{buildroot}%{dali_toolkit_style_files}/360x360
214 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
215 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
216 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
217 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
218 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
219 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
220 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080_rpi
221 cp -r dali-toolkit/styles/1920x1080_rpi/* %{buildroot}%{dali_toolkit_style_files}/1920x1080_rpi
223 # Copy default feedback theme
224 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
227 ##############################
229 ##############################
231 %pre resources_360x360
234 pushd %{dali_toolkit_style_files}
240 %pre resources_480x800
243 pushd %{dali_toolkit_style_files}
249 %pre resources_720x1280
252 pushd %{dali_toolkit_style_files}
258 %pre resources_1920x1080
261 pushd %{dali_toolkit_style_files}
267 %pre resources_1920x1080_rpi
270 pushd %{dali_toolkit_style_files}
276 ##############################
278 ##############################
283 %post resources_360x360
284 pushd %{dali_toolkit_style_files}/360x360
285 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
288 %post resources_480x800
289 pushd %{dali_toolkit_style_files}/480x800
290 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
293 %post resources_720x1280
294 pushd %{dali_toolkit_style_files}/720x1280
295 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
298 %post resources_1920x1080
299 pushd %{dali_toolkit_style_files}/1920x1080
300 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
303 %post resources_1920x1080_rpi
304 pushd %{dali_toolkit_style_files}/1920x1080_rpi
305 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
308 ##############################
310 ##############################
312 %preun resources_360x360
315 %preun resources_360x360
316 pushd %{dali_toolkit_style_files}
318 mv dali-toolkit-default-theme.json ./360x360
323 %preun resources_480x800
326 %preun resources_480x800
327 pushd %{dali_toolkit_style_files}
329 mv dali-toolkit-default-theme.json ./480x800
334 %preun resources_720x1280
337 %preun resources_720x1280
338 pushd %{dali_toolkit_style_files}
340 mv dali-toolkit-default-theme.json ./720x1280
345 %preun resources_1920x1080
348 %preun resources_1920x1080
349 pushd %{dali_toolkit_style_files}
350 mv images ./1920x1080
351 mv dali-toolkit-default-theme.json ./1920x1080
356 %preun resources_1920x1080_rpi
359 %preun resources_1920x1080_rpi
360 pushd %{dali_toolkit_style_files}
361 mv images ./1920x1080_rpi
362 mv dali-toolkit-default-theme.json ./1920x1080_rpi
367 ##############################
369 ##############################
374 %postun resources_360x360
377 pushd %{dali_toolkit_style_files}
383 %postun resources_480x800
386 pushd %{dali_toolkit_style_files}
392 %postun resources_720x1280
395 pushd %{dali_toolkit_style_files}
401 %postun resources_1920x1080
404 pushd %{dali_toolkit_style_files}
410 %postun resources_1920x1080_rpi
413 pushd %{dali_toolkit_style_files}
419 ##############################
420 # Files in Binary Packages
421 ##############################
423 %if 0%{?enable_dali_smack_rules}
424 %manifest dali-toolkit.manifest-smack
426 %manifest dali-toolkit.manifest
428 %defattr(-,root,root,-)
429 %{_libdir}/libdali2-toolkit.so*
433 %defattr(-,root,root,-)
434 %{dev_include_path}/dali-toolkit/*
435 %{_libdir}/pkgconfig/dali2-toolkit.pc
436 %{_bindir}/dali-shader-generator
438 %files resources_360x360
439 %manifest dali-toolkit-resources.manifest
440 %defattr(-,root,root,-)
441 %{dali_toolkit_image_files}/*
442 %{dali_toolkit_sound_files}/*
443 %{dali_toolkit_style_files}/360x360/*
444 %{dali_toolkit_style_files}/default-feedback-theme.json
445 %{_datadir}/locale/*/LC_MESSAGES/*
447 %files resources_480x800
448 %manifest dali-toolkit-resources.manifest
449 %defattr(-,root,root,-)
450 %{dali_toolkit_image_files}/*
451 %{dali_toolkit_sound_files}/*
452 %{dali_toolkit_style_files}/480x800/*
453 %{dali_toolkit_style_files}/default-feedback-theme.json
454 %{_datadir}/locale/*/LC_MESSAGES/*
456 %files resources_720x1280
457 %manifest dali-toolkit-resources.manifest
458 %defattr(-,root,root,-)
459 %{dali_toolkit_image_files}/*
460 %{dali_toolkit_sound_files}/*
461 %{dali_toolkit_style_files}/720x1280/*
462 %{dali_toolkit_style_files}/default-feedback-theme.json
463 %{_datadir}/locale/*/LC_MESSAGES/*
465 %files resources_1920x1080
466 %manifest dali-toolkit-resources.manifest
467 %defattr(-,root,root,-)
468 %{dali_toolkit_image_files}/*
469 %{dali_toolkit_sound_files}/*
470 %{dali_toolkit_style_files}/1920x1080/*
471 %{dali_toolkit_style_files}/default-feedback-theme.json
472 %{_datadir}/locale/*/LC_MESSAGES/*
474 %files resources_1920x1080_rpi
475 %manifest dali-toolkit-resources.manifest
476 %defattr(-,root,root,-)
477 %{dali_toolkit_image_files}/*
478 %{dali_toolkit_sound_files}/*
479 %{dali_toolkit_style_files}/1920x1080_rpi/*
480 %{dali_toolkit_style_files}/default-feedback-theme.json
481 %{_datadir}/locale/*/LC_MESSAGES/*
483 %files -n %{dali2_scene3d}
484 %if 0%{?enable_dali_smack_rules}
485 %manifest dali-scene3d.manifest-smack
487 %manifest dali-scene3d.manifest
489 %defattr(-,root,root,-)
490 %{_libdir}/lib%{dali2_scene3d}.so
493 %files -n %{dali2_scene3d}-devel
494 %defattr(-,root,root,-)
495 %{_includedir}/dali-scene3d/public-api/*
496 %{_libdir}/pkgconfig/dali2-scene3d.pc