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 ##############################
182 %post resources_480x800
183 pushd %{dali_toolkit_style_files}/480x800
184 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
187 %post resources_720x1280
188 pushd %{dali_toolkit_style_files}/720x1280
189 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
193 %post resources_1920x1080
194 pushd %{dali_toolkit_style_files}/1920x1080
195 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
198 ##############################
200 ##############################
202 %preun resources_480x800
203 pushd %{dali_toolkit_style_files}
208 %preun resources_720x1280
209 pushd %{dali_toolkit_style_files}
214 %preun resources_1920x1080
215 pushd %{dali_toolkit_style_files}
216 mv images ./1920x1080
217 mv *.json ./1920x1080
220 ##############################
222 ##############################
227 %postun resources_480x800
228 pushd %{dali_toolkit_style_files}
232 %postun resources_720x1280
233 pushd %{dali_toolkit_style_files}
237 %postun resources_1920x1080
238 pushd %{dali_toolkit_style_files}
242 ##############################
243 # Files in Binary Packages
244 ##############################
246 %if 0%{?enable_dali_smack_rules}
247 %manifest dali-toolkit.manifest-smack
249 %manifest dali-toolkit.manifest
251 %defattr(-,root,root,-)
252 %{_libdir}/lib%{name}.so*
256 %defattr(-,root,root,-)
257 %{dev_include_path}/%{name}/*
258 %{_libdir}/pkgconfig/*.pc
260 %files resources_480x800
261 %manifest dali-toolkit-resources.manifest
262 %defattr(-,root,root,-)
263 %{dali_toolkit_image_files}/*
264 %{dali_toolkit_sound_files}/*
265 %{dali_toolkit_style_files}/480x800/*
266 %{dali_toolkit_style_files}/default-feedback-theme.json
267 %{_datadir}/locale/*/LC_MESSAGES/*
269 %files resources_720x1280
270 %manifest dali-toolkit-resources.manifest
271 %defattr(-,root,root,-)
272 %{dali_toolkit_image_files}/*
273 %{dali_toolkit_sound_files}/*
274 %{dali_toolkit_style_files}/720x1280/*
275 %{dali_toolkit_style_files}/default-feedback-theme.json
276 %{_datadir}/locale/*/LC_MESSAGES/*
278 %files resources_1920x1080
279 %manifest dali-toolkit-resources.manifest
280 %defattr(-,root,root,-)
281 %{dali_toolkit_image_files}/*
282 %{dali_toolkit_sound_files}/*
283 %{dali_toolkit_style_files}/1920x1080/*
284 %{dali_toolkit_style_files}/default-feedback-theme.json
285 %{_datadir}/locale/*/LC_MESSAGES/*