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 %if 0%{?dali_assimp_plugin}
95 BuildRequires: pkgconfig(assimp)
99 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
100 platform abstraction and application shell
102 ##############################
104 ##############################
106 Summary: Development components for the DALi Tizen Adaptor
107 Group: Development/Building
108 Requires: %{name} = %{version}-%{release}
111 Development components for the DALi Tizen Adaptor - public headers and package configs
113 ##############################
114 # Dali Feedback Plugin
115 ##############################
116 %package dali-feedback-plugin
117 Summary: Plugin to play haptic and audio feedback for Dali
118 Group: System/Libraries
119 %if 0%{?dali_feedback_plugin}
120 #Requires: libdeviced
121 BuildRequires: pkgconfig(mm-sound)
122 BuildRequires: pkgconfig(haptic)
123 BuildRequires: libfeedback-devel
126 %description dali-feedback-plugin
127 Feedback plugin to play haptic and audio feedback for Dali
129 ##############################
130 # Dali Dynamics/Bullet Plugin
131 ##############################
132 %package dali-bullet-plugin
133 Summary: Plugin to provide physics
134 Group: System/Libraries
135 %if 0%{?dali_bullet_plugin}
136 BuildRequires: pkgconfig(bullet)
139 %description dali-bullet-plugin
140 Dynamics plugin to wrap the libBulletDynamics libraries
142 ##############################
144 ##############################
147 %define dali_data_rw_dir /usr/share/dali/
148 %define dali_data_ro_dir /usr/share/dali/
149 %define user_font_cache_dir %{dali_data_rw_dir}/glyphcache/
150 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
151 %define font_preloaded_path /usr/share/fonts/
152 %define font_downloaded_path /opt/share/fonts/
153 %define font_application_path /usr/share/app_fonts/
154 %define font_configuration_file /opt/etc/fonts/conf.avail/99-slp.conf
155 %define dali_plugin_sound_files %{dali_data_ro_dir}/plugins/sounds/
156 %define dali_plugin_theme_files %{dali_data_ro_dir}/themes/feedback-themes/
158 %define dev_include_path %{_includedir}
160 ##############################
162 ##############################
165 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
166 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
169 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
174 CXXFLAGS+=" -DWAYLAND"
175 configure_flags="--enable-wayland"
178 %if 0%{?over_tizen_2_2}
179 CFLAGS+=" -DOVER_TIZEN_SDK_2_2"
180 CXXFLAGS+=" -DOVER_TIZEN_SDK_2_2"
184 cd %{_builddir}/%{name}-%{version}/build/tizen && autoreconf --install
185 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}"
187 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \
188 %if 0%{?dali_feedback_plugin}
191 %if 0%{?dali_bullet_plugin}
194 %if 0%{?dali_assimp_plugin}
197 %if 0%{?over_tizen_2_2}
198 --with-over-tizen_2_2 \
200 $configure_flags --libdir=%{_libdir}
202 make %{?jobs:-j%jobs}
204 ##############################
206 ##############################
210 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
213 mkdir -p %{buildroot}/usr/share/license
214 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
216 ##############################
218 # 1 - Pre Install new package
219 # 2 - Install new package
220 # 3 - Post install new package
221 # 4 - Pre uninstall old package
222 # 5 - Remove files not overwritten by new package
223 # 6 - Post uninstall old package
224 ##############################
227 rm -f %{user_font_cache_dir}/*
230 ##############################
231 # Post Install new package
232 ##############################
235 chown 5000:5000 %{user_font_cache_dir}
238 %if 0%{?dali_feedback_plugin}
239 %post dali-feedback-plugin
244 %if 0%{?dali_bullet_plugin}
245 %post dali-bullet-plugin
250 ##############################
251 # Pre Uninstall old package
252 ##############################
254 rm -f %{user_font_cache_dir}/*
257 ##############################
258 # Post Uninstall old package
259 ##############################
264 %if 0%{?dali_feedback_plugin}
265 %postun dali-feedback-plugin
270 %if 0%{?dali_bullet_plugin}
271 %postun dali-bullet-plugin
276 ##############################
277 # Files in Binary Packages
278 ##############################
281 %manifest dali-adaptor.manifest
282 %defattr(-,root,root,-)
283 %{_libdir}/libdali-adap*.so*
284 %defattr(-,app,app,-)
285 %dir %{user_font_cache_dir}
286 %dir %{user_shader_cache_dir}
288 %{_datadir}/license/%{name}
291 %defattr(-,root,root,-)
292 %{dev_include_path}/dali/*
293 %{_libdir}/pkgconfig/dali*.pc
295 %if 0%{?dali_feedback_plugin}
296 %files dali-feedback-plugin
297 %defattr(-,root,root,-)
298 %{_libdir}/libdali-feedback-plugin.so*
299 %{dali_plugin_sound_files}/*
300 %{dali_plugin_theme_files}/*
303 %if 0%{?dali_bullet_plugin}
304 %files dali-bullet-plugin
305 %defattr(-,root,root,-)
306 %{_libdir}/libdali-bullet-plugin.so*