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_480x800
55 Summary: default resource files for 480x800
56 Requires: %{name} = %{version}-%{release}
57 Conflicts: %{name}-resources_720x1280
58 Conflicts: %{name}-resources_1920x1080
59 %description resources_480x800
60 dali-toolkit default resource files for 480x800
61 Contain po / sounds / common images / style / style images
63 %package resources_720x1280
64 Summary: default resource files for 720x1280
65 Requires: %{name} = %{version}-%{release}
66 Conflicts: %{name}-resources_480x800
67 Conflicts: %{name}-resources_1920x1080
68 %description resources_720x1280
69 dali-toolkit default resource files for 720x1280
70 Contain po / sounds / common images / style / style images
72 %package resources_1920x1080
73 Summary: default resource files for 1920x1080
74 Requires: %{name} = %{version}-%{release}
75 Conflicts: %{name}-resources_480x800
76 Conflicts: %{name}-resources_720x1280
77 %description resources_1920x1080
78 dali-toolkit default resource files for 1920x1080
79 Contain po / sounds / common images / style / style images
81 %if !0%{?disable_cxx03_build}
83 Summary: Dali 3D engine Toolkit with cxx03
84 Provides: %{name}-cxx03 = %{version}-%{release}
87 Dali 3D engine Toolkit with cxx03
90 ##############################
92 ##############################
94 Summary: Application development package for Dali 3D engine toolkit
95 Group: Development/Building
96 Requires: %{name} = %{version}-%{release}
99 Application development package for Dali 3D engine toolkit - headers and package config
101 ##############################
103 ##############################
107 #Use TZ_PATH when tizen version is 3.x
109 %if "%{tizen_version_major}" == "2"
110 %define dali_data_rw_dir /opt/usr/share/dali/
111 %define dali_data_ro_dir /usr/share/dali/
113 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
114 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
117 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
118 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
119 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
120 %define dev_include_path %{_includedir}
124 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
127 language=${language%.po}
128 msgfmt -o ${language}.mo ${language}.po
132 ##############################
134 ##############################
137 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
138 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
140 %if 0%{?enable_coverage}
141 CXXFLAGS+=" --coverage "
142 LDFLAGS+=" --coverage "
146 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
148 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
149 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
151 %configure --enable-profile=TIZEN \
152 %if 0%{?enable_debug}
156 --enable-rename-so=no
158 make %{?jobs:-j%jobs}
160 pushd %{_builddir}/%{name}-%{version}/build/tizen
161 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
164 pushd %{buildroot}%{_libdir}
165 for FILE in libdali-toolkit-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
166 mv pkgconfig/dali-toolkit.pc %{_builddir}/%{name}-%{version}/build/tizen/dali-toolkit.pc
169 %if !0%{?disable_cxx03_build}
173 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
176 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
177 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
179 %configure --enable-profile=TIZEN \
180 --enable-cxx03-abi=yes \
181 %if 0%{?enable_debug}
185 --enable-rename-so=no
187 make %{?jobs:-j%jobs}
190 ##############################
192 ##############################
195 pushd %{_builddir}/%{name}-%{version}/build/tizen
196 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
198 for FILE in libdali-toolkit-cxx11.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
199 mv dali-toolkit.pc %{buildroot}%{_libdir}/pkgconfig/dali-toolkit.pc
203 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
206 language=${language%.mo}
207 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
208 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
213 #############################
215 #############################
216 pushd %{buildroot}%{_libdir}
217 rm -rf libdali-toolkit.so
218 rm -rf libdali-toolkit-cxx11.so
219 %if !0%{?disable_cxx03_build}
220 ln -s libdali-toolkit.so.0.0.* libdali-toolkit-cxx03.so
222 ln -s libdali-toolkit-cxx11.so.0.0.* libdali-toolkit.so
225 # Remove default style and style images which are for Linux build
226 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
228 # Make folder to contain style and style images
229 # After making folder, copy local style and style images to new folder
230 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
231 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
232 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
233 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
234 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
235 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
237 # Copy default feedback theme
238 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
240 ##############################
242 ##############################
244 %pre resources_480x800
247 pushd %{dali_toolkit_style_files}
253 %pre resources_720x1280
256 pushd %{dali_toolkit_style_files}
262 %pre resources_1920x1080
265 pushd %{dali_toolkit_style_files}
271 ##############################
273 ##############################
278 %post resources_480x800
279 pushd %{dali_toolkit_style_files}/480x800
280 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
283 %post resources_720x1280
284 pushd %{dali_toolkit_style_files}/720x1280
285 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
288 %post resources_1920x1080
289 pushd %{dali_toolkit_style_files}/1920x1080
290 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
293 ##############################
295 ##############################
297 %preun resources_480x800
300 %preun resources_480x800
301 pushd %{dali_toolkit_style_files}
303 mv dali-toolkit-default-theme.json ./480x800
308 %preun resources_720x1280
311 %preun resources_720x1280
312 pushd %{dali_toolkit_style_files}
314 mv dali-toolkit-default-theme.json ./720x1280
319 %preun resources_1920x1080
322 %preun resources_1920x1080
323 pushd %{dali_toolkit_style_files}
324 mv images ./1920x1080
325 mv dali-toolkit-default-theme.json ./1920x1080
330 ##############################
332 ##############################
337 %postun resources_480x800
340 pushd %{dali_toolkit_style_files}
346 %postun resources_720x1280
349 pushd %{dali_toolkit_style_files}
355 %postun resources_1920x1080
358 pushd %{dali_toolkit_style_files}
364 ##############################
365 # Files in Binary Packages
366 ##############################
368 %if 0%{?enable_dali_smack_rules}
369 %manifest dali-toolkit.manifest-smack
371 %manifest dali-toolkit.manifest
373 %defattr(-,root,root,-)
374 %{_libdir}/libdali-toolkit-cxx11.so.*
375 %{_libdir}/libdali-toolkit.so
378 %if !0%{?disable_cxx03_build}
380 %if 0%{?enable_dali_smack_rules}
381 %manifest dali-toolkit.manifest-smack
383 %manifest dali-toolkit.manifest
385 %defattr(-,root,root,-)
386 %{_libdir}/libdali-toolkit.so.*
387 %{_libdir}/libdali-toolkit-cxx03.so
392 %defattr(-,root,root,-)
393 %{dev_include_path}/dali-toolkit/*
394 %{_libdir}/pkgconfig/dali-toolkit.pc
396 %files resources_480x800
397 %manifest dali-toolkit-resources.manifest
398 %defattr(-,root,root,-)
399 %{dali_toolkit_image_files}/*
400 %{dali_toolkit_sound_files}/*
401 %{dali_toolkit_style_files}/480x800/*
402 %{dali_toolkit_style_files}/default-feedback-theme.json
403 %{_datadir}/locale/*/LC_MESSAGES/*
405 %files resources_720x1280
406 %manifest dali-toolkit-resources.manifest
407 %defattr(-,root,root,-)
408 %{dali_toolkit_image_files}/*
409 %{dali_toolkit_sound_files}/*
410 %{dali_toolkit_style_files}/720x1280/*
411 %{dali_toolkit_style_files}/default-feedback-theme.json
412 %{_datadir}/locale/*/LC_MESSAGES/*
414 %files resources_1920x1080
415 %manifest dali-toolkit-resources.manifest
416 %defattr(-,root,root,-)
417 %{dali_toolkit_image_files}/*
418 %{dali_toolkit_sound_files}/*
419 %{dali_toolkit_style_files}/1920x1080/*
420 %{dali_toolkit_style_files}/default-feedback-theme.json
421 %{_datadir}/locale/*/LC_MESSAGES/*