Stop including dali-core.h
[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.34
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:       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%{?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
74 %description devel
75 Development components for the DALi Tizen Adaptor - public headers and package configs
76
77 ##############################
78 # Dali Feedback Plugin
79 ##############################
80 %package dali-feedback-plugin
81 Summary:    Plugin to play haptic and audio feedback for Dali
82 Group:      System/Libraries
83 %if 0%{?dali_feedback_plugin}
84 Requires:       libdeviced
85 BuildRequires:  pkgconfig(mm-sound)
86 BuildRequires:  pkgconfig(deviced)
87 BuildRequires:  libfeedback-devel
88 %endif
89
90 %description dali-feedback-plugin
91 Feedback plugin to play haptic and audio feedback for Dali
92
93 ##############################
94 # Dali Dynamics/Bullet Plugin
95 ##############################
96 %package dali-bullet-plugin
97 Summary:    Plugin to provide physics
98 Group:      System/Libraries
99 %if 0%{?dali_bullet_plugin}
100 BuildRequires:  libbullet-devel
101 %endif
102
103 %description dali-bullet-plugin
104 Dynamics plugin to wrap the libBulletDynamics libraries
105
106 ##############################
107 # Preparation
108 ##############################
109 %prep
110 %setup -q
111 %define dali_data_rw_dir         /opt/usr/share/dali/
112 %define dali_data_ro_dir         /usr/share/dali/
113 %define user_font_cache_dir      %{dali_data_rw_dir}/glyphcache/
114 %define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
115 %define font_preloaded_path      /usr/share/fonts/
116 %define font_downloaded_path     /opt/share/fonts/
117 %define font_application_path    /usr/share/app_fonts/
118 %define font_configuration_file  /opt/etc/fonts/conf.avail/99-slp.conf
119 %define dali_plugin_sound_files  %{dali_data_ro_dir}/plugins/sounds/
120 %define dali_plugin_theme_files  %{dali_data_ro_dir}/themes/feedback-themes/
121
122 %define dev_include_path %{_includedir}
123
124 ##############################
125 # Build
126 ##############################
127 %build
128 PREFIX+="/usr"
129 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
130 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
131
132 %ifarch %{arm}
133 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
134 %endif
135
136 %if 0%{?over_tizen_2_2}
137 CFLAGS+=" -DOVER_TIZEN_SDK_2_2"
138 CXXFLAGS+=" -DOVER_TIZEN_SDK_2_2"
139 %endif
140
141 libtoolize --force
142 cd %{_builddir}/%{name}-%{version}/build/tizen
143 autoreconf --install
144 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
145 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
146 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
147 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
148 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
149 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
150
151 %configure --with-jpeg-turbo --enable-gles=20 --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \
152 %if 0%{?dali_feedback_plugin}
153            --enable-feedback \
154 %endif
155 %if 0%{?dali_bullet_plugin}
156            --enable-bullet \
157 %endif
158 %if 0%{?dali_assimp_plugin}
159            --enable-assimp \
160 %endif
161 %if 0%{?over_tizen_2_2}
162            --with-over-tizen_2_2 \
163 %endif
164            --libdir=%{_libdir}
165
166 make %{?jobs:-j%jobs}
167
168 ##############################
169 # Installation
170 ##############################
171 %install
172 rm -rf %{buildroot}
173 cd build/tizen
174 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
175
176 # LICENSE
177 mkdir -p %{buildroot}/usr/share/license
178 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
179
180 ##############################
181 # Upgrade order:
182 # 1 - Pre Install new package
183 # 2 - Install new package
184 # 3 - Post install new package
185 # 4 - Pre uninstall old package
186 # 5 - Remove files not overwritten by new package
187 # 6 - Post uninstall old package
188 ##############################
189
190 %pre
191 rm -f %{user_font_cache_dir}/*
192 exit 0
193
194 ##############################
195 #  Post Install new package
196 ##############################
197 %post
198 /sbin/ldconfig
199 chown 5000:5000 %{user_font_cache_dir}
200 exit 0
201
202 %if 0%{?dali_feedback_plugin}
203 %post dali-feedback-plugin
204 /sbin/ldconfig
205 exit 0
206 %endif
207
208 %if 0%{?dali_bullet_plugin}
209 %post dali-bullet-plugin
210 /sbin/ldconfig
211 exit 0
212 %endif
213
214 ##############################
215 #   Pre Uninstall old package
216 ##############################
217 %preun
218 rm -f %{user_font_cache_dir}/*
219 exit 0
220
221 ##############################
222 #   Post Uninstall old package
223 ##############################
224 %postun
225 /sbin/ldconfig
226 exit 0
227
228 %if 0%{?dali_feedback_plugin}
229 %postun dali-feedback-plugin
230 /sbin/ldconfig
231 exit 0
232 %endif
233
234 %if 0%{?dali_bullet_plugin}
235 %postun dali-bullet-plugin
236 /sbin/ldconfig
237 exit 0
238 %endif
239
240 ##############################
241 # Files in Binary Packages
242 ##############################
243
244 %files
245 %manifest dali-adaptor.manifest-mobile
246 %defattr(-,root,root,-)
247 %{_libdir}/libdali-adap*.so*
248 %defattr(-,app,app,-)
249 %dir %{user_font_cache_dir}
250 %dir %{user_shader_cache_dir}
251 %{_bindir}/*
252 %{_datadir}/license/%{name}
253
254 %files devel
255 %defattr(-,root,root,-)
256 %{dev_include_path}/dali/*
257 %{_libdir}/pkgconfig/dali*.pc
258
259 %if 0%{?dali_feedback_plugin}
260 %files dali-feedback-plugin
261 %defattr(-,root,root,-)
262 %{_libdir}/libdali-feedback-plugin.so*
263 %{dali_plugin_sound_files}/*
264 %{dali_plugin_theme_files}/*
265 %endif
266
267 %if 0%{?dali_bullet_plugin}
268 %files dali-bullet-plugin
269 %defattr(-,root,root,-)
270 %{_libdir}/libdali-bullet-plugin.so*
271 %endif