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 # %define dali_style_folder 1920x1080
41 %define dali_style_folder 720x1280
42 # 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
45 %define dali_style_folder %{dali_style}
49 The OpenGLES Canvas Core Library Toolkit - a set of controls that provide
50 user interface functionality.
52 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
54 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
56 Summary: style files for Tizen TV (1920x1080)
57 Requires: %{name} = %{version}-%{release}
58 %description profile_tv
59 dali-toolkit style files for Tizen TV (1920x1080)
62 ##############################
64 ##############################
66 Summary: Application development package for the OpenGLES Canvas toolkit
67 Group: Development/Building
68 Requires: %{name} = %{version}-%{release}
71 Application development package for the OpenGLES Canvas toolkit - headers and package config
73 ##############################
75 ##############################
79 #Use TZ_PATH when tizen version is 3.x
81 %if "%{tizen_version_major}" == "2"
82 %define dali_data_rw_dir /opt/usr/share/dali/
83 %define dali_data_ro_dir /usr/share/dali/
85 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
86 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
89 %define dali_toolkit_image_files %{dali_data_ro_dir}/toolkit/images/
90 %define dali_toolkit_sound_files %{dali_data_ro_dir}/toolkit/sounds/
91 %define dali_toolkit_style_files %{dali_data_ro_dir}/toolkit/styles/
92 %define dev_include_path %{_includedir}
96 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
99 language=${language%.po}
100 msgfmt -o ${language}.mo ${language}.po
104 ##############################
106 ##############################
109 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
110 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
112 %if 0%{?enable_coverage}
113 CXXFLAGS+=" --coverage "
114 LDFLAGS+=" --coverage "
118 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
120 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
121 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
123 %configure --enable-profile=TIZEN \
124 --with-style=%{dali_style_folder} \
125 %if 0%{?enable_debug}
130 make %{?jobs:-j%jobs}
132 ##############################
134 ##############################
138 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
143 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
146 language=${language%.mo}
147 mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
148 cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
153 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
154 # if tv ||"undefined"
155 %if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
156 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080
157 # 720x1280/images/*.png files are exactly same with 1920x1080/images/*.png
158 # if not, copy them as same as dali-toolkit/styles/1920x1080/*.json
159 # cp dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080
160 cp dali-toolkit/styles/1920x1080/*.json %{buildroot}%{dali_toolkit_style_files}/1920x1080
162 # Do not let style package files be overwritten by the main package
163 #pushd %{buildroot}%{dali_toolkit_style_files}/1920x1080
164 #for FILE in *.json; do rm -f ../"${FILE}"; done
169 ##############################
171 ##############################
176 ##############################
178 ##############################
183 ##############################
184 # Files in Binary Packages
185 ##############################
187 %if 0%{?enable_dali_smack_rules}
188 %manifest dali-toolkit.manifest-smack
190 %manifest dali-toolkit.manifest
192 %defattr(-,root,root,-)
193 %{_libdir}/lib%{name}.so*
194 %{dali_toolkit_image_files}/*
195 %{dali_toolkit_sound_files}/*
196 %{dali_toolkit_style_files}/*
197 %exclude %{dali_toolkit_style_files}/1920x1080
198 # 720x1280/images/*.png files are exactly same with 1920x1080/images/*.png
200 %{_datadir}/locale/*/LC_MESSAGES/*
203 %defattr(-,root,root,-)
204 %{dev_include_path}/%{name}/*
205 %{_libdir}/pkgconfig/*.pc
207 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
208 # if tv ||"undefined"
209 %if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
211 pushd %{dali_toolkit_style_files}/1920x1080
212 for FILE in *.json; do mv 1920x1080/"${FILE}" ../"${FILE}"; done
218 # This is an un-installation.
219 pushd %{dali_toolkit_style_files}
220 for FILE in *.json; do mv 1920x1080/"${FILE}"; done
224 # This is an upgrade.
230 %{dali_toolkit_style_files}/1920x1080/*