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
46 %define shaderbincache_flag DISABLE
49 Requires(post): /sbin/ldconfig
50 Requires(postun): /sbin/ldconfig
51 Requires: boost-thread
53 BuildRequires: pkgconfig
55 BuildRequires: pkgconfig(sensor)
56 BuildRequires: pkgconfig(aul)
57 BuildRequires: boost-devel
58 BuildRequires: giflib-devel
59 BuildRequires: pkgconfig(fontconfig)
60 BuildRequires: pkgconfig(elementary)
61 BuildRequires: pkgconfig(capi-appfw-application)
62 BuildRequires: libjpeg-turbo-devel
63 BuildRequires: pkgconfig(evas)
64 BuildRequires: dali-devel
65 BuildRequires: dali-integration-devel
66 BuildRequires: libxml2-devel
67 BuildRequires: vconf-devel
68 BuildRequires: vconf-keys-devel
69 BuildRequires: tts-devel
70 BuildRequires: pkgconfig(dlog)
71 BuildRequires: libdrm-devel
72 BuildRequires: pkgconfig(libexif)
73 BuildRequires: pkgconfig(capi-system-system-settings)
74 BuildRequires: pkgconfig(libpng)
75 BuildRequires: pkgconfig(glesv2)
76 BuildRequires: pkgconfig(egl)
77 BuildRequires: libcurl-devel
80 %if 0%{?over_tizen_2_2}
81 BuildRequires: pkgconfig(capi-system-info)
85 BuildRequires: pkgconfig(ecore-wayland)
86 BuildRequires: pkgconfig(wayland-egl)
87 BuildRequires: pkgconfig(wayland-client)
89 BuildRequires: pkgconfig(xi)
90 BuildRequires: pkgconfig(xfixes)
91 BuildRequires: pkgconfig(xdamage)
92 BuildRequires: pkgconfig(utilX)
95 BuildRequires: pkgconfig(harfbuzz)
96 BuildRequires: fribidi-devel
98 %if 0%{?dali_assimp_plugin}
99 BuildRequires: pkgconfig(assimp)
103 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
104 platform abstraction and application shell
106 ##############################
108 ##############################
110 Summary: Development components for the DALi Tizen Adaptor
111 Group: Development/Building
112 Requires: %{name} = %{version}-%{release}
113 Requires: %{name}-integration-devel = %{version}-%{release}
116 Development components for the DALi Tizen Adaptor - public headers and package configs
118 ##############################
120 ##############################
121 %package integration-devel
122 Summary: Integration development package for the Adaptor
123 Group: Development/Building
124 Requires: %{name} = %{version}-%{release}
126 %description integration-devel
127 Integration development package for the Adaptor - headers for integrating with an adaptor library.
129 ##############################
130 # Dali Feedback Plugin
131 ##############################
132 %package dali-feedback-plugin
133 Summary: Plugin to play haptic and audio feedback for Dali
134 Group: System/Libraries
135 %if 0%{?dali_feedback_plugin}
136 #Requires: libdeviced
137 BuildRequires: pkgconfig(mm-sound)
138 BuildRequires: pkgconfig(haptic)
139 BuildRequires: libfeedback-devel
142 %description dali-feedback-plugin
143 Feedback plugin to play haptic and audio feedback for Dali
145 ##############################
146 # Dali Dynamics/Bullet Plugin
147 ##############################
148 %package dali-bullet-plugin
149 Summary: Plugin to provide physics
150 Group: System/Libraries
151 %if 0%{?dali_bullet_plugin}
152 BuildRequires: pkgconfig(bullet)
155 %description dali-bullet-plugin
156 Dynamics plugin to wrap the libBulletDynamics libraries
158 ##############################
160 ##############################
163 %define dali_data_rw_dir /usr/share/dali/
164 %define dali_data_ro_dir /usr/share/dali/
165 %define user_font_cache_dir %{dali_data_rw_dir}/glyphcache/
166 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
167 %define font_preloaded_path /usr/share/fonts/
168 %define font_downloaded_path /opt/share/fonts/
169 %define font_application_path /usr/share/app_fonts/
170 %define font_configuration_file /opt/etc/fonts/conf.avail/99-slp.conf
171 %define dali_plugin_sound_files %{dali_data_ro_dir}/plugins/sounds/
172 %define dali_plugin_theme_files %{dali_data_ro_dir}/themes/feedback-themes/
174 %define dev_include_path %{_includedir}
176 ##############################
178 ##############################
181 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
182 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
185 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
190 CXXFLAGS+=" -DWAYLAND"
191 configure_flags="--enable-wayland"
194 %if 0%{?over_tizen_2_2}
195 CFLAGS+=" -DOVER_TIZEN_SDK_2_2"
196 CXXFLAGS+=" -DOVER_TIZEN_SDK_2_2"
200 cd %{_builddir}/%{name}-%{version}/build/tizen && autoreconf --install
201 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}"
203 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \
204 %if 0%{?dali_feedback_plugin}
207 %if 0%{?dali_bullet_plugin}
210 %if 0%{?dali_assimp_plugin}
213 %if 0%{?over_tizen_2_2}
214 --with-over-tizen_2_2 \
216 $configure_flags --libdir=%{_libdir}
218 make %{?jobs:-j%jobs}
220 ##############################
222 ##############################
226 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
229 mkdir -p %{buildroot}/usr/share/license
230 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
232 ##############################
234 # 1 - Pre Install new package
235 # 2 - Install new package
236 # 3 - Post install new package
237 # 4 - Pre uninstall old package
238 # 5 - Remove files not overwritten by new package
239 # 6 - Post uninstall old package
240 ##############################
243 rm -f %{user_font_cache_dir}/*
246 ##############################
247 # Post Install new package
248 ##############################
251 chown 5000:5000 %{user_font_cache_dir}
254 %if 0%{?dali_feedback_plugin}
255 %post dali-feedback-plugin
260 %if 0%{?dali_bullet_plugin}
261 %post dali-bullet-plugin
266 ##############################
267 # Pre Uninstall old package
268 ##############################
270 rm -f %{user_font_cache_dir}/*
273 ##############################
274 # Post Uninstall old package
275 ##############################
280 %if 0%{?dali_feedback_plugin}
281 %postun dali-feedback-plugin
286 %if 0%{?dali_bullet_plugin}
287 %postun dali-bullet-plugin
292 ##############################
293 # Files in Binary Packages
294 ##############################
297 %manifest dali-adaptor.manifest
298 %defattr(-,root,root,-)
299 %{_libdir}/libdali-adap*.so*
300 %defattr(-,app,app,-)
301 %dir %{user_font_cache_dir}
302 %dir %{user_shader_cache_dir}
304 %{_datadir}/license/%{name}
307 %defattr(-,root,root,-)
308 %{dev_include_path}/dali/dali.h
309 %{dev_include_path}/dali/public-api/*
310 %{_libdir}/pkgconfig/dali.pc
312 %files integration-devel
313 %defattr(-,root,root,-)
314 %{dev_include_path}/dali/integration-api/adaptors/*
315 %{_libdir}/pkgconfig/dali-adaptor-integration.pc
317 %if 0%{?dali_feedback_plugin}
318 %files dali-feedback-plugin
319 %defattr(-,root,root,-)
320 %{_libdir}/libdali-feedback-plugin.so*
321 %{dali_plugin_sound_files}/*
322 %{dali_plugin_theme_files}/*
325 %if 0%{?dali_bullet_plugin}
326 %files dali-bullet-plugin
327 %defattr(-,root,root,-)
328 %{_libdir}/libdali-bullet-plugin.so*