54afd221b8faafebe612f13fc7d036f6e57450a4
[platform/core/uifw/dali-adaptor.git] / packaging / dali-adaptor.spec
1 # NOTES
2 # This spec file is used to build DALi Adaptor for different Tizen Profiles
3 # Current profiles are:  Mobile, TV, Wearable, Common
4 #
5 # The profile variable is defined outside of the spec file in a build.conf file.
6 # It will contain the profile and whether or not to build with X11 or Wayland
7 #
8 # gbs will try to download the build.conf for the platform automatically from the repo location when
9 # performing a gbs build ( use gbs build -v to see it download location) E.g.
10 # http://download.tizen.org/snapshots/tizen/tv/tizen-tv/repos/arm-wayland/packages/repodata/xxxx-build.conf.gz
11
12 # Do not provide .so automatically for the extensions.
13 # This if statement is for backward compatibility with GBM/Obsolete build systems
14 %if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
15 %global __provides_exclude_from ^.*\\.(wearable|mobile|tv|ivi|common)$
16 %endif
17
18 %bcond_with wayland
19
20 Name:       dali-adaptor
21 Summary:    The DALi Tizen Adaptor
22 Version:    1.2.54
23 Release:    1
24 Group:      System/Libraries
25 License:    Apache-2.0 and BSD-3-Clause and MIT
26 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
27 Source0:    %{name}-%{version}.tar.gz
28
29 Requires(post): /sbin/ldconfig
30 Requires(postun): /sbin/ldconfig
31 Requires:       giflib
32
33 #need libtzplatform-config for directory if tizen version is 3.x
34
35 %if 0%{?tizen_version_major} >= 3
36 %define tizen_platform_config_supported 1
37 BuildRequires:  pkgconfig(libtzplatform-config)
38 %endif
39
40 # Get the profile from tizen_profile_name if tizen version is 2.x and tizen_profile_name exists.
41
42 %if "%{tizen_version_major}" == "2" && 0%{?tizen_profile_name:1}
43 %define profile %{tizen_profile_name}
44 %endif
45
46 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
47 # if wearable || "undefined"
48 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
49 BuildRequires:  pkgconfig(capi-appfw-watch-application)
50 BuildRequires:  pkgconfig(appcore-watch)
51 BuildRequires:  pkgconfig(screen_connector_provider)
52 %endif
53
54 BuildRequires:  pkgconfig(gles20)
55 BuildRequires:  pkgconfig(glesv2)
56
57 BuildRequires:  pkgconfig
58 BuildRequires:  gawk
59 BuildRequires:  giflib-devel
60 BuildRequires:  pkgconfig(fontconfig)
61 BuildRequires:  libjpeg-turbo-devel
62 BuildRequires:  dali-devel
63 BuildRequires:  dali-integration-devel
64 BuildRequires:  pkgconfig(vconf)
65 BuildRequires:  tts-devel
66 BuildRequires:  pkgconfig(dlog)
67 BuildRequires:  libdrm-devel
68 BuildRequires:  pkgconfig(libexif)
69 BuildRequires:  pkgconfig(libpng)
70 BuildRequires:  pkgconfig(egl)
71 BuildRequires:  libcurl-devel
72 BuildRequires:  pkgconfig(harfbuzz)
73 BuildRequires:  fribidi-devel
74
75 BuildRequires:  pkgconfig(capi-system-info)
76 BuildRequires:  pkgconfig(capi-system-sensor)
77
78 %if %{with wayland}
79
80 ####### BUILDING FOR WAYLAND #######
81 BuildRequires:  pkgconfig(wayland-egl)
82 BuildRequires:  pkgconfig(wayland-client)
83 BuildRequires:  wayland-devel
84 BuildRequires:  wayland-extension-client-devel
85
86 # dali-adaptor uses ecore mainloop
87 BuildRequires:  pkgconfig(ecore-wayland)
88
89 # dali-adaptor needs tbm_surface in tizen 3.0 wayland
90 BuildRequires:  pkgconfig(libtbm)
91
92 # tpkp-curl (certificate pinning for libcurl functions) is only available in Tizen 3.0
93 BuildRequires:  pkgconfig(tpkp-curl)
94
95 ####### BUILDING FOR X11#######
96 %else
97 BuildRequires:  pkgconfig(egl)
98 BuildRequires:  pkgconfig(xext)
99 BuildRequires:  pkgconfig(xi)
100 BuildRequires:  pkgconfig(xfixes)
101 BuildRequires:  pkgconfig(xdamage)
102 BuildRequires:  pkgconfig(utilX)
103 %endif
104
105 # for dali-adaptor
106 BuildRequires:  pkgconfig(evas)
107
108 %if 0%{?tizen_version_major} == 3
109 BuildRequires:  pkgconfig(capi-appfw-application)
110 BuildRequires:  pkgconfig(elementary)
111 %else
112 BuildRequires:  pkgconfig(bundle)
113 BuildRequires:  pkgconfig(appcore-ui)
114 BuildRequires:  pkgconfig(appcore-multiwindow)
115 BuildRequires:  pkgconfig(capi-appfw-app-common)
116 BuildRequires:  pkgconfig(capi-appfw-app-control)
117 BuildRequires:  pkgconfig(screen_connector_provider)
118 BuildRequires:  pkgconfig(ecore-imf)
119 %endif
120
121 BuildRequires:  pkgconfig(capi-system-system-settings)
122
123 # for feedback plugin
124 BuildRequires:  pkgconfig(mm-sound)
125 %if 0%{?tizen_version_major} >= 3
126 BuildRequires:  pkgconfig(feedback)
127 %endif
128
129 # for videoplayer Plugin
130 BuildRequires:  pkgconfig(capi-media-player)
131
132 # for Web Engine Lite Plugin
133 %if 0%{?enable_web_engine_lite}
134 BuildRequires: lightweight-web-engine
135 %endif
136
137 # for multiprofile
138 Requires:   %{name}-compat = %{version}-%{release}
139 Recommends: %{name}-profile_common = %{version}-%{release}
140
141 %description
142 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
143 platform abstraction and application shell
144
145 ###########################################
146 # Dali adapter for profiles
147 ###########################################
148
149 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
150 # if mobile || "undefined"
151 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
152 %package profile_mobile
153 Summary:        The DALi Tizen Adaptor for mobile
154 Provides:       %{name}-compat = %{version}-%{release}
155 Conflicts:      %{name}-profile_tv
156 Conflicts:      %{name}-profile_wearable
157 Conflicts:      %{name}-profile_ivi
158 Conflicts:      %{name}-profile_common
159 %description profile_mobile
160 The DALi Tizen Adaptor for mobile.
161 %endif
162
163 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
164 # if tv ||"undefined"
165 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
166 %package profile_tv
167 Summary:        The DALi Tizen Adaptor for tv
168 Provides:       %{name}-compat = %{version}-%{release}
169 Conflicts:      %{name}-profile_mobile
170 Conflicts:      %{name}-profile_wearable
171 Conflicts:      %{name}-profile_ivi
172 Conflicts:      %{name}-profile_common
173 %description profile_tv
174 The DALi Tizen Adaptor for tv.
175 %endif
176
177 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
178 # if wearable || "undefined"
179 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
180 %package profile_wearable
181 Summary:        The DALi Tizen Adaptor for wearable
182 Provides:       %{name}-compat = %{version}-%{release}
183 Conflicts:      %{name}-profile_mobile
184 Conflicts:      %{name}-profile_tv
185 Conflicts:      %{name}-profile_ivi
186 Conflicts:      %{name}-profile_common
187 %description profile_wearable
188 The DALi Tizen Adaptor for wearable.
189 %endif
190
191 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
192 # if ivi ||"undefined"
193 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
194 %package profile_ivi
195 Summary:        The DALi Tizen Adaptor for ivi
196 Provides:       %{name}-compat = %{version}-%{release}
197 Conflicts:      %{name}-profile_mobile
198 Conflicts:      %{name}-profile_wearable
199 Conflicts:      %{name}-profile_tv
200 Conflicts:      %{name}-profile_common
201 %description profile_ivi
202 The DALi Tizen Adaptor for ivi.
203 %endif
204
205 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
206 # if common ||"undefined"
207 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
208 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
209 %package profile_common
210 %define tizen_2_2_compatibility 0
211 Summary:        The DALi Tizen Adaptor for common
212 Provides:       %{name}-compat = %{version}-%{release}
213 Conflicts:      %{name}-profile_mobile
214 Conflicts:      %{name}-profile_wearable
215 Conflicts:      %{name}-profile_tv
216 Conflicts:      %{name}-profile_ivi
217 %description profile_common
218 The DALi Tizen Adaptor for common.
219 %endif
220
221 ##############################
222 # devel
223 ##############################
224 %package devel
225 Summary:    Development components for the DALi Tizen Adaptor
226 Group:      Development/Building
227 Requires:   %{name} = %{version}-%{release}
228 Requires:   %{name}-integration-devel = %{version}-%{release}
229
230 %description devel
231 Development components for the DALi Tizen Adaptor - public headers and package configs
232
233 ##############################
234 # integration-devel
235 ##############################
236 %package integration-devel
237 Summary:    Integration development package for the Adaptor
238 Group:      Development/Building
239 Requires:   %{name} = %{version}-%{release}
240
241 %description integration-devel
242 Integration development package for the Adaptor - headers for integrating with an adaptor library.
243
244 ##############################
245 # Dali Feedback Plugin
246 ##############################
247 %package dali-feedback-plugin
248 Summary:    Plugin to play haptic and audio feedback for Dali
249 Group:      System/Libraries
250 Requires:   %{name} = %{version}-%{release}
251 %description dali-feedback-plugin
252 Feedback plugin to play haptic and audio feedback for Dali
253
254 ##############################
255 # Dali VideoPlayer Plugin
256 ##############################
257 %if %{with wayland}
258
259 %package dali-video-player-plugin
260 Summary:    Plugin to play a video file for Dali
261 Group:      System/Libraries
262 %description dali-video-player-plugin
263 VideoPlayer plugin to play a video file for Dali
264 %endif
265
266 ##############################
267 # Dali WebEngineLite Plugin
268 ##############################
269
270 %package dali-web-engine-lite-plugin
271 Summary:    Plugin WebEngineLite for Dali
272 Group:      System/Libraries
273 %description dali-web-engine-lite-plugin
274 WebEngineLite plugin for Dali
275
276 ##############################
277 # Preparation
278 ##############################
279 %prep
280 %setup -q
281
282 #Use TZ_PATH when tizen version is 3.x or greater
283
284 %if 0%{?tizen_version_major} >= 3
285 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
286 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
287 %define font_preloaded_path      %TZ_SYS_RO_SHARE/fonts/
288 %define font_downloaded_path     %TZ_SYS_SHARE/fonts/
289 %define font_application_path    %TZ_SYS_RO_SHARE/app_fonts/
290 %define font_configuration_file  %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
291 %else
292 %define dali_data_rw_dir         /usr/share/dali/
293 %define dali_data_ro_dir         /usr/share/dali/
294 %define font_preloaded_path      /usr/share/fonts/
295 %define font_downloaded_path     /opt/share/fonts/
296 %define font_application_path    /usr/share/app_fonts/
297 %define font_configuration_file  /opt/etc/fonts/conf.avail/99-slp.conf
298 %endif
299
300 %define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
301 %define dali_plugin_sound_files  /plugins/sounds/
302 %define dev_include_path %{_includedir}
303
304 ##############################
305 # Build
306 ##############################
307 %build
308 PREFIX+="/usr"
309 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
310 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
311
312 %ifarch %{arm}
313 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
314 %endif
315
316 %if %{with wayland}
317 CFLAGS+=" -DWAYLAND"
318 CXXFLAGS+=" -DWAYLAND"
319 configure_flags="--enable-wayland"
320 %endif
321
322 # Use this conditional when Tizen version is 4.x or greater
323 %if 0%{?tizen_version_major} >= 4
324 CXXFLAGS+=" -DOVER_TIZEN_VERSION_4"
325 %endif
326
327 %if 0%{?tizen_2_2_compatibility}
328 CFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
329 CXXFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
330 %endif
331
332 libtoolize --force
333 cd %{_builddir}/%{name}-%{version}/build/tizen
334 autoreconf --install
335
336 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
337 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"  ; export DALI_DATA_RO_DIR
338 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
339 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
340 FONT_APPLICATION_PATH="%{font_application_path}"  ; export FONT_APPLICATION_PATH
341 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
342 %if 0%{?tizen_platform_config_supported}
343 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
344 %endif
345
346 # Default to GLES 2.0 if not specified.
347 %define target_gles_version 20
348
349 # Set up the build via configure.
350 #######################################################################
351 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
352 # if mobile || "undefined"
353 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
354
355 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
356            --enable-shaderbincache=DISABLE --enable-profile=MOBILE \
357            --enable-tizen-major-version=%{tizen_version_major} \
358 %if 0%{?tizen_version_major} >= 3
359            --enable-feedback \
360 %endif
361            --enable-videoplayer \
362 %if 0%{?tizen_2_2_compatibility}
363            --with-tizen-2-2-compatibility \
364 %endif
365 %if %{with wayland}
366            --enable-efl=no \
367 %else
368            --enable-efl=yes \
369 %endif
370 %if 0%{?enable_web_engine_lite}
371            --enable-web-engine-lite \
372 %endif
373 %if 0%{?enable_debug}
374            --enable-debug \
375 %endif
376            --enable-appfw=yes \
377            $configure_flags --libdir=%{_libdir}
378
379 # Build.
380 make %{?jobs:-j%jobs}
381
382 pushd %{_builddir}/%{name}-%{version}/build/tizen
383 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
384 popd
385
386 pushd %{buildroot}%{_libdir}
387 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
388 popd
389
390 make clean
391
392 %endif
393
394 #######################################################################
395 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
396 # if tv ||"undefined"
397 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
398
399 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
400            --enable-shaderbincache=DISABLE --enable-profile=TV \
401            --enable-tizen-major-version=%{tizen_version_major} \
402 %if 0%{?tizen_version_major} >= 3
403            --enable-feedback \
404 %endif
405            --enable-videoplayer \
406 %if 0%{?tizen_2_2_compatibility}
407            --with-tizen-2-2-compatibility \
408 %endif
409 %if %{with wayland}
410            --enable-efl=no \
411 %else
412            --enable-efl=yes \
413 %endif
414 %if 0%{?enable_web_engine_lite}
415            --enable-web-engine-lite \
416 %endif
417 %if 0%{?enable_debug}
418            --enable-debug \
419 %endif
420            --enable-appfw=yes \
421            $configure_flags --libdir=%{_libdir}
422
423 # Build.
424 make %{?jobs:-j%jobs}
425
426 pushd %{_builddir}/%{name}-%{version}/build/tizen
427 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
428 popd
429
430 pushd %{buildroot}%{_libdir}
431 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
432 popd
433
434 make clean
435 %endif
436
437 #######################################################################
438 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
439 # if wearable || "undefined"
440 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
441
442 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
443            --enable-shaderbincache=DISABLE --enable-profile=WEARABLE \
444            --enable-tizen-major-version=%{tizen_version_major} \
445 %if 0%{?tizen_version_major} >= 3
446            --enable-feedback \
447 %endif
448            --enable-videoplayer \
449 %if 0%{?tizen_2_2_compatibility}
450            --with-tizen-2-2-compatibility \
451 %endif
452 %if %{with wayland}
453            --enable-efl=no \
454 %else
455            --enable-efl=yes \
456 %endif
457 %if 0%{?enable_web_engine_lite}
458            --enable-web-engine-lite \
459 %endif
460 %if 0%{?enable_debug}
461            --enable-debug \
462 %endif
463            --enable-appfw=yes \
464            $configure_flags --libdir=%{_libdir}
465
466 # Build.
467 make %{?jobs:-j%jobs}
468
469 pushd %{_builddir}/%{name}-%{version}/build/tizen
470 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
471 popd
472
473 pushd %{buildroot}%{_libdir}
474 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
475 popd
476
477 make clean
478 %endif
479
480 #######################################################################
481 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
482 # if ivi ||"undefined"
483 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
484
485 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
486            --enable-shaderbincache=DISABLE --enable-profile=IVI \
487            --enable-tizen-major-version=%{tizen_version_major} \
488 %if 0%{?tizen_version_major} >= 3
489            --enable-feedback \
490 %endif
491            --enable-videoplayer \
492 %if 0%{?tizen_2_2_compatibility}
493            --with-tizen-2-2-compatibility \
494 %endif
495 %if %{with wayland}
496            --enable-efl=no \
497 %else
498            --enable-efl=yes \
499 %endif
500 %if 0%{?enable_web_engine_lite}
501            --enable-web-engine-lite \
502 %endif
503 %if 0%{?enable_debug}
504            --enable-debug \
505 %endif
506            --enable-appfw=yes \
507            $configure_flags --libdir=%{_libdir}
508
509 # Build.
510 make %{?jobs:-j%jobs}
511
512 pushd %{_builddir}/%{name}-%{version}/build/tizen
513 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
514 popd
515
516 pushd %{buildroot}%{_libdir}
517 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
518 popd
519
520 make clean
521 %endif
522
523 #######################################################################
524 # common ( build dali_videoplayer_plugin for common uses )
525 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
526 # if common ||"undefined"
527 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
528
529 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
530            --enable-shaderbincache=DISABLE --enable-profile=COMMON \
531            --enable-tizen-major-version=%{tizen_version_major} \
532 %if 0%{?tizen_version_major} >= 3
533            --enable-feedback \
534 %endif
535            --enable-videoplayer \
536 %if 0%{?tizen_2_2_compatibility}
537            --with-tizen-2-2-compatibility \
538 %endif
539 %if %{with wayland}
540            --enable-efl=no \
541 %else
542            --enable-efl=yes \
543 %endif
544 %if 0%{?enable_web_engine_lite}
545            --enable-web-engine-lite \
546 %endif
547 %if 0%{?enable_debug}
548            --enable-debug \
549 %endif
550            --enable-appfw=yes \
551            $configure_flags --libdir=%{_libdir}
552
553 # Build.
554 make %{?jobs:-j%jobs}
555
556 %endif
557
558
559 ##############################
560 # Installation
561 ##############################
562 %install
563 rm -rf %{buildroot}
564
565 pushd %{_builddir}/%{name}-%{version}/build/tizen
566 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
567
568
569 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
570 # !unified && (wearable || tv || ivi || mobile)
571 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
572 rm -rf %{buildroot}%{_libdir}/libdali-adap*.so*
573 %endif
574
575 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
576 # wearable || tv || ivi || mobile || unified
577 %if "%{?profile}" != "common"
578 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
579 %endif
580 popd
581
582 ##############################
583 # Upgrade order:
584 # 1 - Pre Install new package
585 # 2 - Install new package
586 # 3 - Post install new package
587 # 4 - Pre uninstall old package
588 # 5 - Remove files not overwritten by new package
589 # 6 - Post uninstall old package
590 ##############################
591
592 %pre
593 exit 0
594
595 ##############################
596 #  Post Install new package
597 ##############################
598 %post
599 /sbin/ldconfig
600 exit 0
601
602 ##############################
603 #  Pre Uninstall old package
604 ##############################
605 %preun
606 exit 0
607
608 ##############################
609 #  Post Uninstall old package
610 ##############################
611 %postun
612 /sbin/ldconfig
613 exit 0
614
615 %if %{with wayland}
616 %post dali-video-player-plugin
617 /sbin/ldconfig
618 exit 0
619 %endif
620
621 %if %{with wayland}
622 %postun dali-video-player-plugin
623 /sbin/ldconfig
624 exit 0
625 %endif
626
627 #%if %{with wayland}
628 %post dali-web-engine-lite-plugin
629 /sbin/ldconfig
630 exit 0
631 #%endif
632
633 ##############################
634
635 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
636 # if mobile || "undefined"
637 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
638 %post profile_mobile
639 pushd %{_libdir}
640 for FILE in libdali-adap*.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
641 popd
642 /sbin/ldconfig
643 exit 0
644
645 %postun profile_mobile
646 /sbin/ldconfig
647 exit 0
648 %endif
649
650 ##############################
651
652 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
653 # if tv ||"undefined"
654 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
655 %post profile_tv
656 pushd %{_libdir}
657 for FILE in libdali-adap*.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
658 popd
659 /sbin/ldconfig
660 exit 0
661
662 %postun profile_tv
663 /sbin/ldconfig
664 exit 0
665 %endif
666
667 ##############################
668
669 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
670 # if wearable || "undefined"
671 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
672 %post profile_wearable
673 pushd %{_libdir}
674 for FILE in libdali-adap*.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
675 popd
676 /sbin/ldconfig
677 exit 0
678
679 %postun profile_wearable
680 /sbin/ldconfig
681 exit 0
682 %endif
683
684 ##############################
685
686 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
687 # if ivi ||"undefined"
688 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
689 %post profile_ivi
690 pushd %{_libdir}
691 for FILE in libdali-adap*.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
692 popd
693 /sbin/ldconfig
694 exit 0
695
696 %postun profile_ivi
697 /sbin/ldconfig
698 exit 0
699 %endif
700
701
702 ##############################
703 # Files in Binary Packages
704 ##############################
705
706 %files
707 %manifest dali-adaptor.manifest
708 %defattr(-,root,root,-)
709 %defattr(-,app,app,-)
710 %dir %{user_shader_cache_dir}
711 %{_bindir}/*
712 %license LICENSE
713
714 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
715 # if common ||"undefined"
716 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
717 %defattr(-,root,root,-)
718 %{_libdir}/libdali-adap*.so*
719 %exclude %{_libdir}/libdali-adap*.so*.mobile
720 %exclude %{_libdir}/libdali-adap*.so*.wearable
721 %exclude %{_libdir}/libdali-adap*.so*.tv
722 %exclude %{_libdir}/libdali-adap*.so*.ivi
723 %endif
724
725 %if %{with wayland}
726 %files dali-video-player-plugin
727 %manifest dali-adaptor.manifest
728 %defattr(-,root,root,-)
729 %{_libdir}/libdali-video-player-plugin.so*
730 %license LICENSE
731 %endif
732
733 %if 0%{?tizen_version_major} >= 3
734 %if 0%{?enable_web_engine_lite}
735 %files dali-web-engine-lite-plugin
736 %manifest dali-adaptor.manifest
737 %defattr(-,root,root,-)
738 %{_libdir}/libdali-web-engine-lite-plugin.so*
739 %license LICENSE
740 %endif
741
742 %files dali-feedback-plugin
743 %manifest dali-adaptor.manifest
744 %defattr(-,root,root,-)
745 %{_libdir}/libdali-feedback-plugin.so*
746 %{dali_plugin_sound_files}/*
747 %endif
748
749 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
750 # if common ||"undefined"
751 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
752 %files profile_common
753 # default .so files are housed in the main pkg.
754 %endif
755
756 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
757 # if mobile || "undefined"
758 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
759 %files profile_mobile
760 %manifest dali-adaptor.manifest
761 %defattr(-,root,root,-)
762 %{_libdir}/libdali-adap*.so*.mobile
763 %endif
764
765 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
766 # if tv ||"undefined"
767 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
768 %files profile_tv
769 %manifest dali-adaptor.manifest
770 %defattr(-,root,root,-)
771 %{_libdir}/libdali-adap*.so*.tv
772 %endif
773
774 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
775 # if wearable || "undefined"
776 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
777 %files profile_wearable
778 %manifest dali-adaptor.manifest
779 %defattr(-,root,root,-)
780 %{_libdir}/libdali-adap*.so*.wearable
781 %endif
782
783 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
784 # if ivi ||"undefined"
785 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
786 %files profile_ivi
787 %manifest dali-adaptor.manifest
788 %defattr(-,root,root,-)
789 %{_libdir}/libdali-adap*.so*.ivi
790 %endif
791
792
793 %files devel
794 %defattr(-,root,root,-)
795 %{dev_include_path}/dali/dali.h
796 %{dev_include_path}/dali/public-api/*
797 %{dev_include_path}/dali/devel-api/*
798 %{dev_include_path}/dali/doc/*
799 %{_libdir}/pkgconfig/dali-adaptor.pc
800
801 %files integration-devel
802 %defattr(-,root,root,-)
803 %{dev_include_path}/dali/integration-api/adaptors/*
804 %{_libdir}/pkgconfig/dali-adaptor-integration.pc