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