[Tizen] Added 'make clean' on each profile build.
[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(appcore-ui)
113 BuildRequires:  pkgconfig(capi-appfw-app-common)
114 BuildRequires:  pkgconfig(capi-appfw-app-control)
115 BuildRequires:  pkgconfig(ecore-imf)
116 %endif
117 BuildRequires:  pkgconfig(capi-system-system-settings)
118
119 # for feedback plugin
120 BuildRequires:  pkgconfig(mm-sound)
121 %if 0%{?tizen_version_major} >= 3
122 BuildRequires:  pkgconfig(feedback)
123 %endif
124
125 # for videoplayer Plugin
126 BuildRequires:  pkgconfig(capi-media-player)
127
128
129 # for multiprofile
130 Requires:   %{name}-compat = %{version}-%{release}
131 Recommends: %{name}-profile_common = %{version}-%{release}
132
133 %description
134 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
135 platform abstraction and application shell
136
137 ###########################################
138 # Dali adapter for profiles
139 ###########################################
140
141 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
142 # if mobile || "undefined"
143 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
144 %package profile_mobile
145 Summary:        The DALi Tizen Adaptor for mobile
146 Provides:       %{name}-compat = %{version}-%{release}
147 Conflicts:      %{name}-profile_tv
148 Conflicts:      %{name}-profile_wearable
149 Conflicts:      %{name}-profile_ivi
150 Conflicts:      %{name}-profile_common
151 %description profile_mobile
152 The DALi Tizen Adaptor for mobile.
153 %endif
154
155 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
156 # if tv ||"undefined"
157 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
158 %package profile_tv
159 Summary:        The DALi Tizen Adaptor for tv
160 Provides:       %{name}-compat = %{version}-%{release}
161 Conflicts:      %{name}-profile_mobile
162 Conflicts:      %{name}-profile_wearable
163 Conflicts:      %{name}-profile_ivi
164 Conflicts:      %{name}-profile_common
165 %description profile_tv
166 The DALi Tizen Adaptor for tv.
167 %endif
168
169 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
170 # if wearable || "undefined"
171 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
172 %package profile_wearable
173 Summary:        The DALi Tizen Adaptor for wearable
174 Provides:       %{name}-compat = %{version}-%{release}
175 Conflicts:      %{name}-profile_mobile
176 Conflicts:      %{name}-profile_tv
177 Conflicts:      %{name}-profile_ivi
178 Conflicts:      %{name}-profile_common
179 %description profile_wearable
180 The DALi Tizen Adaptor for wearable.
181 %endif
182
183 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
184 # if ivi ||"undefined"
185 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
186 %package profile_ivi
187 Summary:        The DALi Tizen Adaptor for ivi
188 Provides:       %{name}-compat = %{version}-%{release}
189 Conflicts:      %{name}-profile_mobile
190 Conflicts:      %{name}-profile_wearable
191 Conflicts:      %{name}-profile_tv
192 Conflicts:      %{name}-profile_common
193 %description profile_ivi
194 The DALi Tizen Adaptor for ivi.
195 %endif
196
197 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
198 # if common ||"undefined"
199 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
200 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
201 %package profile_common
202 %define tizen_2_2_compatibility 0
203 Summary:        The DALi Tizen Adaptor for common
204 Provides:       %{name}-compat = %{version}-%{release}
205 Conflicts:      %{name}-profile_mobile
206 Conflicts:      %{name}-profile_wearable
207 Conflicts:      %{name}-profile_tv
208 Conflicts:      %{name}-profile_ivi
209 %description profile_common
210 The DALi Tizen Adaptor for common.
211 %endif
212
213 ##############################
214 # devel
215 ##############################
216 %package devel
217 Summary:    Development components for the DALi Tizen Adaptor
218 Group:      Development/Building
219 Requires:   %{name} = %{version}-%{release}
220 Requires:   %{name}-integration-devel = %{version}-%{release}
221
222 %description devel
223 Development components for the DALi Tizen Adaptor - public headers and package configs
224
225 ##############################
226 # integration-devel
227 ##############################
228 %package integration-devel
229 Summary:    Integration development package for the Adaptor
230 Group:      Development/Building
231 Requires:   %{name} = %{version}-%{release}
232
233 %description integration-devel
234 Integration development package for the Adaptor - headers for integrating with an adaptor library.
235
236 ##############################
237 # Dali Feedback Plugin
238 ##############################
239 %package dali-feedback-plugin
240 Summary:    Plugin to play haptic and audio feedback for Dali
241 Group:      System/Libraries
242 Requires:   %{name} = %{version}-%{release}
243 %description dali-feedback-plugin
244 Feedback plugin to play haptic and audio feedback for Dali
245
246 ##############################
247 # Dali VideoPlayer Plugin
248 ##############################
249 %if %{with wayland}
250
251 %package dali-video-player-plugin
252 Summary:    Plugin to play a video file for Dali
253 Group:      System/Libraries
254 %description dali-video-player-plugin
255 VideoPlayer plugin to play a video file for Dali
256 %endif
257
258 ##############################
259 # Preparation
260 ##############################
261 %prep
262 %setup -q
263
264 #Use TZ_PATH when tizen version is 3.x or greater
265
266 %if 0%{?tizen_version_major} >= 3
267 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
268 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
269 %define font_preloaded_path      %TZ_SYS_RO_SHARE/fonts/
270 %define font_downloaded_path     %TZ_SYS_SHARE/fonts/
271 %define font_application_path    %TZ_SYS_RO_SHARE/app_fonts/
272 %define font_configuration_file  %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
273 %else
274 %define dali_data_rw_dir         /usr/share/dali/
275 %define dali_data_ro_dir         /usr/share/dali/
276 %define font_preloaded_path      /usr/share/fonts/
277 %define font_downloaded_path     /opt/share/fonts/
278 %define font_application_path    /usr/share/app_fonts/
279 %define font_configuration_file  /opt/etc/fonts/conf.avail/99-slp.conf
280 %endif
281
282 %define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
283 %define dali_plugin_sound_files  /plugins/sounds/
284 %define dev_include_path %{_includedir}
285
286 ##############################
287 # Build
288 ##############################
289 %build
290 PREFIX+="/usr"
291 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
292 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
293
294 %ifarch %{arm}
295 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
296 %endif
297
298 %if %{with wayland}
299 CFLAGS+=" -DWAYLAND"
300 CXXFLAGS+=" -DWAYLAND"
301 configure_flags="--enable-wayland"
302 %endif
303
304 # Use this conditional when Tizen version is 4.x or greater
305 %if 0%{?tizen_version_major} >= 4
306 CXXFLAGS+=" -DOVER_TIZEN_VERSION_4"
307 %endif
308
309 %if 0%{?tizen_2_2_compatibility}
310 CFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
311 CXXFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
312 %endif
313
314 libtoolize --force
315 cd %{_builddir}/%{name}-%{version}/build/tizen
316 autoreconf --install
317
318 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
319 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"  ; export DALI_DATA_RO_DIR
320 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
321 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
322 FONT_APPLICATION_PATH="%{font_application_path}"  ; export FONT_APPLICATION_PATH
323 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
324 %if 0%{?tizen_platform_config_supported}
325 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
326 %endif
327
328 # Default to GLES 2.0 if not specified.
329 %define target_gles_version 20
330
331 # Set up the build via configure.
332 #######################################################################
333 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
334 # if mobile || "undefined"
335 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
336
337 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
338            --enable-shaderbincache=DISABLE --enable-profile=MOBILE \
339            --enable-tizen-major-version=%{tizen_version_major} \
340 %if 0%{?tizen_version_major} >= 3
341            --enable-feedback \
342 %endif
343            --enable-videoplayer \
344 %if 0%{?tizen_2_2_compatibility}
345            --with-tizen-2-2-compatibility \
346 %endif
347 %if %{with wayland}
348            --enable-efl=no \
349 %else
350            --enable-efl=yes \
351 %endif
352 %if 0%{?enable_debug}
353            --enable-debug \
354 %endif
355            --enable-appfw=yes \
356            $configure_flags --libdir=%{_libdir}
357
358 # Build.
359 make %{?jobs:-j%jobs}
360
361 pushd %{_builddir}/%{name}-%{version}/build/tizen
362 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
363 popd
364
365 pushd %{buildroot}%{_libdir}
366 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
367 popd
368
369 make clean
370
371 %endif
372
373 #######################################################################
374 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
375 # if tv ||"undefined"
376 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
377
378 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
379            --enable-shaderbincache=DISABLE --enable-profile=TV \
380            --enable-tizen-major-version=%{tizen_version_major} \
381 %if 0%{?tizen_version_major} >= 3
382            --enable-feedback \
383 %endif
384            --enable-videoplayer \
385 %if 0%{?tizen_2_2_compatibility}
386            --with-tizen-2-2-compatibility \
387 %endif
388 %if %{with wayland}
389            --enable-efl=no \
390 %else
391            --enable-efl=yes \
392 %endif
393 %if 0%{?enable_debug}
394            --enable-debug \
395 %endif
396            --enable-appfw=yes \
397            $configure_flags --libdir=%{_libdir}
398
399 # Build.
400 make %{?jobs:-j%jobs}
401
402 pushd %{_builddir}/%{name}-%{version}/build/tizen
403 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
404 popd
405
406 pushd %{buildroot}%{_libdir}
407 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
408 popd
409
410 make clean
411 %endif
412
413 #######################################################################
414 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
415 # if wearable || "undefined"
416 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
417
418 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
419            --enable-shaderbincache=DISABLE --enable-profile=WEARABLE \
420            --enable-tizen-major-version=%{tizen_version_major} \
421 %if 0%{?tizen_version_major} >= 3
422            --enable-feedback \
423 %endif
424            --enable-videoplayer \
425 %if 0%{?tizen_2_2_compatibility}
426            --with-tizen-2-2-compatibility \
427 %endif
428 %if %{with wayland}
429            --enable-efl=no \
430 %else
431            --enable-efl=yes \
432 %endif
433 %if 0%{?enable_debug}
434            --enable-debug \
435 %endif
436            --enable-appfw=yes \
437            $configure_flags --libdir=%{_libdir}
438
439 # Build.
440 make %{?jobs:-j%jobs}
441
442 pushd %{_builddir}/%{name}-%{version}/build/tizen
443 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
444 popd
445
446 pushd %{buildroot}%{_libdir}
447 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
448 popd
449
450 make clean
451 %endif
452
453 #######################################################################
454 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
455 # if ivi ||"undefined"
456 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
457
458 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
459            --enable-shaderbincache=DISABLE --enable-profile=IVI \
460            --enable-tizen-major-version=%{tizen_version_major} \
461 %if 0%{?tizen_version_major} >= 3
462            --enable-feedback \
463 %endif
464            --enable-videoplayer \
465 %if 0%{?tizen_2_2_compatibility}
466            --with-tizen-2-2-compatibility \
467 %endif
468 %if %{with wayland}
469            --enable-efl=no \
470 %else
471            --enable-efl=yes \
472 %endif
473 %if 0%{?enable_debug}
474            --enable-debug \
475 %endif
476            --enable-appfw=yes \
477            $configure_flags --libdir=%{_libdir}
478
479 # Build.
480 make %{?jobs:-j%jobs}
481
482 pushd %{_builddir}/%{name}-%{version}/build/tizen
483 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
484 popd
485
486 pushd %{buildroot}%{_libdir}
487 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
488 popd
489
490 make clean
491 %endif
492
493 #######################################################################
494 # common ( build dali_videoplayer_plugin for common uses )
495 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
496 # if common ||"undefined"
497 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
498
499 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
500            --enable-shaderbincache=DISABLE --enable-profile=COMMON \
501            --enable-tizen-major-version=%{tizen_version_major} \
502 %if 0%{?tizen_version_major} >= 3
503            --enable-feedback \
504 %endif
505            --enable-videoplayer \
506 %if 0%{?tizen_2_2_compatibility}
507            --with-tizen-2-2-compatibility \
508 %endif
509 %if %{with wayland}
510            --enable-efl=no \
511 %else
512            --enable-efl=yes \
513 %endif
514 %if 0%{?enable_debug}
515            --enable-debug \
516 %endif
517            --enable-appfw=yes \
518            $configure_flags --libdir=%{_libdir}
519
520 # Build.
521 make %{?jobs:-j%jobs}
522
523 %endif
524
525
526 ##############################
527 # Installation
528 ##############################
529 %install
530 rm -rf %{buildroot}
531
532 pushd %{_builddir}/%{name}-%{version}/build/tizen
533 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
534
535
536 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
537 # !unified && (wearable || tv || ivi || mobile)
538 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
539 rm -rf %{buildroot}%{_libdir}/libdali-adap*.so*
540 %endif
541
542 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
543 # wearable || tv || ivi || mobile || unified
544 %if "%{?profile}" != "common"
545 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
546 %endif
547 popd
548
549 ##############################
550 # Upgrade order:
551 # 1 - Pre Install new package
552 # 2 - Install new package
553 # 3 - Post install new package
554 # 4 - Pre uninstall old package
555 # 5 - Remove files not overwritten by new package
556 # 6 - Post uninstall old package
557 ##############################
558
559 %pre
560 exit 0
561
562 ##############################
563 #  Post Install new package
564 ##############################
565 %post
566 /sbin/ldconfig
567 exit 0
568
569 ##############################
570 #  Pre Uninstall old package
571 ##############################
572 %preun
573 exit 0
574
575 ##############################
576 #  Post Uninstall old package
577 ##############################
578 %postun
579 /sbin/ldconfig
580 exit 0
581
582 %if %{with wayland}
583 %post dali-video-player-plugin
584 /sbin/ldconfig
585 exit 0
586 %endif
587
588 %if %{with wayland}
589 %postun dali-video-player-plugin
590 /sbin/ldconfig
591 exit 0
592 %endif
593
594
595 ##############################
596
597 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
598 # if mobile || "undefined"
599 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
600 %post profile_mobile
601 pushd %{_libdir}
602 for FILE in libdali-adap*.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
603 popd
604 /sbin/ldconfig
605 exit 0
606
607 %postun profile_mobile
608 /sbin/ldconfig
609 exit 0
610 %endif
611
612 ##############################
613
614 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
615 # if tv ||"undefined"
616 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
617 %post profile_tv
618 pushd %{_libdir}
619 for FILE in libdali-adap*.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
620 popd
621 /sbin/ldconfig
622 exit 0
623
624 %postun profile_tv
625 /sbin/ldconfig
626 exit 0
627 %endif
628
629 ##############################
630
631 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
632 # if wearable || "undefined"
633 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
634 %post profile_wearable
635 pushd %{_libdir}
636 for FILE in libdali-adap*.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
637 popd
638 /sbin/ldconfig
639 exit 0
640
641 %postun profile_wearable
642 /sbin/ldconfig
643 exit 0
644 %endif
645
646 ##############################
647
648 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
649 # if ivi ||"undefined"
650 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
651 %post profile_ivi
652 pushd %{_libdir}
653 for FILE in libdali-adap*.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
654 popd
655 /sbin/ldconfig
656 exit 0
657
658 %postun profile_ivi
659 /sbin/ldconfig
660 exit 0
661 %endif
662
663
664 ##############################
665 # Files in Binary Packages
666 ##############################
667
668 %files
669 %manifest dali-adaptor.manifest
670 %defattr(-,root,root,-)
671 %defattr(-,app,app,-)
672 %dir %{user_shader_cache_dir}
673 %{_bindir}/*
674 %license LICENSE
675
676 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
677 # if common ||"undefined"
678 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
679 %defattr(-,root,root,-)
680 %{_libdir}/libdali-adap*.so*
681 %exclude %{_libdir}/libdali-adap*.so*.mobile
682 %exclude %{_libdir}/libdali-adap*.so*.wearable
683 %exclude %{_libdir}/libdali-adap*.so*.tv
684 %exclude %{_libdir}/libdali-adap*.so*.ivi
685 %endif
686
687 %if %{with wayland}
688 %files dali-video-player-plugin
689 %manifest dali-adaptor.manifest
690 %defattr(-,root,root,-)
691 %{_libdir}/libdali-video-player-plugin.so*
692 %license LICENSE
693 %endif
694
695 %if 0%{?tizen_version_major} >= 3
696 %files dali-feedback-plugin
697 %manifest dali-adaptor.manifest
698 %defattr(-,root,root,-)
699 %{_libdir}/libdali-feedback-plugin.so*
700 %{dali_plugin_sound_files}/*
701 %endif
702
703 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
704 # if common ||"undefined"
705 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
706 %files profile_common
707 # default .so files are housed in the main pkg.
708 %endif
709
710 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
711 # if mobile || "undefined"
712 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
713 %files profile_mobile
714 %manifest dali-adaptor.manifest
715 %defattr(-,root,root,-)
716 %{_libdir}/libdali-adap*.so*.mobile
717 %endif
718
719 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
720 # if tv ||"undefined"
721 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
722 %files profile_tv
723 %manifest dali-adaptor.manifest
724 %defattr(-,root,root,-)
725 %{_libdir}/libdali-adap*.so*.tv
726 %endif
727
728 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
729 # if wearable || "undefined"
730 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
731 %files profile_wearable
732 %manifest dali-adaptor.manifest
733 %defattr(-,root,root,-)
734 %{_libdir}/libdali-adap*.so*.wearable
735 %endif
736
737 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
738 # if ivi ||"undefined"
739 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
740 %files profile_ivi
741 %manifest dali-adaptor.manifest
742 %defattr(-,root,root,-)
743 %{_libdir}/libdali-adap*.so*.ivi
744 %endif
745
746
747 %files devel
748 %defattr(-,root,root,-)
749 %{dev_include_path}/dali/dali.h
750 %{dev_include_path}/dali/public-api/*
751 %{dev_include_path}/dali/devel-api/*
752 %{dev_include_path}/dali/doc/*
753 %{_libdir}/pkgconfig/dali-adaptor.pc
754
755 %files integration-devel
756 %defattr(-,root,root,-)
757 %{dev_include_path}/dali/integration-api/adaptors/*
758 %{_libdir}/pkgconfig/dali-adaptor-integration.pc