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