2 Summary: The OpenGLES Canvas Core Library 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: gettext
18 # dali-toolkit only need to know the interfaces(APIs) of dali-adaptor(the devel package).
19 # It doesn't need to know which adaptor will be used by applications.
20 # Applications or dali-addon will decide which one they will use.
21 BuildRequires: dali-adaptor-devel
23 #need libtzplatform-config for directory if tizen version is 3.x
25 %if 0%{?tizen_version_major} >= 3
26 BuildRequires: pkgconfig(libtzplatform-config)
29 #############################
31 #############################
33 %if "%{tizen_version_major}" == "2" && 0%{?tizen_profile_name:1}
34 %define profile %{tizen_profile_name}
38 The OpenGLES Canvas Core Library Toolkit - a set of controls that provide
39 user interface functionality.
41 ##############################
43 ##############################
44 %package resources_480x800
45 Summary: default resource files for 480x800
46 Requires: %{name} = %{version}-%{release}
47 Conflicts: %{name}-resources_720x1280
48 Conflicts: %{name}-resources_1920x1080
49 %description resources_480x800
50 dali-toolkit default resource files for 480x800
51 Contain po / sounds / common images / style / style images
53 %package resources_720x1280
54 Summary: default resource files for 720x1280
55 Requires: %{name} = %{version}-%{release}
56 Conflicts: %{name}-resources_480x800
57 Conflicts: %{name}-resources_1920x1080
58 %description resources_720x1280
59 dali-toolkit default resource files for 720x1280
60 Contain po / sounds / common images / style / style images
62 %package resources_1920x1080
63 Summary: default resource files for 1920x1080
64 Requires: %{name} = %{version}-%{release}
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 the OpenGLES Canvas toolkit
76 Group: Development/Building
77 Requires: %{name} = %{version}-%{release}
80 Application development package for the OpenGLES Canvas toolkit - headers and package config
82 ##############################
84 ##############################
88 #Use TZ_PATH when tizen version is 3.x
90 %if "%{tizen_version_major}" == "2"
91 %define dali_data_rw_dir /opt/usr/share/dali/
92 %define dali_data_ro_dir /usr/share/dali/
94 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
95 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
98 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
99 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
100 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
101 %define dev_include_path %{_includedir}
105 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
108 language=${language%.po}
109 msgfmt -o ${language}.mo ${language}.po
113 ##############################
115 ##############################
118 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
119 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
121 %if 0%{?enable_coverage}
122 CXXFLAGS+=" --coverage "
123 LDFLAGS+=" --coverage "
127 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
129 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
130 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
132 %configure --enable-profile=TIZEN \
133 %if 0%{?enable_debug}
138 make %{?jobs:-j%jobs}
140 ##############################
142 ##############################
146 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
150 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
153 language=${language%.mo}
154 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
155 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
160 # Remove default style and style images which are for Linux build
161 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
163 # Make folder to contain style and style images
164 # After making folder, copy local style and style images to new folder
165 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
166 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
167 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
168 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
169 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
170 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
172 # Copy default feedback theme
173 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
175 ##############################
177 ##############################
179 %pre resources_480x800
182 pushd %{dali_toolkit_style_files}
188 %pre resources_720x1280
191 pushd %{dali_toolkit_style_files}
197 %pre resources_1920x1080
200 pushd %{dali_toolkit_style_files}
206 ##############################
208 ##############################
213 %post resources_480x800
214 pushd %{dali_toolkit_style_files}/480x800
215 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
218 %post resources_720x1280
219 pushd %{dali_toolkit_style_files}/720x1280
220 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
223 %post resources_1920x1080
224 pushd %{dali_toolkit_style_files}/1920x1080
225 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
228 ##############################
230 ##############################
232 %preun resources_480x800
233 pushd %{dali_toolkit_style_files}
238 %preun resources_720x1280
239 pushd %{dali_toolkit_style_files}
244 %preun resources_1920x1080
245 pushd %{dali_toolkit_style_files}
246 mv images ./1920x1080
247 mv *.json ./1920x1080
250 ##############################
252 ##############################
257 %postun resources_480x800
258 pushd %{dali_toolkit_style_files}
262 %postun resources_720x1280
263 pushd %{dali_toolkit_style_files}
267 %postun resources_1920x1080
268 pushd %{dali_toolkit_style_files}
272 ##############################
273 # Files in Binary Packages
274 ##############################
276 %if 0%{?enable_dali_smack_rules}
277 %manifest dali-toolkit.manifest-smack
279 %manifest dali-toolkit.manifest
281 %defattr(-,root,root,-)
282 %{_libdir}/lib%{name}.so*
286 %defattr(-,root,root,-)
287 %{dev_include_path}/%{name}/*
288 %{_libdir}/pkgconfig/*.pc
290 %files resources_480x800
291 %manifest dali-toolkit-resources.manifest
292 %defattr(-,root,root,-)
293 %{dali_toolkit_image_files}/*
294 %{dali_toolkit_sound_files}/*
295 %{dali_toolkit_style_files}/480x800/*
296 %{dali_toolkit_style_files}/default-feedback-theme.json
297 %{_datadir}/locale/*/LC_MESSAGES/*
299 %files resources_720x1280
300 %manifest dali-toolkit-resources.manifest
301 %defattr(-,root,root,-)
302 %{dali_toolkit_image_files}/*
303 %{dali_toolkit_sound_files}/*
304 %{dali_toolkit_style_files}/720x1280/*
305 %{dali_toolkit_style_files}/default-feedback-theme.json
306 %{_datadir}/locale/*/LC_MESSAGES/*
308 %files resources_1920x1080
309 %manifest dali-toolkit-resources.manifest
310 %defattr(-,root,root,-)
311 %{dali_toolkit_image_files}/*
312 %{dali_toolkit_sound_files}/*
313 %{dali_toolkit_style_files}/1920x1080/*
314 %{dali_toolkit_style_files}/default-feedback-theme.json
315 %{_datadir}/locale/*/LC_MESSAGES/*