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 ##############################
88 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
89 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
91 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
92 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
93 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
94 %define dev_include_path %{_includedir}
98 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
101 language=${language%.po}
102 msgfmt -o ${language}.mo ${language}.po
106 ##############################
108 ##############################
111 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
112 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
114 %if 0%{?enable_coverage}
115 CXXFLAGS+=" --coverage "
116 LDFLAGS+=" --coverage "
120 cd %{_builddir}/dali2-toolkit-%{version}/build/tizen
122 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
123 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
126 %if 0%{?enable_debug}
127 -DCMAKE_BUILD_TYPE=Debug \
129 %if 0%{?enable_trace}
132 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
133 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
134 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
137 make %{?jobs:-j%jobs}
139 ##############################
141 ##############################
146 pushd %{_builddir}/%{name}-%{version}/build/tizen
151 cd %{_builddir}/dali2-toolkit-%{version}/dali-toolkit/po
154 language=${language%.mo}
155 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
156 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
161 # Remove default style and style images which are for Linux build
162 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
164 # Make folder to contain style and style images
165 # After making folder, copy local style and style images to new folder
166 pushd %{_builddir}/%{name}-%{version}
167 mkdir -p %{buildroot}%{dali_toolkit_style_files}/360x360
168 cp -r dali-toolkit/styles/360x360/* %{buildroot}%{dali_toolkit_style_files}/360x360
169 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
170 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
171 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
172 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
173 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
174 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
176 # Copy default feedback theme
177 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
180 ##############################
182 ##############################
184 %pre resources_360x360
187 pushd %{dali_toolkit_style_files}
193 %pre resources_480x800
196 pushd %{dali_toolkit_style_files}
202 %pre resources_720x1280
205 pushd %{dali_toolkit_style_files}
211 %pre resources_1920x1080
214 pushd %{dali_toolkit_style_files}
220 ##############################
222 ##############################
227 %post resources_360x360
228 pushd %{dali_toolkit_style_files}/360x360
229 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
232 %post resources_480x800
233 pushd %{dali_toolkit_style_files}/480x800
234 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
237 %post resources_720x1280
238 pushd %{dali_toolkit_style_files}/720x1280
239 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
242 %post resources_1920x1080
243 pushd %{dali_toolkit_style_files}/1920x1080
244 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
247 ##############################
249 ##############################
251 %preun resources_360x360
254 %preun resources_360x360
255 pushd %{dali_toolkit_style_files}
257 mv dali-toolkit-default-theme.json ./360x360
262 %preun resources_480x800
265 %preun resources_480x800
266 pushd %{dali_toolkit_style_files}
268 mv dali-toolkit-default-theme.json ./480x800
273 %preun resources_720x1280
276 %preun resources_720x1280
277 pushd %{dali_toolkit_style_files}
279 mv dali-toolkit-default-theme.json ./720x1280
284 %preun resources_1920x1080
287 %preun resources_1920x1080
288 pushd %{dali_toolkit_style_files}
289 mv images ./1920x1080
290 mv dali-toolkit-default-theme.json ./1920x1080
295 ##############################
297 ##############################
302 %postun resources_360x360
305 pushd %{dali_toolkit_style_files}
311 %postun resources_480x800
314 pushd %{dali_toolkit_style_files}
320 %postun resources_720x1280
323 pushd %{dali_toolkit_style_files}
329 %postun resources_1920x1080
332 pushd %{dali_toolkit_style_files}
338 ##############################
339 # Files in Binary Packages
340 ##############################
342 %if 0%{?enable_dali_smack_rules}
343 %manifest dali-toolkit.manifest-smack
345 %manifest dali-toolkit.manifest
347 %defattr(-,root,root,-)
348 %{_libdir}/libdali2-toolkit.so*
352 %defattr(-,root,root,-)
353 %{dev_include_path}/dali-toolkit/*
354 %{_libdir}/pkgconfig/dali2-toolkit.pc
356 %files resources_360x360
357 %manifest dali-toolkit-resources.manifest
358 %defattr(-,root,root,-)
359 %{dali_toolkit_image_files}/*
360 %{dali_toolkit_sound_files}/*
361 %{dali_toolkit_style_files}/360x360/*
362 %{dali_toolkit_style_files}/default-feedback-theme.json
363 %{_datadir}/locale/*/LC_MESSAGES/*
365 %files resources_480x800
366 %manifest dali-toolkit-resources.manifest
367 %defattr(-,root,root,-)
368 %{dali_toolkit_image_files}/*
369 %{dali_toolkit_sound_files}/*
370 %{dali_toolkit_style_files}/480x800/*
371 %{dali_toolkit_style_files}/default-feedback-theme.json
372 %{_datadir}/locale/*/LC_MESSAGES/*
374 %files resources_720x1280
375 %manifest dali-toolkit-resources.manifest
376 %defattr(-,root,root,-)
377 %{dali_toolkit_image_files}/*
378 %{dali_toolkit_sound_files}/*
379 %{dali_toolkit_style_files}/720x1280/*
380 %{dali_toolkit_style_files}/default-feedback-theme.json
381 %{_datadir}/locale/*/LC_MESSAGES/*
383 %files resources_1920x1080
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}/1920x1080/*
389 %{dali_toolkit_style_files}/default-feedback-theme.json
390 %{_datadir}/locale/*/LC_MESSAGES/*