[Tizen] Support asan build option
[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 Name:       dali2-adaptor
19 Summary:    The DALi Tizen Adaptor
20 Version:    2.3.8
21 Release:    1
22 Group:      System/Libraries
23 License:    Apache-2.0 and BSD-3-Clause and MIT
24 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
25 Source0:    %{name}-%{version}.tar.gz
26
27 Requires(post): /sbin/ldconfig
28 Requires(postun): /sbin/ldconfig
29 Requires:       giflib
30
31 %define tizen_platform_config_supported 1
32 BuildRequires:  pkgconfig(libtzplatform-config)
33
34 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
35 # if wearable || "undefined"
36 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
37 BuildRequires:  pkgconfig(capi-appfw-watch-application)
38 BuildRequires:  pkgconfig(appcore-watch)
39 %endif
40
41 BuildRequires:  pkgconfig(screen_connector_provider)
42 BuildRequires:  pkgconfig(gles20)
43 BuildRequires:  pkgconfig(glesv2)
44 BuildRequires:  pkgconfig(ttrace)
45
46 BuildRequires:  dali2-devel
47 BuildRequires:  dali2-integration-devel
48
49 BuildRequires:  pkgconfig
50 BuildRequires:  gawk
51 BuildRequires:  cmake
52 BuildRequires:  giflib-devel
53 BuildRequires:  pkgconfig(fontconfig)
54 BuildRequires:  libjpeg-turbo-devel
55 BuildRequires:  pkgconfig(vconf)
56 BuildRequires:  tts-devel
57 BuildRequires:  pkgconfig(dlog)
58 BuildRequires:  libdrm-devel
59 BuildRequires:  pkgconfig(libexif)
60 BuildRequires:  pkgconfig(libpng)
61 BuildRequires:  pkgconfig(egl)
62 BuildRequires:  libcurl-devel
63 BuildRequires:  pkgconfig(harfbuzz)
64 BuildRequires:  hyphen-devel
65 BuildRequires:  fribidi-devel
66
67 BuildRequires:  pkgconfig(capi-system-info)
68 BuildRequires:  pkgconfig(capi-system-sensor)
69
70 BuildRequires:  pkgconfig(cairo)
71
72 BuildRequires:  pkgconfig(wayland-egl)
73 BuildRequires:  pkgconfig(wayland-client)
74 BuildRequires:  pkgconfig(input-method-client)
75 BuildRequires:  wayland-devel
76 BuildRequires:  wayland-extension-client-devel
77
78 # WebP support only from Tizen 6 onwards
79 %if 0%{?tizen_version_major} >= 6
80 BuildRequires:  pkgconfig(libwebp)
81 BuildRequires:  pkgconfig(libwebpdecoder)
82 BuildRequires:  pkgconfig(libwebpdemux)
83 BuildRequires:  pkgconfig(libwebpmux)
84 %endif
85
86 # We use ecore mainloop
87 %if 0%{?tizen_version_major} >= 5
88 BuildRequires:  pkgconfig(ecore-wl2)
89 BuildRequires:  pkgconfig(wayland-egl-tizen)
90 %else
91 BuildRequires:  pkgconfig(ecore-wayland)
92 %endif
93
94 # We need tbm_surface in tizen 3.0 wayland
95 BuildRequires:  pkgconfig(libtbm)
96
97 # for the adaptor
98 BuildRequires:  pkgconfig(app-core-ui-cpp)
99 BuildRequires:  pkgconfig(appcore-widget-base)
100 BuildRequires:  pkgconfig(bundle)
101 BuildRequires:  pkgconfig(capi-appfw-app-common)
102 BuildRequires:  pkgconfig(capi-appfw-app-control)
103 BuildRequires:  pkgconfig(ecore-imf)
104
105 BuildRequires:  pkgconfig(capi-system-system-settings)
106
107 # for ATSPI (Accessibility) support
108 BuildRequires:  pkgconfig(eldbus)
109
110 # for feedback plugin
111 BuildRequires:  pkgconfig(mm-sound)
112 BuildRequires:  pkgconfig(feedback)
113 BuildRequires:  pkgconfig(component-based-core-base)
114
115
116 %if ( 0%{?tizen_version_major} == 6 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 7
117 BuildRequires:  pkgconfig(thorvg)
118 %endif
119
120 # For ASAN test
121 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
122 BuildRequires: asan-force-options
123 BuildRequires: asan-build-env
124 BuildRequires: libasan
125 %endif
126
127 # for multiprofile
128 Requires:   %{name}-compat = %{version}-%{release}
129 Recommends: %{name}-profile_common = %{version}-%{release}
130
131 %description
132 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
133 platform abstraction and application shell
134
135 ###########################################
136 # Dali adapter for profiles
137 ###########################################
138
139 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
140 # if mobile || "undefined"
141 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
142 %package profile_mobile
143 Summary:        The DALi Tizen Adaptor for mobile
144 Provides:       %{name}-compat = %{version}-%{release}
145 Conflicts:      %{name}-profile_tv
146 Conflicts:      %{name}-profile_wearable
147 Conflicts:      %{name}-profile_ivi
148 Conflicts:      %{name}-profile_common
149 Requires:       %{name}
150 %description profile_mobile
151 The DALi Tizen Adaptor for mobile.
152 %endif
153
154 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
155 # if tv ||"undefined"
156 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
157 %package profile_tv
158 Summary:        The DALi Tizen Adaptor for tv
159 Provides:       %{name}-compat = %{version}-%{release}
160 Conflicts:      %{name}-profile_mobile
161 Conflicts:      %{name}-profile_wearable
162 Conflicts:      %{name}-profile_ivi
163 Conflicts:      %{name}-profile_common
164 Requires:       %{name}
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 Requires:       %{name}
180 %description profile_wearable
181 The DALi Tizen Adaptor for wearable.
182 %endif
183
184 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
185 # if ivi ||"undefined"
186 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
187 %package profile_ivi
188 Summary:        The DALi Tizen Adaptor for ivi
189 Provides:       %{name}-compat = %{version}-%{release}
190 Conflicts:      %{name}-profile_mobile
191 Conflicts:      %{name}-profile_wearable
192 Conflicts:      %{name}-profile_tv
193 Conflicts:      %{name}-profile_common
194 Requires:       %{name}
195 %description profile_ivi
196 The DALi Tizen Adaptor for ivi.
197 %endif
198
199 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
200 # if common ||"undefined"
201 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
202 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
203 %package profile_common
204 Summary:        The DALi Tizen Adaptor for common
205 Provides:       %{name}-compat = %{version}-%{release}
206 Conflicts:      %{name}-profile_mobile
207 Conflicts:      %{name}-profile_wearable
208 Conflicts:      %{name}-profile_tv
209 Conflicts:      %{name}-profile_ivi
210 Requires:       %{name}
211 %description profile_common
212 The DALi Tizen Adaptor for common.
213 %endif
214
215 ##############################
216 # devel
217 ##############################
218 %package devel
219 Summary:    Development components for the DALi Tizen Adaptor
220 Group:      Development/Building
221 Requires:   %{name} = %{version}-%{release}
222 Requires:   %{name}-integration-devel = %{version}-%{release}
223
224 %description devel
225 Development components for the DALi Tizen Adaptor - public headers and package configs
226
227 ##############################
228 # integration-devel
229 ##############################
230 %package integration-devel
231 Summary:    Integration development package for the Adaptor
232 Group:      Development/Building
233 Requires:   %{name} = %{version}-%{release}
234
235 %description integration-devel
236 Integration development package for the Adaptor - headers for integrating with an adaptor library.
237
238 ##############################
239 # Dali Feedback Plugin
240 ##############################
241 %package dali2-feedback-plugin
242 Summary:    Plugin to play haptic and audio feedback for Dali
243 Group:      System/Libraries
244 Requires:   %{name} = %{version}-%{release}
245 %description dali2-feedback-plugin
246 Feedback plugin to play haptic and audio feedback for Dali
247
248 #Use TZ_PATH when tizen version is 3.x or greater
249 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
250 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
251 %define font_preloaded_path      %TZ_SYS_RO_SHARE/fonts/
252 %define font_downloaded_path     %TZ_SYS_SHARE/fonts/
253 %define font_application_path    %TZ_SYS_RO_SHARE/app_fonts/
254 %define font_configuration_file  %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
255
256 %define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
257 %define dali_plugin_sound_files  /plugins/sounds/
258
259 ##############################
260 # Preparation
261 ##############################
262 %prep
263 %setup -q
264
265
266 ##############################
267 # Build
268 ##############################
269 %build
270 PREFIX+="/usr"
271 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
272 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
273
274 %ifarch %{arm}
275 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
276 %endif
277
278 CFLAGS+=" -DWAYLAND"
279 CXXFLAGS+=" -DWAYLAND"
280 cmake_flags=" -DENABLE_WAYLAND=ON -DENABLE_ATSPI=ON -DENABLE_TRACE=ON"
281
282 # Use this conditional when Tizen version is 5.x or greater
283 %if 0%{?tizen_version_major} >= 5
284 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
285
286 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
287 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
288 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
289 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
290 %endif
291
292 # Use this conditional when Tizen version is 7.x or greater
293 %if 0%{?tizen_version_major} >= 7
294 CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
295 %endif
296
297 # Use this conditional when Tizen version is 8.x or greater
298 %if 0%{?tizen_version_major} >= 8
299 CXXFLAGS+=" -DOVER_TIZEN_VERSION_8"
300 %endif
301
302 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
303 CFLAGS+=" -fsanitize=address"
304 CXXFLAGS+=" -fsanitize=address"
305 LDFLAGS+=" -fsanitize=address"
306 %endif
307
308 %if 0%{?enable_debug}
309 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
310 %endif
311
312 %if 0%{?enable_logging}
313 cmake_flags+=" -DENABLE_NETWORK_LOGGING=ON"
314 %endif
315
316 libtoolize --force
317 cd %{_builddir}/%{name}-%{version}/build/tizen
318
319 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
320 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"  ; export DALI_DATA_RO_DIR
321 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
322 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
323 FONT_APPLICATION_PATH="%{font_application_path}"  ; export FONT_APPLICATION_PATH
324 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
325 %if 0%{?tizen_platform_config_supported}
326 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
327 %endif
328
329 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
330 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
331 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
332 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
333 cmake_flags+=" -DENABLE_FEEDBACK=YES"
334 cmake_flags+=" -DENABLE_APPFW=YES"
335 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
336
337 # Set up the build via Cmake
338 #######################################################################
339 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
340 # if mobile || "undefined"
341 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
342
343 mkdir -p mobile
344 pushd mobile
345
346 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
347
348 # Build.
349 make %{?jobs:-j%jobs}
350 popd
351
352 %endif
353
354 #######################################################################
355 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
356 # if tv ||"undefined"
357 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
358
359 mkdir -p tv
360 pushd tv
361
362 cmake -DENABLE_PROFILE=TV $cmake_flags ..
363
364 # Build.
365 make %{?jobs:-j%jobs}
366 popd
367
368 %endif
369
370 #######################################################################
371 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
372 # if wearable || "undefined"
373 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
374
375 mkdir -p wearable
376 pushd wearable
377
378 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
379
380 # Build.
381 make %{?jobs:-j%jobs}
382 popd
383
384 %endif
385
386 #######################################################################
387 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
388 # if ivi ||"undefined"
389 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
390
391 mkdir -p ivi
392 pushd ivi
393
394 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
395
396 # Build.
397 make %{?jobs:-j%jobs}
398 popd
399
400 %endif
401
402 #######################################################################
403 # common
404 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
405 # if common ||"undefined"
406 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
407
408 mkdir -p common
409 pushd common
410
411 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
412
413 # Build.
414 make %{?jobs:-j%jobs}
415 popd
416
417 %endif
418
419 ##############################
420 # Installation
421 ##############################
422 %install
423 rm -rf %{buildroot}
424
425 pushd %{_builddir}/%{name}-%{version}/build/tizen
426
427 # if mobile || "undefined"
428 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
429 pushd mobile
430 %make_install
431 %if "%{?profile}" != "mobile"
432 pushd  %{buildroot}%{_libdir}
433 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
434 popd
435 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
436 %endif
437 popd
438 %endif
439
440 # if tv ||"undefined"
441 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
442 pushd tv
443 %make_install
444 %if "%{?profile}" != "tv"
445 pushd  %{buildroot}%{_libdir}
446 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
447 popd
448 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
449 %endif
450 popd
451 %endif
452
453 # if wearable || "undefined"
454 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
455 pushd wearable
456 %make_install
457 %if "%{?profile}" != "wearable"
458 pushd  %{buildroot}%{_libdir}
459 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
460 popd
461 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
462 %endif
463 popd
464 %endif
465
466 # if ivi ||"undefined"
467 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
468 pushd ivi
469 %make_install
470 %if "%{?profile}" != "ivi"
471 pushd  %{buildroot}%{_libdir}
472 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
473 popd
474 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
475 %endif
476 popd
477 %endif
478
479 # if common ||"undefined"
480 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
481 pushd common
482 %make_install
483 # No clean so we can gather symbol/size information for the common profile
484 popd
485 %endif
486
487 # Create a symbolic link in integration-api to preserve legacy repo build
488 pushd %{buildroot}%{_includedir}/dali/integration-api
489 ln -sf adaptor-framework adaptors
490 popd
491
492 ##############################
493 # Upgrade order:
494 # 1 - Pre Install new package
495 # 2 - Install new package
496 # 3 - Post install new package
497 # 4 - Pre uninstall old package
498 # 5 - Remove files not overwritten by new package
499 # 6 - Post uninstall old package
500 ##############################
501
502 ##############################
503 # Adaptor package Commands
504 %pre
505 exit 0
506
507 %post
508 pushd %{_libdir}
509 for i in mobile tv wearable ivi; do [[ -f libdali2-adaptor.so.$i ]] && ln -sf libdali2-adaptor.so.$i libdali2-adaptor.so.2.0.0; done
510 popd
511 /sbin/ldconfig
512 exit 0
513
514 %preun
515 exit 0
516
517 %postun
518 /sbin/ldconfig
519 exit 0
520
521 ##############################
522 # Mobile Profile Commands
523 # if mobile || "undefined"
524 # No need to create a symbolic link on install required if only building this profile
525 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
526 %post profile_mobile
527 %if "%{?profile}" != "mobile"
528 pushd %{_libdir}
529 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
530 popd
531 %endif
532 /sbin/ldconfig
533 exit 0
534
535 %postun profile_mobile
536 /sbin/ldconfig
537 exit 0
538 %endif
539
540 ##############################
541 # TV Profile Commands
542 # No need to create a symbolic link on install required if only building this profile
543 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
544 %post profile_tv
545 %if "%{?profile}" != "tv"
546 pushd %{_libdir}
547 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
548 popd
549 %endif
550 /sbin/ldconfig
551 exit 0
552
553 %postun profile_tv
554 /sbin/ldconfig
555 exit 0
556 %endif
557
558 ##############################
559 # Wearable Profile Commands
560 # No need to create a symbolic link on install required if only building this profile
561 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
562 %post profile_wearable
563 %if "%{?profile}" != "wearable"
564 pushd %{_libdir}
565 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
566 popd
567 %endif
568 /sbin/ldconfig
569 exit 0
570
571 %postun profile_wearable
572 /sbin/ldconfig
573 exit 0
574 %endif
575
576 ##############################
577 # IVI Profile Commands
578 # No need to create a symbolic link on install required if only building this profile
579 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
580 %post profile_ivi
581 %if "%{?profile}" != "ivi"
582 pushd %{_libdir}
583 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.2.0.0
584 popd
585 %endif
586 /sbin/ldconfig
587 exit 0
588
589 %postun profile_ivi
590 /sbin/ldconfig
591 exit 0
592 %endif
593
594 ##############################
595 # Common Profile Commands
596 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
597 %post profile_common
598 /sbin/ldconfig
599 exit 0
600
601 %postun profile_common
602 /sbin/ldconfig
603 exit 0
604 %endif
605
606 ##############################
607 # Files in Binary Packages
608 ##############################
609
610 %files
611 %manifest dali-adaptor.manifest
612 %defattr(-,root,root,-)
613 %dir %{user_shader_cache_dir}
614 %{_bindir}/*
615 %license LICENSE
616 %defattr(-,root,root,-)
617 %{_libdir}/libdali2-adaptor.so
618 %{_libdir}/libdali2-adaptor.so.2
619 %{_libdir}/libdali2-adaptor.so.2.0.0
620
621 #################################################
622
623 %files dali2-feedback-plugin
624 %manifest dali-adaptor.manifest
625 %defattr(-,root,root,-)
626 %{_libdir}/libdali2-feedback-plugin.so*
627 %{dali_plugin_sound_files}/*
628
629 #################################################
630
631 # if common ||"undefined"
632 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
633 %files profile_common
634 %manifest dali-adaptor.manifest
635 # default .so files are housed in the main pkg.
636 %endif
637
638 # if mobile || "undefined"
639 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
640 %files profile_mobile
641 %manifest dali-adaptor.manifest
642 %defattr(-,root,root,-)
643 %if "%{?profile}" != "mobile"
644 %{_libdir}/libdali2-adaptor.so.mobile
645 %endif
646 %endif
647
648 # if tv ||"undefined"
649 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
650 %files profile_tv
651 %manifest dali-adaptor.manifest
652 %defattr(-,root,root,-)
653 %if "%{?profile}" != "tv"
654 %{_libdir}/libdali2-adaptor.so.tv
655 %endif
656 %endif
657
658 # if wearable || "undefined"
659 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
660 %files profile_wearable
661 %manifest dali-adaptor.manifest
662 %defattr(-,root,root,-)
663 %if "%{?profile}" != "wearable"
664 %{_libdir}/libdali2-adaptor.so.wearable
665 %endif
666 %endif
667
668 # if ivi ||"undefined"
669 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
670 %files profile_ivi
671 %manifest dali-adaptor.manifest
672 %defattr(-,root,root,-)
673 %if "%{?profile}" != "ivi"
674 %{_libdir}/libdali2-adaptor.so.ivi
675 %endif
676 %endif
677
678 %files devel
679 %defattr(-,root,root,-)
680 %{_includedir}/dali/dali.h
681 %{_includedir}/dali/public-api/*
682 %{_includedir}/dali/devel-api/*
683 %{_includedir}/dali/doc/*
684 %{_libdir}/pkgconfig/dali2-adaptor.pc
685
686 %files integration-devel
687 %defattr(-,root,root,-)
688 %{_includedir}/dali/integration-api/adaptor-framework/*
689 %{_includedir}/dali/integration-api/adaptors
690 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc