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(dali-core)
16 BuildRequires: pkgconfig(dali-adaptor)
17 BuildRequires: gettext
18 BuildRequires: pkgconfig(libtzplatform-config)
19 Provides: libdali-toolkit-cxx11.so
20 Provides: libdali-toolkit-cxx11.so.0
21 Provides: libdali-toolkit-cxx11.so.0.0.0
23 #############################
25 #############################
28 Dali 3D engine Toolkit - a set of controls that provide
29 user interface functionality.
31 ##############################
33 ##############################
34 %package resources_360x360
35 Summary: default resource files for 360x360
36 Requires: %{name} = %{version}-%{release}
37 Conflicts: %{name}-resources_480x800
38 Conflicts: %{name}-resources_720x1280
39 Conflicts: %{name}-resources_1920x1080
40 %description resources_360x360
41 dali-toolkit default resource files for 360x360
42 Contain po / sounds / common images / style / style images
44 %package resources_480x800
45 Summary: default resource files for 480x800
46 Requires: %{name} = %{version}-%{release}
47 Conflicts: %{name}-resources_360x360
48 Conflicts: %{name}-resources_720x1280
49 Conflicts: %{name}-resources_1920x1080
50 %description resources_480x800
51 dali-toolkit default resource files for 480x800
52 Contain po / sounds / common images / style / style images
54 %package resources_720x1280
55 Summary: default resource files for 720x1280
56 Requires: %{name} = %{version}-%{release}
57 Conflicts: %{name}-resources_360x360
58 Conflicts: %{name}-resources_480x800
59 Conflicts: %{name}-resources_1920x1080
60 %description resources_720x1280
61 dali-toolkit default resource files for 720x1280
62 Contain po / sounds / common images / style / style images
64 %package resources_1920x1080
65 Summary: default resource files for 1920x1080
66 Requires: %{name} = %{version}-%{release}
67 Conflicts: %{name}-resources_360x360
68 Conflicts: %{name}-resources_480x800
69 Conflicts: %{name}-resources_720x1280
70 %description resources_1920x1080
71 dali-toolkit default resource files for 1920x1080
72 Contain po / sounds / common images / style / style images
74 ##############################
76 ##############################
78 Summary: Application development package for Dali 3D engine toolkit
79 Group: Development/Building
80 Requires: %{name} = %{version}-%{release}
83 Application development package for Dali 3D engine toolkit - headers and package config
85 ##############################
87 ##############################
91 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
92 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
94 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
95 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
96 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
97 %define dev_include_path %{_includedir}
101 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
104 language=${language%.po}
105 msgfmt -o ${language}.mo ${language}.po
109 ##############################
111 ##############################
114 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
115 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
117 %if 0%{?enable_coverage}
118 CXXFLAGS+=" --coverage "
119 LDFLAGS+=" --coverage "
123 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
125 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
126 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
129 %if 0%{?enable_debug}
130 -DCMAKE_BUILD_TYPE=Debug \
132 %if 0%{?enable_trace}
135 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
136 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
137 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
140 make %{?jobs:-j%jobs}
142 ##############################
144 ##############################
149 pushd %{_builddir}/%{name}-%{version}/build/tizen
154 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
157 language=${language%.mo}
158 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
159 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
164 # Create links to ensure linking with cxx11 library is preserved
165 pushd %{buildroot}%{_libdir}
166 ln -sf libdali-toolkit.so libdali-toolkit-cxx11.so
167 ln -sf libdali-toolkit.so libdali-toolkit-cxx11.so.0
168 ln -sf libdali-toolkit.so libdali-toolkit-cxx11.so.0.0.0
171 # Remove default style and style images which are for Linux build
172 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
174 # Make folder to contain style and style images
175 # After making folder, copy local style and style images to new folder
176 pushd %{_builddir}/%{name}-%{version}
177 mkdir -p %{buildroot}%{dali_toolkit_style_files}/360x360
178 cp -r dali-toolkit/styles/360x360/* %{buildroot}%{dali_toolkit_style_files}/360x360
179 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
180 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
181 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
182 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
183 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
184 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
186 # Copy default feedback theme
187 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
190 ##############################
192 ##############################
194 %pre resources_360x360
197 pushd %{dali_toolkit_style_files}
203 %pre resources_480x800
206 pushd %{dali_toolkit_style_files}
212 %pre resources_720x1280
215 pushd %{dali_toolkit_style_files}
221 %pre resources_1920x1080
224 pushd %{dali_toolkit_style_files}
230 ##############################
232 ##############################
237 %post resources_360x360
238 pushd %{dali_toolkit_style_files}/360x360
239 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
242 %post resources_480x800
243 pushd %{dali_toolkit_style_files}/480x800
244 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
247 %post resources_720x1280
248 pushd %{dali_toolkit_style_files}/720x1280
249 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
252 %post resources_1920x1080
253 pushd %{dali_toolkit_style_files}/1920x1080
254 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
257 ##############################
259 ##############################
261 %preun resources_360x360
264 %preun resources_360x360
265 pushd %{dali_toolkit_style_files}
267 mv dali-toolkit-default-theme.json ./360x360
272 %preun resources_480x800
275 %preun resources_480x800
276 pushd %{dali_toolkit_style_files}
278 mv dali-toolkit-default-theme.json ./480x800
283 %preun resources_720x1280
286 %preun resources_720x1280
287 pushd %{dali_toolkit_style_files}
289 mv dali-toolkit-default-theme.json ./720x1280
294 %preun resources_1920x1080
297 %preun resources_1920x1080
298 pushd %{dali_toolkit_style_files}
299 mv images ./1920x1080
300 mv dali-toolkit-default-theme.json ./1920x1080
305 ##############################
307 ##############################
312 %postun resources_360x360
315 pushd %{dali_toolkit_style_files}
321 %postun resources_480x800
324 pushd %{dali_toolkit_style_files}
330 %postun resources_720x1280
333 pushd %{dali_toolkit_style_files}
339 %postun resources_1920x1080
342 pushd %{dali_toolkit_style_files}
348 ##############################
349 # Files in Binary Packages
350 ##############################
352 %if 0%{?enable_dali_smack_rules}
353 %manifest dali-toolkit.manifest-smack
355 %manifest dali-toolkit.manifest
357 %defattr(-,root,root,-)
358 %{_libdir}/libdali-toolkit-cxx11.so*
359 %{_libdir}/libdali-toolkit.so*
363 %defattr(-,root,root,-)
364 %{dev_include_path}/dali-toolkit/*
365 %{_libdir}/pkgconfig/dali-toolkit.pc
367 %files resources_360x360
368 %manifest dali-toolkit-resources.manifest
369 %defattr(-,root,root,-)
370 %{dali_toolkit_image_files}/*
371 %{dali_toolkit_sound_files}/*
372 %{dali_toolkit_style_files}/360x360/*
373 %{dali_toolkit_style_files}/default-feedback-theme.json
374 %{_datadir}/locale/*/LC_MESSAGES/*
376 %files resources_480x800
377 %manifest dali-toolkit-resources.manifest
378 %defattr(-,root,root,-)
379 %{dali_toolkit_image_files}/*
380 %{dali_toolkit_sound_files}/*
381 %{dali_toolkit_style_files}/480x800/*
382 %{dali_toolkit_style_files}/default-feedback-theme.json
383 %{_datadir}/locale/*/LC_MESSAGES/*
385 %files resources_720x1280
386 %manifest dali-toolkit-resources.manifest
387 %defattr(-,root,root,-)
388 %{dali_toolkit_image_files}/*
389 %{dali_toolkit_sound_files}/*
390 %{dali_toolkit_style_files}/720x1280/*
391 %{dali_toolkit_style_files}/default-feedback-theme.json
392 %{_datadir}/locale/*/LC_MESSAGES/*
394 %files resources_1920x1080
395 %manifest dali-toolkit-resources.manifest
396 %defattr(-,root,root,-)
397 %{dali_toolkit_image_files}/*
398 %{dali_toolkit_sound_files}/*
399 %{dali_toolkit_style_files}/1920x1080/*
400 %{dali_toolkit_style_files}/default-feedback-theme.json
401 %{_datadir}/locale/*/LC_MESSAGES/*