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