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 %if 0%{?tizen_version_major} < 4
14 %define disable_cxx03_build 1
17 BuildRequires: pkgconfig
18 BuildRequires: pkgconfig(dlog)
19 BuildRequires: pkgconfig(dali-core)
20 BuildRequires: pkgconfig(dali-adaptor)
21 %if !0%{?disable_cxx03_build}
22 BuildRequires: pkgconfig(dali-core-cxx03)
23 BuildRequires: pkgconfig(dali-adaptor-cxx03)
25 BuildRequires: gettext
28 #need libtzplatform-config for directory if tizen version is 3.x
30 %if 0%{?tizen_version_major} >= 3
31 BuildRequires: pkgconfig(libtzplatform-config)
34 #############################
36 #############################
38 %if "%{tizen_version_major}" == "2" && 0%{?tizen_profile_name:1}
39 %define profile %{tizen_profile_name}
43 Dali 3D engine Toolkit - a set of controls that provide
44 user interface functionality.
46 ##############################
48 ##############################
49 %package resources_360x360
50 Summary: default resource files for 360x360
51 Requires: %{name} = %{version}-%{release}
52 Conflicts: %{name}-resources_480x800
53 Conflicts: %{name}-resources_720x1280
54 Conflicts: %{name}-resources_1920x1080
55 %description resources_360x360
56 dali-toolkit default resource files for 360x360
57 Contain po / sounds / common images / style / style images
59 %package resources_480x800
60 Summary: default resource files for 480x800
61 Requires: %{name} = %{version}-%{release}
62 Conflicts: %{name}-resources_360x360
63 Conflicts: %{name}-resources_720x1280
64 Conflicts: %{name}-resources_1920x1080
65 %description resources_480x800
66 dali-toolkit default resource files for 480x800
67 Contain po / sounds / common images / style / style images
69 %package resources_720x1280
70 Summary: default resource files for 720x1280
71 Requires: %{name} = %{version}-%{release}
72 Conflicts: %{name}-resources_360x360
73 Conflicts: %{name}-resources_480x800
74 Conflicts: %{name}-resources_1920x1080
75 %description resources_720x1280
76 dali-toolkit default resource files for 720x1280
77 Contain po / sounds / common images / style / style images
79 %package resources_1920x1080
80 Summary: default resource files for 1920x1080
81 Requires: %{name} = %{version}-%{release}
82 Conflicts: %{name}-resources_360x360
83 Conflicts: %{name}-resources_480x800
84 Conflicts: %{name}-resources_720x1280
85 %description resources_1920x1080
86 dali-toolkit default resource files for 1920x1080
87 Contain po / sounds / common images / style / style images
89 %if !0%{?disable_cxx03_build}
91 Summary: Dali 3D engine Toolkit with cxx03
92 Provides: %{name}-cxx03 = %{version}-%{release}
95 Dali 3D engine Toolkit with cxx03
98 ##############################
100 ##############################
102 Summary: Application development package for Dali 3D engine toolkit
103 Group: Development/Building
104 Requires: %{name} = %{version}-%{release}
107 Application development package for Dali 3D engine toolkit - headers and package config
109 ##############################
111 ##############################
115 #Use TZ_PATH when tizen version is 3.x
117 %if "%{tizen_version_major}" == "2"
118 %define dali_data_rw_dir /opt/usr/share/dali/
119 %define dali_data_ro_dir /usr/share/dali/
121 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
122 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
125 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
126 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
127 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
128 %define dev_include_path %{_includedir}
132 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
135 language=${language%.po}
136 msgfmt -o ${language}.mo ${language}.po
140 ##############################
142 ##############################
145 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
146 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
148 %if 0%{?enable_coverage}
149 CXXFLAGS+=" --coverage "
150 LDFLAGS+=" --coverage "
154 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
156 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
157 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
159 %configure --enable-profile=TIZEN \
160 %if 0%{?enable_debug}
163 %if 0%{?enable_trace}
167 --enable-rename-so=no
169 make %{?jobs:-j%jobs}
171 pushd %{_builddir}/%{name}-%{version}/build/tizen
172 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
175 pushd %{buildroot}%{_libdir}
176 for FILE in libdali-toolkit-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
177 mv pkgconfig/dali-toolkit.pc %{_builddir}/%{name}-%{version}/build/tizen/dali-toolkit.pc
180 %if !0%{?disable_cxx03_build}
184 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
187 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
188 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
190 %configure --enable-profile=TIZEN \
191 --enable-cxx03-abi=yes \
192 %if 0%{?enable_debug}
195 %if 0%{?enable_trace}
199 --enable-rename-so=no
201 make %{?jobs:-j%jobs}
204 ##############################
206 ##############################
209 pushd %{_builddir}/%{name}-%{version}/build/tizen
210 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
212 for FILE in libdali-toolkit-cxx11.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
213 mv dali-toolkit.pc %{buildroot}%{_libdir}/pkgconfig/dali-toolkit.pc
217 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
220 language=${language%.mo}
221 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
222 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
227 #############################
229 #############################
230 pushd %{buildroot}%{_libdir}
231 rm -rf libdali-toolkit.so
232 rm -rf libdali-toolkit-cxx11.so
233 %if !0%{?disable_cxx03_build}
234 ln -s libdali-toolkit.so.0.0.* libdali-toolkit-cxx03.so
236 ln -s libdali-toolkit-cxx11.so.0.0.* libdali-toolkit.so
239 # Remove default style and style images which are for Linux build
240 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
242 # Make folder to contain style and style images
243 # After making folder, copy local style and style images to new folder
244 mkdir -p %{buildroot}%{dali_toolkit_style_files}/360x360
245 cp -r dali-toolkit/styles/360x360/* %{buildroot}%{dali_toolkit_style_files}/360x360
246 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
247 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
248 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
249 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
250 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
251 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
253 # Copy default feedback theme
254 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
256 ##############################
258 ##############################
260 %pre resources_360x360
263 pushd %{dali_toolkit_style_files}
269 %pre resources_480x800
272 pushd %{dali_toolkit_style_files}
278 %pre resources_720x1280
281 pushd %{dali_toolkit_style_files}
287 %pre resources_1920x1080
290 pushd %{dali_toolkit_style_files}
296 ##############################
298 ##############################
303 %post resources_360x360
304 pushd %{dali_toolkit_style_files}/360x360
305 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
308 %post resources_480x800
309 pushd %{dali_toolkit_style_files}/480x800
310 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
313 %post resources_720x1280
314 pushd %{dali_toolkit_style_files}/720x1280
315 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
318 %post resources_1920x1080
319 pushd %{dali_toolkit_style_files}/1920x1080
320 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
323 ##############################
325 ##############################
327 %preun resources_360x360
330 %preun resources_360x360
331 pushd %{dali_toolkit_style_files}
333 mv dali-toolkit-default-theme.json ./360x360
338 %preun resources_480x800
341 %preun resources_480x800
342 pushd %{dali_toolkit_style_files}
344 mv dali-toolkit-default-theme.json ./480x800
349 %preun resources_720x1280
352 %preun resources_720x1280
353 pushd %{dali_toolkit_style_files}
355 mv dali-toolkit-default-theme.json ./720x1280
360 %preun resources_1920x1080
363 %preun resources_1920x1080
364 pushd %{dali_toolkit_style_files}
365 mv images ./1920x1080
366 mv dali-toolkit-default-theme.json ./1920x1080
371 ##############################
373 ##############################
378 %postun resources_360x360
381 pushd %{dali_toolkit_style_files}
387 %postun resources_480x800
390 pushd %{dali_toolkit_style_files}
396 %postun resources_720x1280
399 pushd %{dali_toolkit_style_files}
405 %postun resources_1920x1080
408 pushd %{dali_toolkit_style_files}
414 ##############################
415 # Files in Binary Packages
416 ##############################
418 %if 0%{?enable_dali_smack_rules}
419 %manifest dali-toolkit.manifest-smack
421 %manifest dali-toolkit.manifest
423 %defattr(-,root,root,-)
424 %{_libdir}/libdali-toolkit-cxx11.so.*
425 %{_libdir}/libdali-toolkit.so
428 %if !0%{?disable_cxx03_build}
430 %if 0%{?enable_dali_smack_rules}
431 %manifest dali-toolkit.manifest-smack
433 %manifest dali-toolkit.manifest
435 %defattr(-,root,root,-)
436 %{_libdir}/libdali-toolkit.so.*
437 %{_libdir}/libdali-toolkit-cxx03.so
442 %defattr(-,root,root,-)
443 %{dev_include_path}/dali-toolkit/*
444 %{_libdir}/pkgconfig/dali-toolkit.pc
446 %files resources_360x360
447 %manifest dali-toolkit-resources.manifest
448 %defattr(-,root,root,-)
449 %{dali_toolkit_image_files}/*
450 %{dali_toolkit_sound_files}/*
451 %{dali_toolkit_style_files}/360x360/*
452 %{dali_toolkit_style_files}/default-feedback-theme.json
453 %{_datadir}/locale/*/LC_MESSAGES/*
455 %files resources_480x800
456 %manifest dali-toolkit-resources.manifest
457 %defattr(-,root,root,-)
458 %{dali_toolkit_image_files}/*
459 %{dali_toolkit_sound_files}/*
460 %{dali_toolkit_style_files}/480x800/*
461 %{dali_toolkit_style_files}/default-feedback-theme.json
462 %{_datadir}/locale/*/LC_MESSAGES/*
464 %files resources_720x1280
465 %manifest dali-toolkit-resources.manifest
466 %defattr(-,root,root,-)
467 %{dali_toolkit_image_files}/*
468 %{dali_toolkit_sound_files}/*
469 %{dali_toolkit_style_files}/720x1280/*
470 %{dali_toolkit_style_files}/default-feedback-theme.json
471 %{_datadir}/locale/*/LC_MESSAGES/*
473 %files resources_1920x1080
474 %manifest dali-toolkit-resources.manifest
475 %defattr(-,root,root,-)
476 %{dali_toolkit_image_files}/*
477 %{dali_toolkit_sound_files}/*
478 %{dali_toolkit_style_files}/1920x1080/*
479 %{dali_toolkit_style_files}/default-feedback-theme.json
480 %{_datadir}/locale/*/LC_MESSAGES/*