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: gettext
18 BuildRequires: pkgconfig(libtzplatform-config)
20 #############################
22 #############################
25 Dali 3D engine Toolkit - a set of controls that provide
26 user interface functionality.
28 ##############################
30 ##############################
31 %package resources_360x360
32 Summary: default resource files for 360x360
33 Requires: %{name} = %{version}-%{release}
34 Conflicts: %{name}-resources_480x800
35 Conflicts: %{name}-resources_720x1280
36 Conflicts: %{name}-resources_1920x1080
37 %description resources_360x360
38 dali-toolkit default resource files for 360x360
39 Contain po / sounds / common images / style / style images
41 %package resources_480x800
42 Summary: default resource files for 480x800
43 Requires: %{name} = %{version}-%{release}
44 Conflicts: %{name}-resources_360x360
45 Conflicts: %{name}-resources_720x1280
46 Conflicts: %{name}-resources_1920x1080
47 %description resources_480x800
48 dali-toolkit default resource files for 480x800
49 Contain po / sounds / common images / style / style images
51 %package resources_720x1280
52 Summary: default resource files for 720x1280
53 Requires: %{name} = %{version}-%{release}
54 Conflicts: %{name}-resources_360x360
55 Conflicts: %{name}-resources_480x800
56 Conflicts: %{name}-resources_1920x1080
57 %description resources_720x1280
58 dali-toolkit default resource files for 720x1280
59 Contain po / sounds / common images / style / style images
61 %package resources_1920x1080
62 Summary: default resource files for 1920x1080
63 Requires: %{name} = %{version}-%{release}
64 Conflicts: %{name}-resources_360x360
65 Conflicts: %{name}-resources_480x800
66 Conflicts: %{name}-resources_720x1280
67 %description resources_1920x1080
68 dali-toolkit default resource files for 1920x1080
69 Contain po / sounds / common images / style / style images
71 ##############################
73 ##############################
75 Summary: Application development package for Dali 3D engine toolkit
76 Group: Development/Building
77 Requires: %{name} = %{version}-%{release}
80 Application development package for Dali 3D engine toolkit - headers and package config
82 ##############################
84 ##############################
85 %define dali2_scene_loader dali2-scene-loader
86 %package -n %{dali2_scene_loader}
87 Summary: DLI scene loading library
88 Group: System/Libraries
91 BuildRequires: pkgconfig(dali2-toolkit)
93 %description -n %{dali2_scene_loader}
94 Provides functionality for loading and displaying DLI format scenes. See README.md for more details.
96 %package -n %{dali2_scene_loader}-devel
97 Summary: Development components for dali-scene-loader
98 Group: Development/Building
99 Requires: %{dali2_scene_loader} = %{version}-%{release}
101 %description -n %{dali2_scene_loader}-devel
102 Development components for dali-scene-loader.
104 ##############################
106 ##############################
110 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
111 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
113 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
114 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
115 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
116 %define dev_include_path %{_includedir}
118 %define dali_xml_file_dir %TZ_SYS_RO_PACKAGES
122 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
125 language=${language%.po}
126 msgfmt -o ${language}.mo ${language}.po
130 ##############################
132 ##############################
135 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
136 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
138 %if 0%{?enable_coverage}
139 CXXFLAGS+=" --coverage "
140 LDFLAGS+=" --coverage "
144 CXXFLAGS+=" -D_ARCH_ARM_"
148 cd %{_builddir}/dali2-toolkit-%{version}/build/tizen
150 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
151 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
154 %if 0%{?enable_debug}
155 -DCMAKE_BUILD_TYPE=Debug \
157 %if 0%{?enable_trace}
160 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
161 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
162 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
165 make %{?jobs:-j%jobs}
167 ##############################
169 ##############################
174 pushd %{_builddir}/%{name}-%{version}/build/tizen
179 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
182 language=${language%.mo}
183 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
184 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
189 # Remove default style and style images which are for Linux build
190 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
192 # Make folder to contain style and style images
193 # After making folder, copy local style and style images to new folder
194 pushd %{_builddir}/%{name}-%{version}
195 mkdir -p %{buildroot}%{dali_toolkit_style_files}/360x360
196 cp -r dali-toolkit/styles/360x360/* %{buildroot}%{dali_toolkit_style_files}/360x360
197 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
198 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
199 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
200 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
201 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
202 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
204 # Copy default feedback theme
205 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
208 ##############################
210 ##############################
212 %pre resources_360x360
215 pushd %{dali_toolkit_style_files}
221 %pre resources_480x800
224 pushd %{dali_toolkit_style_files}
230 %pre resources_720x1280
233 pushd %{dali_toolkit_style_files}
239 %pre resources_1920x1080
242 pushd %{dali_toolkit_style_files}
248 ##############################
250 ##############################
255 %post resources_360x360
256 pushd %{dali_toolkit_style_files}/360x360
257 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
260 %post resources_480x800
261 pushd %{dali_toolkit_style_files}/480x800
262 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
265 %post resources_720x1280
266 pushd %{dali_toolkit_style_files}/720x1280
267 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
270 %post resources_1920x1080
271 pushd %{dali_toolkit_style_files}/1920x1080
272 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
275 ##############################
277 ##############################
279 %preun resources_360x360
282 %preun resources_360x360
283 pushd %{dali_toolkit_style_files}
285 mv dali-toolkit-default-theme.json ./360x360
290 %preun resources_480x800
293 %preun resources_480x800
294 pushd %{dali_toolkit_style_files}
296 mv dali-toolkit-default-theme.json ./480x800
301 %preun resources_720x1280
304 %preun resources_720x1280
305 pushd %{dali_toolkit_style_files}
307 mv dali-toolkit-default-theme.json ./720x1280
312 %preun resources_1920x1080
315 %preun resources_1920x1080
316 pushd %{dali_toolkit_style_files}
317 mv images ./1920x1080
318 mv dali-toolkit-default-theme.json ./1920x1080
323 ##############################
325 ##############################
330 %postun resources_360x360
333 pushd %{dali_toolkit_style_files}
339 %postun resources_480x800
342 pushd %{dali_toolkit_style_files}
348 %postun resources_720x1280
351 pushd %{dali_toolkit_style_files}
357 %postun resources_1920x1080
360 pushd %{dali_toolkit_style_files}
366 ##############################
367 # Files in Binary Packages
368 ##############################
370 %if 0%{?enable_dali_smack_rules}
371 %manifest dali-toolkit.manifest-smack
373 %manifest dali-toolkit.manifest
375 %defattr(-,root,root,-)
376 %{_libdir}/libdali2-toolkit.so*
380 %defattr(-,root,root,-)
381 %{dev_include_path}/dali-toolkit/*
382 %{_libdir}/pkgconfig/dali2-toolkit.pc
384 %files resources_360x360
385 %manifest dali-toolkit-resources.manifest
386 %defattr(-,root,root,-)
387 %{dali_toolkit_image_files}/*
388 %{dali_toolkit_sound_files}/*
389 %{dali_toolkit_style_files}/360x360/*
390 %{dali_toolkit_style_files}/default-feedback-theme.json
391 %{_datadir}/locale/*/LC_MESSAGES/*
393 %files resources_480x800
394 %manifest dali-toolkit-resources.manifest
395 %defattr(-,root,root,-)
396 %{dali_toolkit_image_files}/*
397 %{dali_toolkit_sound_files}/*
398 %{dali_toolkit_style_files}/480x800/*
399 %{dali_toolkit_style_files}/default-feedback-theme.json
400 %{_datadir}/locale/*/LC_MESSAGES/*
402 %files resources_720x1280
403 %manifest dali-toolkit-resources.manifest
404 %defattr(-,root,root,-)
405 %{dali_toolkit_image_files}/*
406 %{dali_toolkit_sound_files}/*
407 %{dali_toolkit_style_files}/720x1280/*
408 %{dali_toolkit_style_files}/default-feedback-theme.json
409 %{_datadir}/locale/*/LC_MESSAGES/*
411 %files resources_1920x1080
412 %manifest dali-toolkit-resources.manifest
413 %defattr(-,root,root,-)
414 %{dali_toolkit_image_files}/*
415 %{dali_toolkit_sound_files}/*
416 %{dali_toolkit_style_files}/1920x1080/*
417 %{dali_toolkit_style_files}/default-feedback-theme.json
418 %{_datadir}/locale/*/LC_MESSAGES/*
420 %files -n %{dali2_scene_loader}
421 %if 0%{?enable_dali_smack_rules}
422 %manifest dali-scene-loader.manifest-smack
424 %manifest dali-scene-loader.manifest
426 %defattr(-,root,root,-)
427 %{_libdir}/lib%{dali2_scene_loader}.so
430 %files -n %{dali2_scene_loader}-devel
431 %defattr(-,root,root,-)
432 %{_includedir}/dali-scene-loader/public-api/*
433 %{_libdir}/pkgconfig/dali2-scene-loader.pc