Remove Boost dependency
[platform/core/uifw/dali-adaptor.git] / packaging / dali-adaptor-mobile.spec
1 Name:       dali-adaptor
2 Summary:    The DALi Tizen Adaptor
3 Version:    1.0.53
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache-2.0
7 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
8 Source0:    %{name}-%{version}.tar.gz
9
10 %define dali_profile MOBILE
11 %define dali_mobile_profile 1
12 %define dali_feedback_plugin 0
13 %define dali_bullet_plugin 0
14 %define dali_assimp_plugin 0
15 %define over_tizen_2_2 1
16
17 %if 0%{?over_tizen_2_2}
18 %define shaderbincache_flag ENABLE
19 %endif
20
21 Requires(post): /sbin/ldconfig
22 Requires(postun): /sbin/ldconfig
23 Requires:       giflib
24 BuildRequires:  pkgconfig
25 BuildRequires:  gawk
26 BuildRequires:  pkgconfig(sensor)
27 BuildRequires:  pkgconfig(aul)
28 BuildRequires:  giflib-devel
29 BuildRequires:  pkgconfig(xi)
30 BuildRequires:  pkgconfig(fontconfig)
31 BuildRequires:  pkgconfig(elementary)
32 BuildRequires:  pkgconfig(capi-appfw-application)
33 BuildRequires:  libjpeg-turbo-devel
34 BuildRequires:  pkgconfig(evas)
35 BuildRequires:  pkgconfig(xfixes)
36 BuildRequires:  pkgconfig(xdamage)
37 BuildRequires:  pkgconfig(utilX)
38 BuildRequires:  dali-devel
39 BuildRequires:  dali-integration-devel
40 BuildRequires:  libxml2-devel
41 BuildRequires:  pkgconfig(vconf)
42 BuildRequires:  tts-devel
43 BuildRequires:  pkgconfig(dlog)
44 BuildRequires:  libdrm-devel
45 BuildRequires:  pkgconfig(libexif)
46 BuildRequires:  pkgconfig(capi-system-system-settings)
47 BuildRequires:  pkgconfig(libpng)
48 BuildRequires:  pkgconfig(glesv2)
49 BuildRequires:  pkgconfig(efl-assist)
50 BuildRequires:  libcurl-devel
51 BuildRequires:  pkgconfig(harfbuzz)
52 BuildRequires:  fribidi-devel
53
54 %if 0%{?over_tizen_2_2}
55 BuildRequires:  pkgconfig(capi-system-info)
56 %endif
57
58 %if 0%{?dali_assimp_plugin}
59 BuildRequires:  pkgconfig(assimp)
60 %endif
61
62 %description
63 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
64 platform abstraction and application shell
65
66 ##############################
67 # devel
68 ##############################
69 %package devel
70 Summary:    Development components for the DALi Tizen Adaptor
71 Group:      Development/Building
72 Requires:   %{name} = %{version}-%{release}
73 Requires:   %{name}-integration-devel = %{version}-%{release}
74
75 %description devel
76 Development components for the DALi Tizen Adaptor - public headers and package configs
77
78 ##############################
79 # integration-devel
80 ##############################
81 %package integration-devel
82 Summary:    Integration development package for the Adaptor
83 Group:      Development/Building
84 Requires:   %{name} = %{version}-%{release}
85
86 %description integration-devel
87 Integration development package for the Adaptor - headers for integrating with an adaptor library.
88
89 ##############################
90 # Dali Feedback Plugin
91 ##############################
92 %package dali-feedback-plugin
93 Summary:    Plugin to play haptic and audio feedback for Dali
94 Group:      System/Libraries
95 %if 0%{?dali_feedback_plugin}
96 Requires:       libdeviced
97 BuildRequires:  pkgconfig(mm-sound)
98 BuildRequires:  pkgconfig(deviced)
99 BuildRequires:  libfeedback-devel
100 %endif
101
102 %description dali-feedback-plugin
103 Feedback plugin to play haptic and audio feedback for Dali
104
105 ##############################
106 # Dali Dynamics/Bullet Plugin
107 ##############################
108 %package dali-bullet-plugin
109 Summary:    Plugin to provide physics
110 Group:      System/Libraries
111 %if 0%{?dali_bullet_plugin}
112 BuildRequires:  libbullet-devel
113 %endif
114
115 %description dali-bullet-plugin
116 Dynamics plugin to wrap the libBulletDynamics libraries
117
118 ##############################
119 # Preparation
120 ##############################
121 %prep
122 %setup -q
123 %define dali_data_rw_dir         /opt/usr/share/dali/
124 %define dali_data_ro_dir         /usr/share/dali/
125 %define smack_rule_dir           /etc/smack/accesses2.d/
126 %define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
127 %define font_preloaded_path      /usr/share/fonts/
128 %define font_downloaded_path     /opt/share/fonts/
129 %define font_application_path    /usr/share/app_fonts/
130 %define font_configuration_file  /opt/etc/fonts/conf.avail/99-slp.conf
131 %define dali_plugin_sound_files  %{dali_data_ro_dir}/plugins/sounds/
132 %define dali_plugin_theme_files  %{dali_data_ro_dir}/themes/feedback-themes/
133
134 %define dev_include_path %{_includedir}
135
136 ##############################
137 # Build
138 ##############################
139 %build
140 PREFIX+="/usr"
141 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
142 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
143
144 %ifarch %{arm}
145 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
146 %endif
147
148 %if 0%{?over_tizen_2_2}
149 CFLAGS+=" -DOVER_TIZEN_SDK_2_2"
150 CXXFLAGS+=" -DOVER_TIZEN_SDK_2_2"
151 %endif
152
153 libtoolize --force
154 cd %{_builddir}/%{name}-%{version}/build/tizen
155 autoreconf --install
156 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
157 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
158 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
159 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
160 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
161 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
162
163 %configure --with-jpeg-turbo --enable-gles=20 --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \
164 %if 0%{?dali_feedback_plugin}
165            --enable-feedback \
166 %endif
167 %if 0%{?dali_bullet_plugin}
168            --enable-bullet \
169 %endif
170 %if 0%{?dali_assimp_plugin}
171            --enable-assimp \
172 %endif
173 %if 0%{?over_tizen_2_2}
174            --with-over-tizen_2_2 \
175 %endif
176            --libdir=%{_libdir}
177
178 make %{?jobs:-j%jobs}
179
180 ##############################
181 # Installation
182 ##############################
183 %install
184 rm -rf %{buildroot}
185 cd build/tizen
186 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
187
188 ##############################
189 # Smack
190 ##############################
191 mkdir -p %{buildroot}%{smack_rule_dir}
192 cp -f %{_builddir}/%{name}-%{version}/%{name}.rule-mobile %{buildroot}%{smack_rule_dir}/%{name}.rule
193
194 # LICENSE
195 mkdir -p %{buildroot}/usr/share/license
196 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
197
198 ##############################
199 # Upgrade order:
200 # 1 - Pre Install new package
201 # 2 - Install new package
202 # 3 - Post install new package
203 # 4 - Pre uninstall old package
204 # 5 - Remove files not overwritten by new package
205 # 6 - Post uninstall old package
206 ##############################
207
208 %pre
209 exit 0
210
211 ##############################
212 #  Post Install new package
213 ##############################
214 %post
215 /sbin/ldconfig
216 exit 0
217
218 %if 0%{?dali_feedback_plugin}
219 %post dali-feedback-plugin
220 /sbin/ldconfig
221 exit 0
222 %endif
223
224 %if 0%{?dali_bullet_plugin}
225 %post dali-bullet-plugin
226 /sbin/ldconfig
227 exit 0
228 %endif
229
230 ##############################
231 #   Pre Uninstall old package
232 ##############################
233 %preun
234 exit 0
235
236 ##############################
237 #   Post Uninstall old package
238 ##############################
239 %postun
240 /sbin/ldconfig
241 exit 0
242
243 %if 0%{?dali_feedback_plugin}
244 %postun dali-feedback-plugin
245 /sbin/ldconfig
246 exit 0
247 %endif
248
249 %if 0%{?dali_bullet_plugin}
250 %postun dali-bullet-plugin
251 /sbin/ldconfig
252 exit 0
253 %endif
254
255 ##############################
256 # Files in Binary Packages
257 ##############################
258
259 %files
260 %manifest dali-adaptor.manifest-mobile
261 %defattr(-,root,root,-)
262 %{smack_rule_dir}/%{name}.rule
263 %{_libdir}/libdali-adap*.so*
264 %defattr(-,app,app,-)
265 %dir %{user_shader_cache_dir}
266 %{_bindir}/*
267 %{_datadir}/license/%{name}
268
269 %files devel
270 %defattr(-,root,root,-)
271 %{dev_include_path}/dali/dali.h
272 %{dev_include_path}/dali/public-api/*
273 %{dev_include_path}/dali/devel-api/*
274 %{_libdir}/pkgconfig/dali.pc
275
276 %files integration-devel
277 %defattr(-,root,root,-)
278 %{dev_include_path}/dali/integration-api/adaptors/*
279 %{_libdir}/pkgconfig/dali-adaptor-integration.pc
280
281 %if 0%{?dali_feedback_plugin}
282 %files dali-feedback-plugin
283 %defattr(-,root,root,-)
284 %{_libdir}/libdali-feedback-plugin.so*
285 %{dali_plugin_sound_files}/*
286 %{dali_plugin_theme_files}/*
287 %endif
288
289 %if 0%{?dali_bullet_plugin}
290 %files dali-bullet-plugin
291 %defattr(-,root,root,-)
292 %{_libdir}/libdali-bullet-plugin.so*
293 %endif