Merge "Set focus to ewk view." into devel/master
[platform/core/uifw/dali-extension.git] / packaging / dali-extension.spec
1 # NOTES
2 # This spec file is used to build DALi Extensions
3 #
4 # gbs will try to download the build.conf for the platform automatically from the repo location when
5 # performing a gbs build ( use gbs build -v to see it download location) E.g.
6 # http://download.tizen.org/snapshots/tizen/tv/tizen-tv/repos/arm-wayland/packages/repodata/xxxx-build.conf.gz
7
8 Name:       dali2-extension
9 Summary:    The DALi Tizen Extensions
10 Version:    2.0.7
11 Release:    1
12 Group:      System/Libraries
13 License:    Apache-2.0 and BSD-3-Clause and MIT
14 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-extensions.git;a=summary
15 Source0:    %{name}-%{version}.tar.gz
16
17 Requires(post): /sbin/ldconfig
18 Requires(postun): /sbin/ldconfig
19
20 BuildRequires:  pkgconfig
21 BuildRequires:  pkgconfig(dali2-core)
22 BuildRequires:  pkgconfig(dali2-adaptor)
23 BuildRequires:  pkgconfig(dali2-toolkit)
24 BuildRequires:  pkgconfig(dlog)
25
26 # For evas-plugin
27 BuildRequires:  pkgconfig(dali2-adaptor-integration)
28 BuildRequires:  pkgconfig(elementary)
29 BuildRequires:  pkgconfig(evas)
30 BuildRequires:  pkgconfig(ecore-wl2)
31
32 %description
33 dali-extension
34
35 %if 0%{?tizen_version_major} >= 4
36 %define tizen_40_or_greater 1
37 %endif
38
39 %if 0%{?tizen_version_major} >= 5
40 %define tizen_50_or_greater 1
41 %endif
42
43 %if ( 0%{?tizen_version_major} == 5 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 6
44 %define tizen_55_or_greater 1
45 %endif
46
47 %if ( 0%{?tizen_version_major} == 6 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 7
48 %define tizen_65_or_greater 1
49 %endif
50
51
52 # # Note
53 # %if 0%{?tizen_version_major} >= 6
54 # %define tizen_60_or_greater 1
55 # %endif
56
57 ##############################
58 # devel
59 ##############################
60 %package devel
61 Summary:    Development components for the DALi Extension
62 Group:      Development/Building
63 Requires:   %{name} = %{version}-%{release}
64
65 %description devel
66 Development components for the DALi Tizen Extensions - public headers and package configs
67
68 ##############################
69 # Dali Key Extension
70 ##############################
71
72 %package key-extension
73 Summary:    Plugin to support extension keys for Dali
74 Group:      System/Libraries
75
76 %description key-extension
77 Plugin to support extension keys for Dali
78
79 ##############################
80 # Dali VideoPlayer Plugin
81 ##############################
82
83 %package video-player-plugin
84 Summary:    Plugin to play a video file for Dali
85 Group:      System/Libraries
86 BuildRequires: pkgconfig(capi-media-player)
87 BuildRequires: pkgconfig(capi-system-info)
88 # dali-adaptor uses ecore mainloop
89 %if 0%{?tizen_version_major} >= 5
90 BuildRequires:  pkgconfig(ecore-wl2)
91 %else
92 BuildRequires:  pkgconfig(ecore-wayland)
93 %endif
94
95 %description video-player-plugin
96 VideoPlayer plugin to play a video file for Dali
97
98 ##############################
99 # Dali Web Engine chromium Plugin
100 ##############################
101
102 %package web-engine-chromium-plugin
103 Summary:    Plugin to support WebView for Dali
104 Group:      System/Libraries
105 %if 0%{?tizen_55_or_greater}
106 BuildRequires: pkgconfig(libtbm)
107 BuildRequires: pkgconfig(chromium-efl)
108 BuildRequires: pkgconfig(elementary)
109 %endif
110
111 %description web-engine-chromium-plugin
112 Web Engine chromium plugin to support WebView for Dali
113
114 ##############################
115 # Dali Image Loader Plugin
116 ##############################
117
118 %package image-loader-plugin
119 Summary:    Plugin to image loading for Dali
120 Group:      System/Libraries
121
122 %description image-loader-plugin
123 Image Loader plugin to image loading file for Dali
124
125 ####################################
126 # Vector Animation Renderer Plugin
127 ####################################
128 %package vector-animation-renderer-plugin
129 Summary:    Plugin to render a vector animation
130 Group:      System/Libraries
131 %if 0%{?tizen_55_or_greater}
132 BuildRequires:  pkgconfig(rlottie)
133 %endif
134
135 %description vector-animation-renderer-plugin
136 Plugin to render a vector animation
137
138 ####################################
139 # Vector Image Renderer Plugin
140 ####################################
141 %package vector-image-renderer-plugin
142 Summary:    Plugin to render a vector image
143 Group:      System/Libraries
144 %if 0%{?tizen_65_or_greater}
145 BuildRequires:  pkgconfig(thorvg)
146 %endif
147
148 %description vector-image-renderer-plugin
149 Plugin to render a vector image
150
151
152 ####################################
153 # color controller Plugin
154 ####################################
155
156 %package color-controller-plugin
157 Summary:    Plugin to load color theme
158 Group:      System/Libraries
159
160 %description color-controller-plugin
161 Plugin to load color theme
162
163 ##############################
164 # Dali Web Engine LWE Plugin
165 ##############################
166
167 %package web-engine-lwe-plugin
168 Summary:    Plugin to support WebView for Dali
169 Group:      System/Libraries
170 %if 0%{?tizen_55_or_greater}
171 BuildRequires: pkgconfig(libtbm)
172 BuildRequires: pkgconfig(lightweight-web-engine)
173 %endif
174
175 %description web-engine-lwe-plugin
176 Web Engine LWE(Light-weight Web Engine) plugin to support WebView for Dali
177
178 ##############################
179 # Preparation
180 ##############################
181 %prep
182 %setup -q
183
184 #Use TZ_PATH when tizen version is 3.x or greater
185
186 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
187 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
188 %define dev_include_path %{_includedir}
189
190 # Use Image Loader Plugin
191 %define use_image_loader 0
192
193 ##############################
194 # Build
195 ##############################
196 %build
197 PREFIX+="/usr"
198 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
199 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
200
201 %if 0%{?tizen_version_major} >= 5
202 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
203 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
204 configure_flags="--enable-ecore-wl2"
205 %endif
206
207 libtoolize --force
208 cd %{_builddir}/%{name}-%{version}/build/tizen
209 autoreconf --install
210
211 %configure --prefix=$PREFIX \
212 %if 0%{?tizen_50_or_greater}
213            --with-tizen-50-or-greater \
214 %endif
215 %if 0%{?tizen_55_or_greater}
216            --with-tizen-55-or-greater \
217 %endif
218 %if 0%{?tizen_65_or_greater}
219            --with-tizen-65-or-greater \
220 %endif
221            --enable-ecore-wl2 \
222            --enable-keyextension
223 %if 0%{?use_image_loader}
224 %configure \
225            --enable-imageloader-extension
226 %endif
227
228 make %{?jobs:-j%jobs}
229
230 ##############################
231 # Installation
232 ##############################
233 %install
234 rm -rf %{buildroot}
235
236 # install dali.sh
237 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
238
239 %if "%{?profile}" != "common" && "%{?profile}" != "ivi"
240 install -m 0644 scripts/dali.sh %{buildroot}%{_sysconfdir}/profile.d
241 %endif
242
243 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
244 install -m 0644 scripts/other/dali.sh %{buildroot}%{_sysconfdir}/profile.d
245 %endif
246
247 cd build/tizen
248 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
249
250 %pre
251 exit 0
252
253 ##############################
254 #  Post Install new package
255 ##############################
256 %post
257 /sbin/ldconfig
258 exit 0
259
260 %post key-extension
261 /sbin/ldconfig
262 exit 0
263
264 %post video-player-plugin
265 /sbin/ldconfig
266 exit 0
267
268 %if 0%{?tizen_55_or_greater}
269 %post web-engine-chromium-plugin
270 pushd %{_libdir}
271 ln -sf libdali2-web-engine-chromium-plugin.so libdali2-web-engine-plugin.so
272 popd
273 /sbin/ldconfig
274 exit 0
275 %endif
276
277 %post image-loader-plugin
278 /sbin/ldconfig
279 exit 0
280
281 %if 0%{?tizen_55_or_greater}
282 %post vector-animation-renderer-plugin
283 /sbin/ldconfig
284 exit 0
285 %endif
286
287 %if 0%{?tizen_65_or_greater}
288 %post vector-image-renderer-plugin
289 /sbin/ldconfig
290 exit 0
291 %endif
292
293 %post color-controller-plugin
294 /sbin/ldconfig
295 exit 0
296
297 %if 0%{?tizen_55_or_greater}
298 %post web-engine-lwe-plugin
299 /sbin/ldconfig
300 exit 0
301 %endif
302
303 ##############################
304 #   Pre Uninstall old package
305 ##############################
306 %preun
307 exit 0
308
309 ##############################
310 #   Post Uninstall old package
311 ##############################
312 %postun
313 /sbin/ldconfig
314 exit 0
315
316 %postun key-extension
317 /sbin/ldconfig
318 exit 0
319
320 %postun video-player-plugin
321 /sbin/ldconfig
322 exit 0
323
324 %if 0%{?tizen_55_or_greater}
325 %postun web-engine-chromium-plugin
326 /sbin/ldconfig
327 exit 0
328 %endif
329
330 %postun image-loader-plugin
331 /sbin/ldconfig
332 exit 0
333
334 %if 0%{?tizen_55_or_greater}
335 %postun vector-animation-renderer-plugin
336 /sbin/ldconfig
337 exit 0
338 %endif
339
340 %if 0%{?tizen_65_or_greater}
341 %postun vector-image-renderer-plugin
342 /sbin/ldconfig
343 exit 0
344 %endif
345
346 %postun color-controller-plugin
347 /sbin/ldconfig
348 exit 0
349
350 %if 0%{?tizen_55_or_greater}
351 %postun web-engine-lwe-plugin
352 /sbin/ldconfig
353 exit 0
354 %endif
355
356 ##############################
357 # Files in Binary Packages
358 ##############################
359
360 %files
361 %manifest dali-extension.manifest
362 %defattr(-,root,root,-)
363 %{_sysconfdir}/profile.d/dali.sh
364 %{_libdir}/libdali2-extension.so*
365 %license LICENSE
366
367 %files devel
368 %defattr(-,root,root,-)
369 %{_includedir}/dali-extension/*
370 %{_libdir}/pkgconfig/*.pc
371
372 %files key-extension
373 %manifest dali-extension.manifest
374 %defattr(-,root,root,-)
375 %{_libdir}/libdali2-key-extension.so*
376 %license LICENSE
377
378 %files video-player-plugin
379 %manifest dali-extension.manifest
380 %defattr(-,root,root,-)
381 %{_libdir}/libdali2-video-player-plugin.so*
382 %license LICENSE
383
384 %if 0%{?tizen_55_or_greater}
385 %files web-engine-chromium-plugin
386 %manifest dali-extension.manifest
387 %defattr(-,root,root,-)
388 %{_libdir}/libdali2-web-engine-chromium-plugin.so*
389 %license LICENSE
390 %endif
391
392 %if 0%{?use_image_loader}
393 %files image-loader-plugin
394 %manifest dali-extension.manifest
395 %defattr(-,root,root,-)
396 %{_libdir}/libdali2-image-loader-plugin.so*
397 %license LICENSE
398 %endif
399
400 %if 0%{?tizen_55_or_greater}
401 %files vector-animation-renderer-plugin
402 %manifest dali-extension.manifest
403 %defattr(-,root,root,-)
404 %{_libdir}/libdali2-vector-animation-renderer-plugin.so*
405 %license LICENSE
406 %endif
407
408 %if 0%{?tizen_65_or_greater}
409 %files vector-image-renderer-plugin
410 %manifest dali-extension.manifest
411 %defattr(-,root,root,-)
412 %{_libdir}/libdali2-vector-image-renderer-plugin.so*
413 %license LICENSE
414 %endif
415
416 %files color-controller-plugin
417 %manifest dali-extension.manifest
418 %defattr(-,root,root,-)
419 %{_libdir}/libdali2-color-controller-plugin.so*
420 %license LICENSE
421
422 %if 0%{?tizen_55_or_greater}
423 %files web-engine-lwe-plugin
424 %manifest dali-extension.manifest
425 %defattr(-,root,root,-)
426 %{_libdir}/libdali2-web-engine-lwe-plugin.so*
427 %license LICENSE
428 %endif