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