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 ##############################
190 ##############################
195 %post resources_480x800
196 pushd %{dali_toolkit_style_files}/480x800
197 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
200 %post resources_720x1280
201 pushd %{dali_toolkit_style_files}/720x1280
202 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
206 %post resources_1920x1080
207 pushd %{dali_toolkit_style_files}/1920x1080
208 for FILE in *; do mv ./"${FILE}" ../"${FILE}"; done
211 ##############################
213 ##############################
215 %preun resources_480x800
216 pushd %{dali_toolkit_style_files}
221 %preun resources_720x1280
222 pushd %{dali_toolkit_style_files}
227 %preun resources_1920x1080
228 pushd %{dali_toolkit_style_files}
229 mv images ./1920x1080
230 mv *.json ./1920x1080
233 ##############################
235 ##############################
240 %postun resources_480x800
241 pushd %{dali_toolkit_style_files}
245 %postun resources_720x1280
246 pushd %{dali_toolkit_style_files}
250 %postun resources_1920x1080
251 pushd %{dali_toolkit_style_files}
255 ##############################
256 # Files in Binary Packages
257 ##############################
259 %if 0%{?enable_dali_smack_rules}
260 %manifest dali-toolkit.manifest-smack
262 %manifest dali-toolkit.manifest
264 %defattr(-,root,root,-)
265 %{_libdir}/lib%{name}.so*
269 %defattr(-,root,root,-)
270 %{dev_include_path}/%{name}/*
271 %{_libdir}/pkgconfig/*.pc
273 %files resources_480x800
274 %manifest dali-toolkit-resources.manifest
275 %defattr(-,root,root,-)
276 %{dali_toolkit_image_files}/*
277 %{dali_toolkit_sound_files}/*
278 %{dali_toolkit_style_files}/480x800/*
279 %{_datadir}/locale/*/LC_MESSAGES/*
281 %files resources_720x1280
282 %manifest dali-toolkit-resources.manifest
283 %defattr(-,root,root,-)
284 %{dali_toolkit_image_files}/*
285 %{dali_toolkit_sound_files}/*
286 %{dali_toolkit_style_files}/720x1280/*
287 %{_datadir}/locale/*/LC_MESSAGES/*
289 %files resources_1920x1080
290 %manifest dali-toolkit-resources.manifest
291 %defattr(-,root,root,-)
292 %{dali_toolkit_image_files}/*
293 %{dali_toolkit_sound_files}/*
294 %{dali_toolkit_style_files}/1920x1080/*
295 %{_datadir}/locale/*/LC_MESSAGES/*