4 Summary: The DALi Tizen Adaptor
7 Group: System/Libraries
9 URL: https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
10 Source0: %{name}-%{version}.tar.gz
12 %if "%{profile}" == "mobile"
13 %define dali_profile MOBILE
14 %define dali_feedback_plugin 0
15 %define dali_bullet_plugin 0
16 %define dali_assimp_plugin 0
17 %define over_tizen_2_2 0
18 %define shaderbincache_flag DISABLE
21 %if "%{profile}" == "tv"
22 %define dali_profile TV
23 %define dali_feedback_plugin 0
24 %define dali_bullet_plugin 0
25 %define dali_assimp_plugin 0
26 %define over_tizen_2_2 1
27 %define shaderbincache_flag ENABLE
30 %if "%{profile}" == "wearable"
31 %define dali_profile WEARABLE
32 %define dali_feedback_plugin 0
33 %define dali_bullet_plugin 0
34 %define dali_assimp_plugin 0
35 %define over_tizen_2_2 0
36 %define shaderbincache_flag DISABLE
39 %if "%{profile}" == "common"
40 %define dali_profile COMMON
41 %define dali_feedback_plugin 0
42 %define dali_bullet_plugin 0
43 %define dali_assimp_plugin 0
44 %define over_tizen_2_2 0
45 %define shaderbincache_flag DISABLE
48 Requires(post): /sbin/ldconfig
49 Requires(postun): /sbin/ldconfig
50 Requires: boost-thread
52 BuildRequires: pkgconfig
54 BuildRequires: pkgconfig(sensor)
55 BuildRequires: pkgconfig(aul)
56 BuildRequires: boost-devel
57 BuildRequires: giflib-devel
58 BuildRequires: pkgconfig(fontconfig)
59 BuildRequires: pkgconfig(elementary)
60 BuildRequires: pkgconfig(capi-appfw-application)
61 BuildRequires: libjpeg-turbo-devel
62 BuildRequires: pkgconfig(evas)
63 BuildRequires: dali-devel
64 BuildRequires: dali-integration-devel
65 BuildRequires: libxml2-devel
66 BuildRequires: vconf-devel
67 BuildRequires: vconf-keys-devel
68 BuildRequires: tts-devel
69 BuildRequires: pkgconfig(dlog)
70 BuildRequires: libdrm-devel
71 BuildRequires: pkgconfig(libexif)
72 BuildRequires: pkgconfig(capi-system-system-settings)
73 BuildRequires: pkgconfig(libpng)
74 BuildRequires: pkgconfig(glesv2)
75 BuildRequires: pkgconfig(egl)
76 BuildRequires: libcurl-devel
79 %if 0%{?over_tizen_2_2}
80 BuildRequires: pkgconfig(capi-system-info)
84 BuildRequires: pkgconfig(ecore-wayland)
85 BuildRequires: pkgconfig(wayland-egl)
86 BuildRequires: pkgconfig(wayland-client)
88 BuildRequires: pkgconfig(xi)
89 BuildRequires: pkgconfig(xfixes)
90 BuildRequires: pkgconfig(xdamage)
91 BuildRequires: pkgconfig(utilX)
94 BuildRequires: pkgconfig(harfbuzz)
95 BuildRequires: fribidi-devel
97 %if 0%{?dali_assimp_plugin}
98 BuildRequires: pkgconfig(assimp)
102 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
103 platform abstraction and application shell
105 ##############################
107 ##############################
109 Summary: Development components for the DALi Tizen Adaptor
110 Group: Development/Building
111 Requires: %{name} = %{version}-%{release}
114 Development components for the DALi Tizen Adaptor - public headers and package configs
116 ##############################
117 # Dali Feedback Plugin
118 ##############################
119 %package dali-feedback-plugin
120 Summary: Plugin to play haptic and audio feedback for Dali
121 Group: System/Libraries
122 %if 0%{?dali_feedback_plugin}
123 #Requires: libdeviced
124 BuildRequires: pkgconfig(mm-sound)
125 BuildRequires: pkgconfig(haptic)
126 BuildRequires: libfeedback-devel
129 %description dali-feedback-plugin
130 Feedback plugin to play haptic and audio feedback for Dali
132 ##############################
133 # Dali Dynamics/Bullet Plugin
134 ##############################
135 %package dali-bullet-plugin
136 Summary: Plugin to provide physics
137 Group: System/Libraries
138 %if 0%{?dali_bullet_plugin}
139 BuildRequires: pkgconfig(bullet)
142 %description dali-bullet-plugin
143 Dynamics plugin to wrap the libBulletDynamics libraries
145 ##############################
147 ##############################
150 %define dali_data_rw_dir /usr/share/dali/
151 %define dali_data_ro_dir /usr/share/dali/
152 %define user_font_cache_dir %{dali_data_rw_dir}/glyphcache/
153 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
154 %define font_preloaded_path /usr/share/fonts/
155 %define font_downloaded_path /opt/share/fonts/
156 %define font_application_path /usr/share/app_fonts/
157 %define font_configuration_file /opt/etc/fonts/conf.avail/99-slp.conf
158 %define dali_plugin_sound_files %{dali_data_ro_dir}/plugins/sounds/
159 %define dali_plugin_theme_files %{dali_data_ro_dir}/themes/feedback-themes/
161 %define dev_include_path %{_includedir}
163 ##############################
165 ##############################
168 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
169 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
172 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
177 CXXFLAGS+=" -DWAYLAND"
178 configure_flags="--enable-wayland"
181 %if 0%{?over_tizen_2_2}
182 CFLAGS+=" -DOVER_TIZEN_SDK_2_2"
183 CXXFLAGS+=" -DOVER_TIZEN_SDK_2_2"
187 cd %{_builddir}/%{name}-%{version}/build/tizen && autoreconf --install
188 cd %{_builddir}/%{name}-%{version}/build/tizen && CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}" FONT_PRELOADED_PATH="%{font_preloaded_path}" FONT_DOWNLOADED_PATH="%{font_downloaded_path}" FONT_APPLICATION_PATH="%{font_application_path}" FONT_CONFIGURATION_FILE="%{font_configuration_file}"
190 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \
191 %if 0%{?dali_feedback_plugin}
194 %if 0%{?dali_bullet_plugin}
197 %if 0%{?dali_assimp_plugin}
200 %if 0%{?over_tizen_2_2}
201 --with-over-tizen_2_2 \
203 $configure_flags --libdir=%{_libdir}
205 make %{?jobs:-j%jobs}
207 ##############################
209 ##############################
213 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
216 mkdir -p %{buildroot}/usr/share/license
217 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
219 ##############################
221 # 1 - Pre Install new package
222 # 2 - Install new package
223 # 3 - Post install new package
224 # 4 - Pre uninstall old package
225 # 5 - Remove files not overwritten by new package
226 # 6 - Post uninstall old package
227 ##############################
230 rm -f %{user_font_cache_dir}/*
233 ##############################
234 # Post Install new package
235 ##############################
238 chown 5000:5000 %{user_font_cache_dir}
241 %if 0%{?dali_feedback_plugin}
242 %post dali-feedback-plugin
247 %if 0%{?dali_bullet_plugin}
248 %post dali-bullet-plugin
253 ##############################
254 # Pre Uninstall old package
255 ##############################
257 rm -f %{user_font_cache_dir}/*
260 ##############################
261 # Post Uninstall old package
262 ##############################
267 %if 0%{?dali_feedback_plugin}
268 %postun dali-feedback-plugin
273 %if 0%{?dali_bullet_plugin}
274 %postun dali-bullet-plugin
279 ##############################
280 # Files in Binary Packages
281 ##############################
284 %manifest dali-adaptor.manifest
285 %defattr(-,root,root,-)
286 %{_libdir}/libdali-adap*.so*
287 %defattr(-,app,app,-)
288 %dir %{user_font_cache_dir}
289 %dir %{user_shader_cache_dir}
291 %{_datadir}/license/%{name}
294 %defattr(-,root,root,-)
295 %{dev_include_path}/dali/*
296 %{_libdir}/pkgconfig/dali*.pc
298 %if 0%{?dali_feedback_plugin}
299 %files dali-feedback-plugin
300 %defattr(-,root,root,-)
301 %{_libdir}/libdali-feedback-plugin.so*
302 %{dali_plugin_sound_files}/*
303 %{dali_plugin_theme_files}/*
306 %if 0%{?dali_bullet_plugin}
307 %files dali-bullet-plugin
308 %defattr(-,root,root,-)
309 %{_libdir}/libdali-bullet-plugin.so*