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