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}
37 %if "%{profile}" == "mobile"
38 %define dali_toolkit_profile MOBILE
39 %define dali_style_folder 720x1280
40 # dali_style to be provided by build system as with dali_toolkit_profile or by passing --define 'dali_style 470x800' to the rpm build command
43 %if "%{profile}" == "tv"
44 %define dali_toolkit_profile TV
45 %define dali_style_folder 1920x1080
49 %define dali_style_folder %{dali_style}
53 The OpenGLES Canvas Core Library Toolkit - a set of controls that provide
54 user interface functionality.
56 ##############################
58 ##############################
59 %package resources_480x800
60 Summary: default resource files for 480x800
61 Requires: %{name} = %{version}-%{release}
62 Conflicts: %{name}-resources_720x1280
63 Conflicts: %{name}-resources_1920x1080
64 %description resources_480x800
65 dali-toolkit default resource files for 480x800
66 Contain po / sounds / common images / style / style images
68 %package resources_720x1280
69 Summary: default resource files for 720x1280
70 Requires: %{name} = %{version}-%{release}
71 Conflicts: %{name}-resources_480x800
72 Conflicts: %{name}-resources_1920x1080
73 %description resources_720x1280
74 dali-toolkit default resource files for 720x1280
75 Contain po / sounds / common images / style / style images
77 %package resources_1920x1080
78 Summary: default resource files for 1920x1080
79 Requires: %{name} = %{version}-%{release}
80 Conflicts: %{name}-resources_480x800
81 Conflicts: %{name}-resources_720x1280
82 %description resources_1920x1080
83 dali-toolkit default resource files for 1920x1080
84 Contain po / sounds / common images / style / style images
86 ##############################
88 ##############################
90 Summary: Application development package for the OpenGLES Canvas toolkit
91 Group: Development/Building
92 Requires: %{name} = %{version}-%{release}
95 Application development package for the OpenGLES Canvas toolkit - headers and package config
97 ##############################
99 ##############################
103 #Use TZ_PATH when tizen version is 3.x
105 %if "%{tizen_version_major}" == "2"
106 %define dali_data_rw_dir /opt/usr/share/dali/
107 %define dali_data_ro_dir /usr/share/dali/
109 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
110 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
113 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
114 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
115 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
116 %define dev_include_path %{_includedir}
120 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
123 language=${language%.po}
124 msgfmt -o ${language}.mo ${language}.po
128 ##############################
130 ##############################
133 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
134 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
136 %if 0%{?enable_coverage}
137 CXXFLAGS+=" --coverage "
138 LDFLAGS+=" --coverage "
142 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
144 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
145 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
147 %configure --enable-profile=%{dali_toolkit_profile} \
148 --with-style=%{dali_style_folder} \
149 %if 0%{?enable_debug}
154 make %{?jobs:-j%jobs}
156 ##############################
158 ##############################
162 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
166 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
169 language=${language%.mo}
170 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
171 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
176 # Remove default style and style images which are for Linux build
177 rm -rf %{buildroot}%{dali_toolkit_style_files}/*
179 # Make folder to contain style and style images
180 # After making folder, copy local style and style images to new folder
181 mkdir -p %{buildroot}%{dali_toolkit_style_files}/480x800
182 cp -r dali-toolkit/styles/480x800/* %{buildroot}%{dali_toolkit_style_files}/480x800
183 mkdir -p %{buildroot}%{dali_toolkit_style_files}/720x1280
184 cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720x1280
185 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
186 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
188 # Copy default feedback theme
189 cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files}
191 ##############################
193 ##############################
198 %post resources_480x800
199 pushd %{dali_toolkit_style_files}/480x800
200 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
203 %post resources_720x1280
204 pushd %{dali_toolkit_style_files}/720x1280
205 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
209 %post resources_1920x1080
210 pushd %{dali_toolkit_style_files}/1920x1080
211 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
214 ##############################
216 ##############################
218 %preun resources_480x800
219 pushd %{dali_toolkit_style_files}
224 %preun resources_720x1280
225 pushd %{dali_toolkit_style_files}
230 %preun resources_1920x1080
231 pushd %{dali_toolkit_style_files}
232 mv images ./1920x1080
233 mv *.json ./1920x1080
236 ##############################
238 ##############################
243 %postun resources_480x800
244 pushd %{dali_toolkit_style_files}
248 %postun resources_720x1280
249 pushd %{dali_toolkit_style_files}
253 %postun resources_1920x1080
254 pushd %{dali_toolkit_style_files}
258 ##############################
259 # Files in Binary Packages
260 ##############################
262 %if 0%{?enable_dali_smack_rules}
263 %manifest dali-toolkit.manifest-smack
265 %manifest dali-toolkit.manifest
267 %defattr(-,root,root,-)
268 %{_libdir}/lib%{name}.so*
272 %defattr(-,root,root,-)
273 %{dev_include_path}/%{name}/*
274 %{_libdir}/pkgconfig/*.pc
276 %files resources_480x800
277 %manifest dali-toolkit-resources.manifest
278 %defattr(-,root,root,-)
279 %{dali_toolkit_image_files}/*
280 %{dali_toolkit_sound_files}/*
281 %{dali_toolkit_style_files}/480x800/*
282 %{dali_toolkit_style_files}/default-feedback-theme.json
283 %{_datadir}/locale/*/LC_MESSAGES/*
285 %files resources_720x1280
286 %manifest dali-toolkit-resources.manifest
287 %defattr(-,root,root,-)
288 %{dali_toolkit_image_files}/*
289 %{dali_toolkit_sound_files}/*
290 %{dali_toolkit_style_files}/720x1280/*
291 %{dali_toolkit_style_files}/default-feedback-theme.json
292 %{_datadir}/locale/*/LC_MESSAGES/*
294 %files resources_1920x1080
295 %manifest dali-toolkit-resources.manifest
296 %defattr(-,root,root,-)
297 %{dali_toolkit_image_files}/*
298 %{dali_toolkit_sound_files}/*
299 %{dali_toolkit_style_files}/1920x1080/*
300 %{dali_toolkit_style_files}/default-feedback-theme.json
301 %{_datadir}/locale/*/LC_MESSAGES/*