Fix to package vector-image-renderer properly.
[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.0
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 install -m 0644 scripts/dali.sh %{buildroot}%{_sysconfdir}/profile.d
239
240 cd build/tizen
241 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
242
243 %pre
244 exit 0
245
246 ##############################
247 #  Post Install new package
248 ##############################
249 %post
250 /sbin/ldconfig
251 exit 0
252
253 %post key-extension
254 /sbin/ldconfig
255 exit 0
256
257 %post video-player-plugin
258 /sbin/ldconfig
259 exit 0
260
261 %if 0%{?tizen_55_or_greater}
262 %post web-engine-chromium-plugin
263 pushd %{_libdir}
264 ln -sf libdali2-web-engine-chromium-plugin.so libdali2-web-engine-plugin.so
265 popd
266 /sbin/ldconfig
267 exit 0
268 %endif
269
270 %post image-loader-plugin
271 /sbin/ldconfig
272 exit 0
273
274 %if 0%{?tizen_55_or_greater}
275 %post vector-animation-renderer-plugin
276 /sbin/ldconfig
277 exit 0
278 %endif
279
280 %if 0%{?tizen_65_or_greater}
281 %post vector-image-renderer-plugin
282 /sbin/ldconfig
283 exit 0
284 %endif
285
286 %post color-controller-plugin
287 /sbin/ldconfig
288 exit 0
289
290 %if 0%{?tizen_55_or_greater}
291 %post web-engine-lwe-plugin
292 /sbin/ldconfig
293 exit 0
294 %endif
295
296 ##############################
297 #   Pre Uninstall old package
298 ##############################
299 %preun
300 exit 0
301
302 ##############################
303 #   Post Uninstall old package
304 ##############################
305 %postun
306 /sbin/ldconfig
307 exit 0
308
309 %postun key-extension
310 /sbin/ldconfig
311 exit 0
312
313 %postun video-player-plugin
314 /sbin/ldconfig
315 exit 0
316
317 %if 0%{?tizen_55_or_greater}
318 %postun web-engine-chromium-plugin
319 /sbin/ldconfig
320 exit 0
321 %endif
322
323 %postun image-loader-plugin
324 /sbin/ldconfig
325 exit 0
326
327 %if 0%{?tizen_55_or_greater}
328 %postun vector-animation-renderer-plugin
329 /sbin/ldconfig
330 exit 0
331 %endif
332
333 %if 0%{?tizen_65_or_greater}
334 %postun vector-image-renderer-plugin
335 /sbin/ldconfig
336 exit 0
337 %endif
338
339 %postun color-controller-plugin
340 /sbin/ldconfig
341 exit 0
342
343 %if 0%{?tizen_55_or_greater}
344 %postun web-engine-lwe-plugin
345 /sbin/ldconfig
346 exit 0
347 %endif
348
349 ##############################
350 # Files in Binary Packages
351 ##############################
352
353 %files
354 %manifest dali-extension.manifest
355 %defattr(-,root,root,-)
356 %{_sysconfdir}/profile.d/dali.sh
357 %{_libdir}/libdali2-extension.so*
358 %license LICENSE
359
360 %files devel
361 %defattr(-,root,root,-)
362 %{_includedir}/dali-extension/*
363 %{_libdir}/pkgconfig/*.pc
364
365 %files key-extension
366 %manifest dali-extension.manifest
367 %defattr(-,root,root,-)
368 %{_libdir}/libdali2-key-extension.so*
369 %license LICENSE
370
371 %files video-player-plugin
372 %manifest dali-extension.manifest
373 %defattr(-,root,root,-)
374 %{_libdir}/libdali2-video-player-plugin.so*
375 %license LICENSE
376
377 %if 0%{?tizen_55_or_greater}
378 %files web-engine-chromium-plugin
379 %manifest dali-extension.manifest
380 %defattr(-,root,root,-)
381 %{_libdir}/libdali2-web-engine-chromium-plugin.so*
382 %license LICENSE
383 %endif
384
385 %if 0%{?use_image_loader}
386 %files image-loader-plugin
387 %manifest dali-extension.manifest
388 %defattr(-,root,root,-)
389 %{_libdir}/libdali2-image-loader-plugin.so*
390 %license LICENSE
391 %endif
392
393 %if 0%{?tizen_55_or_greater}
394 %files vector-animation-renderer-plugin
395 %manifest dali-extension.manifest
396 %defattr(-,root,root,-)
397 %{_libdir}/libdali2-vector-animation-renderer-plugin.so*
398 %license LICENSE
399 %endif
400
401 %if 0%{?tizen_65_or_greater}
402 %files vector-image-renderer-plugin
403 %manifest dali-extension.manifest
404 %defattr(-,root,root,-)
405 %{_libdir}/libdali2-vector-image-renderer-plugin.so*
406 %license LICENSE
407 %endif
408
409 %files color-controller-plugin
410 %manifest dali-extension.manifest
411 %defattr(-,root,root,-)
412 %{_libdir}/libdali2-color-controller-plugin.so*
413 %license LICENSE
414
415 %if 0%{?tizen_55_or_greater}
416 %files web-engine-lwe-plugin
417 %manifest dali-extension.manifest
418 %defattr(-,root,root,-)
419 %{_libdir}/libdali2-web-engine-lwe-plugin.so*
420 %license LICENSE
421 %endif