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