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
90 Requires: dali2-toolkit
92 %description -n %{dali2_scene_loader}
93 Provides functionality for loading and displaying DLI format scenes. See README.md for more details.
95 %package -n %{dali2_scene_loader}-devel
96 Summary: Development components for dali-scene-loader
97 Group: Development/Building
98 Requires: %{dali2_scene_loader} = %{version}-%{release}
100 %description -n %{dali2_scene_loader}-devel
101 Development components for dali-scene-loader.
103 ##############################
105 ##############################
109 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
110 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
112 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
113 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
114 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
115 %define dev_include_path %{_includedir}
117 %define dali_xml_file_dir %TZ_SYS_RO_PACKAGES
121 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
124 language=${language%.po}
125 msgfmt -o ${language}.mo ${language}.po
129 ##############################
131 ##############################
134 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
135 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
137 %if 0%{?enable_coverage}
138 CXXFLAGS+=" --coverage "
139 LDFLAGS+=" --coverage "
143 CXXFLAGS+=" -D_ARCH_ARM_"
147 cd %{_builddir}/dali2-toolkit-%{version}/build/tizen
149 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
150 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
153 %if 0%{?enable_debug}
154 -DCMAKE_BUILD_TYPE=Debug \
156 %if 0%{?enable_trace}
159 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
160 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
161 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
164 make %{?jobs:-j%jobs}
166 ##############################
168 ##############################
173 pushd %{_builddir}/%{name}-%{version}/build/tizen
178 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
181 language=${language%.mo}
182 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
183 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
188 # Remove default style and style images which are for Linux build
189 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
191 # Make folder to contain style and style images
192 # After making folder, copy local style and style images to new folder
193 pushd %{_builddir}/%{name}-%{version}
194 mkdir -p %{buildroot}%{dali_toolkit_style_files}/360x360
195 cp -r dali-toolkit/styles/360x360/* %{buildroot}%{dali_toolkit_style_files}/360x360
196 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
197 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
198 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
199 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
200 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
201 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
203 # Copy default feedback theme
204 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
207 ##############################
209 ##############################
211 %pre resources_360x360
214 pushd %{dali_toolkit_style_files}
220 %pre resources_480x800
223 pushd %{dali_toolkit_style_files}
229 %pre resources_720x1280
232 pushd %{dali_toolkit_style_files}
238 %pre resources_1920x1080
241 pushd %{dali_toolkit_style_files}
247 ##############################
249 ##############################
254 %post resources_360x360
255 pushd %{dali_toolkit_style_files}/360x360
256 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
259 %post resources_480x800
260 pushd %{dali_toolkit_style_files}/480x800
261 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
264 %post resources_720x1280
265 pushd %{dali_toolkit_style_files}/720x1280
266 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
269 %post resources_1920x1080
270 pushd %{dali_toolkit_style_files}/1920x1080
271 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
274 ##############################
276 ##############################
278 %preun resources_360x360
281 %preun resources_360x360
282 pushd %{dali_toolkit_style_files}
284 mv dali-toolkit-default-theme.json ./360x360
289 %preun resources_480x800
292 %preun resources_480x800
293 pushd %{dali_toolkit_style_files}
295 mv dali-toolkit-default-theme.json ./480x800
300 %preun resources_720x1280
303 %preun resources_720x1280
304 pushd %{dali_toolkit_style_files}
306 mv dali-toolkit-default-theme.json ./720x1280
311 %preun resources_1920x1080
314 %preun resources_1920x1080
315 pushd %{dali_toolkit_style_files}
316 mv images ./1920x1080
317 mv dali-toolkit-default-theme.json ./1920x1080
322 ##############################
324 ##############################
329 %postun resources_360x360
332 pushd %{dali_toolkit_style_files}
338 %postun resources_480x800
341 pushd %{dali_toolkit_style_files}
347 %postun resources_720x1280
350 pushd %{dali_toolkit_style_files}
356 %postun resources_1920x1080
359 pushd %{dali_toolkit_style_files}
365 ##############################
366 # Files in Binary Packages
367 ##############################
369 %if 0%{?enable_dali_smack_rules}
370 %manifest dali-toolkit.manifest-smack
372 %manifest dali-toolkit.manifest
374 %defattr(-,root,root,-)
375 %{_libdir}/libdali2-toolkit.so*
379 %defattr(-,root,root,-)
380 %{dev_include_path}/dali-toolkit/*
381 %{_libdir}/pkgconfig/dali2-toolkit.pc
383 %files resources_360x360
384 %manifest dali-toolkit-resources.manifest
385 %defattr(-,root,root,-)
386 %{dali_toolkit_image_files}/*
387 %{dali_toolkit_sound_files}/*
388 %{dali_toolkit_style_files}/360x360/*
389 %{dali_toolkit_style_files}/default-feedback-theme.json
390 %{_datadir}/locale/*/LC_MESSAGES/*
392 %files resources_480x800
393 %manifest dali-toolkit-resources.manifest
394 %defattr(-,root,root,-)
395 %{dali_toolkit_image_files}/*
396 %{dali_toolkit_sound_files}/*
397 %{dali_toolkit_style_files}/480x800/*
398 %{dali_toolkit_style_files}/default-feedback-theme.json
399 %{_datadir}/locale/*/LC_MESSAGES/*
401 %files resources_720x1280
402 %manifest dali-toolkit-resources.manifest
403 %defattr(-,root,root,-)
404 %{dali_toolkit_image_files}/*
405 %{dali_toolkit_sound_files}/*
406 %{dali_toolkit_style_files}/720x1280/*
407 %{dali_toolkit_style_files}/default-feedback-theme.json
408 %{_datadir}/locale/*/LC_MESSAGES/*
410 %files resources_1920x1080
411 %manifest dali-toolkit-resources.manifest
412 %defattr(-,root,root,-)
413 %{dali_toolkit_image_files}/*
414 %{dali_toolkit_sound_files}/*
415 %{dali_toolkit_style_files}/1920x1080/*
416 %{dali_toolkit_style_files}/default-feedback-theme.json
417 %{_datadir}/locale/*/LC_MESSAGES/*
419 %files -n %{dali2_scene_loader}
420 %if 0%{?enable_dali_smack_rules}
421 %manifest dali-scene-loader.manifest-smack
423 %manifest dali-scene-loader.manifest
425 %defattr(-,root,root,-)
426 %{_libdir}/lib%{dali2_scene_loader}.so
429 %files -n %{dali2_scene_loader}-devel
430 %defattr(-,root,root,-)
431 %{_includedir}/dali-scene-loader/public-api/*
432 %{_libdir}/pkgconfig/dali2-scene-loader.pc