Revert "[Tizen] Import Extension::Capture to support backward compatibility"
[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:       dali-extension
9 Summary:    The DALi Tizen Extensions
10 Version:    1.4.22
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(dali-core)
22 BuildRequires:  pkgconfig(dali-adaptor)
23 BuildRequires:  pkgconfig(dali-toolkit)
24 BuildRequires:  pkgconfig(dlog)
25
26 # For evas-plugin
27 BuildRequires:  pkgconfig(dali-adaptor-integration)
28 BuildRequires:  pkgconfig(elementary)
29 BuildRequires:  pkgconfig(evas)
30 BuildRequires:  pkgconfig(ecore-wl2)
31
32
33 %description
34 dali-extension
35
36 %if 0%{?tizen_version_major} >= 4
37 %define tizen_40_or_greater 1
38 %if 0%{?tizen_version_major} >= 5
39 %define tizen_50_or_greater 1
40 %if 0%{?tizen_version_minor} >= 5
41 %define tizen_55_or_greater 1
42 %endif
43 %endif
44 %endif
45
46 ##############################
47 # devel
48 ##############################
49 %package devel
50 Summary:    Development components for the DALi Extension
51 Group:      Development/Building
52 Requires:   %{name} = %{version}-%{release}
53
54 %description devel
55 Development components for the DALi Tizen Extensions - public headers and package configs
56
57 ##############################
58 # Dali Key Extension
59 ##############################
60
61 %package key-extension
62 Summary:    Plugin to support extension keys for Dali
63 Group:      System/Libraries
64
65 %description key-extension
66 Plugin to support extension keys for Dali
67
68 ##############################
69 # Dali VideoPlayer Plugin
70 ##############################
71
72 %package video-player-plugin
73 Summary:    Plugin to play a video file for Dali
74 Group:      System/Libraries
75 BuildRequires: pkgconfig(capi-media-player)
76 BuildRequires: pkgconfig(capi-system-info)
77 # dali-adaptor uses ecore mainloop
78 %if 0%{?tizen_version_major} >= 5
79 BuildRequires:  pkgconfig(ecore-wl2)
80 %else
81 BuildRequires:  pkgconfig(ecore-wayland)
82 %endif
83
84 %description video-player-plugin
85 VideoPlayer plugin to play a video file for Dali
86
87 ##############################
88 # Dali Web Engine chromium Plugin
89 ##############################
90
91 %package web-engine-chromium-plugin
92 Summary:    Plugin to support WebView for Dali
93 Group:      System/Libraries
94 %if 0%{?tizen_55_or_greater}
95 BuildRequires: pkgconfig(libtbm)
96 BuildRequires: pkgconfig(chromium-efl)
97 BuildRequires: pkgconfig(elementary)
98 %endif
99
100 %description web-engine-chromium-plugin
101 Web Engine chromium plugin to support WebView for Dali
102
103 ##############################
104 # Dali Image Loader Plugin
105 ##############################
106
107 %package image-loader-plugin
108 Summary:    Plugin to image loading for Dali
109 Group:      System/Libraries
110
111 %description image-loader-plugin
112 Image Loader plugin to image loading file for Dali
113
114 ####################################
115 # Vector Animation Renderer Plugin
116 ####################################
117 %package vector-animation-renderer-plugin
118 Summary:    Plugin to render a vector animation
119 Group:      System/Libraries
120 %if 0%{?tizen_55_or_greater}
121 BuildRequires:  pkgconfig(rlottie)
122 %endif
123
124 %description vector-animation-renderer-plugin
125 Plugin to render a vector animation
126
127 ####################################
128 # color controller Plugin
129 ####################################
130
131 %package color-controller-plugin
132 Summary:    Plugin to load color theme
133 Group:      System/Libraries
134
135 %description color-controller-plugin
136 Plugin to load color theme
137
138 ##############################
139 # Dali Web Engine LWE Plugin
140 ##############################
141
142 %package web-engine-lwe-plugin
143 Summary:    Plugin to support WebView for Dali
144 Group:      System/Libraries
145 %if 0%{?tizen_55_or_greater}
146 BuildRequires: pkgconfig(libtbm)
147 BuildRequires: pkgconfig(lightweight-web-engine)
148 %endif
149
150 %description web-engine-lwe-plugin
151 Web Engine LWE(Light-weight Web Engine) plugin to support WebView for Dali
152
153 ##############################
154 # Preparation
155 ##############################
156 %prep
157 %setup -q
158
159 #Use TZ_PATH when tizen version is 3.x or greater
160
161 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
162 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
163 %define dev_include_path %{_includedir}
164
165 # Use Image Loader Plugin
166 %define use_image_loader 0
167
168 ##############################
169 # Build
170 ##############################
171 %build
172 PREFIX+="/usr"
173 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
174 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
175
176 %if 0%{?tizen_version_major} >= 5
177 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
178 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
179 configure_flags="--enable-ecore-wl2"
180 %endif
181
182 libtoolize --force
183 cd %{_builddir}/%{name}-%{version}/build/tizen
184 autoreconf --install
185
186 %configure --prefix=$PREFIX \
187 %if 0%{?tizen_50_or_greater}
188            --with-tizen-50-or-greater \
189 %endif
190 %if 0%{?tizen_55_or_greater}
191            --with-tizen-55-or-greater \
192 %endif
193            --enable-ecore-wl2 \
194            --enable-keyextension
195 %if 0%{?use_image_loader}
196 %configure \
197            --enable-imageloader-extension
198 %endif
199
200 make %{?jobs:-j%jobs}
201
202 ##############################
203 # Installation
204 ##############################
205 %install
206 rm -rf %{buildroot}
207
208 # install dali.sh
209 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
210 install -m 0644 scripts/dali.sh %{buildroot}%{_sysconfdir}/profile.d
211
212 cd build/tizen
213 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
214
215 %pre
216 exit 0
217
218 ##############################
219 #  Post Install new package
220 ##############################
221 %post
222 /sbin/ldconfig
223 exit 0
224
225 %post key-extension
226 /sbin/ldconfig
227 exit 0
228
229 %post video-player-plugin
230 /sbin/ldconfig
231 exit 0
232
233 %if 0%{?tizen_55_or_greater}
234 %post web-engine-chromium-plugin
235 pushd %{_libdir}
236 ln -sf libdali-web-engine-chromium-plugin.so libdali-web-engine-plugin.so
237 popd
238 /sbin/ldconfig
239 exit 0
240 %endif
241
242 %post image-loader-plugin
243 /sbin/ldconfig
244 exit 0
245
246 %if 0%{?tizen_55_or_greater}
247 %post vector-animation-renderer-plugin
248 /sbin/ldconfig
249 exit 0
250 %endif
251
252 %post color-controller-plugin
253 /sbin/ldconfig
254 exit 0
255
256 %if 0%{?tizen_55_or_greater}
257 %post web-engine-lwe-plugin
258 /sbin/ldconfig
259 exit 0
260 %endif
261
262 ##############################
263 #   Pre Uninstall old package
264 ##############################
265 %preun
266 exit 0
267
268 ##############################
269 #   Post Uninstall old package
270 ##############################
271 %postun
272 /sbin/ldconfig
273 exit 0
274
275 %postun key-extension
276 /sbin/ldconfig
277 exit 0
278
279 %postun video-player-plugin
280 /sbin/ldconfig
281 exit 0
282
283 %if 0%{?tizen_55_or_greater}
284 %postun web-engine-chromium-plugin
285 /sbin/ldconfig
286 exit 0
287 %endif
288
289 %postun image-loader-plugin
290 /sbin/ldconfig
291 exit 0
292
293 %if 0%{?tizen_55_or_greater}
294 %postun vector-animation-renderer-plugin
295 /sbin/ldconfig
296 exit 0
297 %endif
298
299 %postun color-controller-plugin
300 /sbin/ldconfig
301 exit 0
302
303 %if 0%{?tizen_55_or_greater}
304 %postun web-engine-lwe-plugin
305 /sbin/ldconfig
306 exit 0
307 %endif
308
309 ##############################
310 # Files in Binary Packages
311 ##############################
312
313 %files
314 %manifest dali-extension.manifest
315 %defattr(-,root,root,-)
316 %{_sysconfdir}/profile.d/dali.sh
317 %{_libdir}/libdali-extension.so*
318 %license LICENSE
319
320 %files devel
321 %defattr(-,root,root,-)
322 %{_includedir}/%{name}/*
323 %{_libdir}/pkgconfig/*.pc
324
325 %files key-extension
326 %manifest dali-extension.manifest
327 %defattr(-,root,root,-)
328 %{_libdir}/libdali-key-extension.so*
329 %license LICENSE
330
331 %files video-player-plugin
332 %manifest dali-extension.manifest
333 %defattr(-,root,root,-)
334 %{_libdir}/libdali-video-player-plugin.so*
335 %license LICENSE
336
337 %if 0%{?tizen_55_or_greater}
338 %files web-engine-chromium-plugin
339 %manifest dali-extension.manifest
340 %defattr(-,root,root,-)
341 %{_libdir}/libdali-web-engine-chromium-plugin.so*
342 %license LICENSE
343 %endif
344
345 %if 0%{?use_image_loader}
346 %files image-loader-plugin
347 %manifest dali-extension.manifest
348 %defattr(-,root,root,-)
349 %{_libdir}/libdali-image-loader-plugin.so*
350 %license LICENSE
351 %endif
352
353 %if 0%{?tizen_55_or_greater}
354 %files vector-animation-renderer-plugin
355 %manifest dali-extension.manifest
356 %defattr(-,root,root,-)
357 %{_libdir}/libdali-vector-animation-renderer-plugin.so*
358 %license LICENSE
359 %endif
360
361 %files color-controller-plugin
362 %manifest dali-extension.manifest
363 %defattr(-,root,root,-)
364 %{_libdir}/libdali-color-controller-plugin.so*
365 %license LICENSE
366
367 %if 0%{?tizen_55_or_greater}
368 %files web-engine-lwe-plugin
369 %manifest dali-extension.manifest
370 %defattr(-,root,root,-)
371 %{_libdir}/libdali-web-engine-lwe-plugin.so*
372 %license LICENSE
373 %endif