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 %if !0%{?disable_cxx03_build}
21 BuildRequires: pkgconfig(dali-core-cxx03)
23 BuildRequires: gettext
25 # dali-toolkit only need to know the interfaces(APIs) of dali-adaptor(the devel package).
26 # It doesn't need to know which adaptor will be used by applications.
27 # Applications or dali-addon will decide which one they will use.
28 BuildRequires: dali-adaptor-devel
29 %if !0%{?disable_cxx03_build}
30 BuildRequires: dali-adaptor-devel-cxx03
33 #need libtzplatform-config for directory if tizen version is 3.x
35 %if 0%{?tizen_version_major} >= 3
36 BuildRequires: pkgconfig(libtzplatform-config)
39 #############################
41 #############################
43 %if "%{tizen_version_major}" == "2" && 0%{?tizen_profile_name:1}
44 %define profile %{tizen_profile_name}
48 Dali 3D engine Toolkit - a set of controls that provide
49 user interface functionality.
51 ##############################
53 ##############################
54 %package resources_360x360
55 Summary: default resource files for 360x360
56 Requires: %{name} = %{version}-%{release}
57 Conflicts: %{name}-resources_480x800
58 Conflicts: %{name}-resources_720x1280
59 Conflicts: %{name}-resources_1920x1080
60 %description resources_360x360
61 dali-toolkit default resource files for 360x360
62 Contain po / sounds / common images / style / style images
64 %package resources_480x800
65 Summary: default resource files for 480x800
66 Requires: %{name} = %{version}-%{release}
67 Conflicts: %{name}-resources_360x360
68 Conflicts: %{name}-resources_720x1280
69 Conflicts: %{name}-resources_1920x1080
70 %description resources_480x800
71 dali-toolkit default resource files for 480x800
72 Contain po / sounds / common images / style / style images
74 %package resources_720x1280
75 Summary: default resource files for 720x1280
76 Requires: %{name} = %{version}-%{release}
77 Conflicts: %{name}-resources_360x360
78 Conflicts: %{name}-resources_480x800
79 Conflicts: %{name}-resources_1920x1080
80 %description resources_720x1280
81 dali-toolkit default resource files for 720x1280
82 Contain po / sounds / common images / style / style images
84 %package resources_1920x1080
85 Summary: default resource files for 1920x1080
86 Requires: %{name} = %{version}-%{release}
87 Conflicts: %{name}-resources_360x360
88 Conflicts: %{name}-resources_480x800
89 Conflicts: %{name}-resources_720x1280
90 %description resources_1920x1080
91 dali-toolkit default resource files for 1920x1080
92 Contain po / sounds / common images / style / style images
94 %if !0%{?disable_cxx03_build}
96 Summary: Dali 3D engine Toolkit with cxx03
97 Provides: %{name}-cxx03 = %{version}-%{release}
100 Dali 3D engine Toolkit with cxx03
103 ##############################
105 ##############################
107 Summary: Application development package for Dali 3D engine toolkit
108 Group: Development/Building
109 Requires: %{name} = %{version}-%{release}
112 Application development package for Dali 3D engine toolkit - headers and package config
114 ##############################
116 ##############################
120 #Use TZ_PATH when tizen version is 3.x
122 %if "%{tizen_version_major}" == "2"
123 %define dali_data_rw_dir /opt/usr/share/dali/
124 %define dali_data_ro_dir /usr/share/dali/
126 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
127 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
130 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
131 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
132 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
133 %define dev_include_path %{_includedir}
137 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
140 language=${language%.po}
141 msgfmt -o ${language}.mo ${language}.po
145 ##############################
147 ##############################
150 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
151 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
153 %if 0%{?enable_coverage}
154 CXXFLAGS+=" --coverage "
155 LDFLAGS+=" --coverage "
159 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
161 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
162 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
164 %configure --enable-profile=TIZEN \
165 %if 0%{?enable_debug}
169 --enable-rename-so=no
171 make %{?jobs:-j%jobs}
173 pushd %{_builddir}/%{name}-%{version}/build/tizen
174 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
177 pushd %{buildroot}%{_libdir}
178 for FILE in libdali-toolkit-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
179 mv pkgconfig/dali-toolkit.pc %{_builddir}/%{name}-%{version}/build/tizen/dali-toolkit.pc
182 %if !0%{?disable_cxx03_build}
186 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
189 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
190 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
192 %configure --enable-profile=TIZEN \
193 --enable-cxx03-abi=yes \
194 %if 0%{?enable_debug}
198 --enable-rename-so=no
200 make %{?jobs:-j%jobs}
203 ##############################
205 ##############################
208 pushd %{_builddir}/%{name}-%{version}/build/tizen
209 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
211 for FILE in libdali-toolkit-cxx11.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
212 mv dali-toolkit.pc %{buildroot}%{_libdir}/pkgconfig/dali-toolkit.pc
216 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
219 language=${language%.mo}
220 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
221 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
226 #############################
228 #############################
229 pushd %{buildroot}%{_libdir}
230 rm -rf libdali-toolkit.so
231 rm -rf libdali-toolkit-cxx11.so
232 %if !0%{?disable_cxx03_build}
233 ln -s libdali-toolkit.so.0.0.* libdali-toolkit-cxx03.so
235 ln -s libdali-toolkit-cxx11.so.0.0.* libdali-toolkit.so
238 # Remove default style and style images which are for Linux build
239 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
241 # Make folder to contain style and style images
242 # After making folder, copy local style and style images to new folder
243 mkdir -p %{buildroot}%{dali_toolkit_style_files}/360x360
244 cp -r dali-toolkit/styles/360x360/* %{buildroot}%{dali_toolkit_style_files}/360x360
245 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
246 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
247 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
248 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
249 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
250 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
252 # Copy default feedback theme
253 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
255 ##############################
257 ##############################
259 %pre resources_360x360
262 pushd %{dali_toolkit_style_files}
268 %pre resources_480x800
271 pushd %{dali_toolkit_style_files}
277 %pre resources_720x1280
280 pushd %{dali_toolkit_style_files}
286 %pre resources_1920x1080
289 pushd %{dali_toolkit_style_files}
295 ##############################
297 ##############################
302 %post resources_360x360
303 pushd %{dali_toolkit_style_files}/360x360
304 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
307 %post resources_480x800
308 pushd %{dali_toolkit_style_files}/480x800
309 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
312 %post resources_720x1280
313 pushd %{dali_toolkit_style_files}/720x1280
314 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
317 %post resources_1920x1080
318 pushd %{dali_toolkit_style_files}/1920x1080
319 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
322 ##############################
324 ##############################
326 %preun resources_360x360
329 %preun resources_360x360
330 pushd %{dali_toolkit_style_files}
332 mv dali-toolkit-default-theme.json ./360x360
337 %preun resources_480x800
340 %preun resources_480x800
341 pushd %{dali_toolkit_style_files}
343 mv dali-toolkit-default-theme.json ./480x800
348 %preun resources_720x1280
351 %preun resources_720x1280
352 pushd %{dali_toolkit_style_files}
354 mv dali-toolkit-default-theme.json ./720x1280
359 %preun resources_1920x1080
362 %preun resources_1920x1080
363 pushd %{dali_toolkit_style_files}
364 mv images ./1920x1080
365 mv dali-toolkit-default-theme.json ./1920x1080
370 ##############################
372 ##############################
377 %postun resources_360x360
380 pushd %{dali_toolkit_style_files}
386 %postun resources_480x800
389 pushd %{dali_toolkit_style_files}
395 %postun resources_720x1280
398 pushd %{dali_toolkit_style_files}
404 %postun resources_1920x1080
407 pushd %{dali_toolkit_style_files}
413 ##############################
414 # Files in Binary Packages
415 ##############################
417 %if 0%{?enable_dali_smack_rules}
418 %manifest dali-toolkit.manifest-smack
420 %manifest dali-toolkit.manifest
422 %defattr(-,root,root,-)
423 %{_libdir}/libdali-toolkit-cxx11.so.*
424 %{_libdir}/libdali-toolkit.so
427 %if !0%{?disable_cxx03_build}
429 %if 0%{?enable_dali_smack_rules}
430 %manifest dali-toolkit.manifest-smack
432 %manifest dali-toolkit.manifest
434 %defattr(-,root,root,-)
435 %{_libdir}/libdali-toolkit.so.*
436 %{_libdir}/libdali-toolkit-cxx03.so
441 %defattr(-,root,root,-)
442 %{dev_include_path}/dali-toolkit/*
443 %{_libdir}/pkgconfig/dali-toolkit.pc
445 %files resources_360x360
446 %manifest dali-toolkit-resources.manifest
447 %defattr(-,root,root,-)
448 %{dali_toolkit_image_files}/*
449 %{dali_toolkit_sound_files}/*
450 %{dali_toolkit_style_files}/360x360/*
451 %{dali_toolkit_style_files}/default-feedback-theme.json
452 %{_datadir}/locale/*/LC_MESSAGES/*
454 %files resources_480x800
455 %manifest dali-toolkit-resources.manifest
456 %defattr(-,root,root,-)
457 %{dali_toolkit_image_files}/*
458 %{dali_toolkit_sound_files}/*
459 %{dali_toolkit_style_files}/480x800/*
460 %{dali_toolkit_style_files}/default-feedback-theme.json
461 %{_datadir}/locale/*/LC_MESSAGES/*
463 %files resources_720x1280
464 %manifest dali-toolkit-resources.manifest
465 %defattr(-,root,root,-)
466 %{dali_toolkit_image_files}/*
467 %{dali_toolkit_sound_files}/*
468 %{dali_toolkit_style_files}/720x1280/*
469 %{dali_toolkit_style_files}/default-feedback-theme.json
470 %{_datadir}/locale/*/LC_MESSAGES/*
472 %files resources_1920x1080
473 %manifest dali-toolkit-resources.manifest
474 %defattr(-,root,root,-)
475 %{dali_toolkit_image_files}/*
476 %{dali_toolkit_sound_files}/*
477 %{dali_toolkit_style_files}/1920x1080/*
478 %{dali_toolkit_style_files}/default-feedback-theme.json
479 %{_datadir}/locale/*/LC_MESSAGES/*