2 # This spec file is used to build DALi Adaptor for different Tizen Profiles
3 # Current profiles are: Mobile, TV, Wearable, Common
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
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
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)$
19 Summary: The DALi Tizen Adaptor
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
27 Requires(post): /sbin/ldconfig
28 Requires(postun): /sbin/ldconfig
31 %define tizen_platform_config_supported 1
32 BuildRequires: pkgconfig(libtzplatform-config)
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)
41 BuildRequires: pkgconfig(screen_connector_provider)
42 BuildRequires: pkgconfig(gles20)
43 BuildRequires: pkgconfig(glesv2)
44 BuildRequires: pkgconfig(ttrace)
46 BuildRequires: dali2-devel
47 BuildRequires: dali2-integration-devel
49 BuildRequires: pkgconfig
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
67 BuildRequires: pkgconfig(capi-system-info)
68 BuildRequires: pkgconfig(capi-system-sensor)
70 BuildRequires: pkgconfig(cairo)
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
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)
86 # We use ecore mainloop
87 %if 0%{?tizen_version_major} >= 5
88 BuildRequires: pkgconfig(ecore-wl2)
89 BuildRequires: pkgconfig(wayland-egl-tizen)
91 BuildRequires: pkgconfig(ecore-wayland)
94 # We need tbm_surface in tizen 3.0 wayland
95 BuildRequires: pkgconfig(libtbm)
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)
105 BuildRequires: pkgconfig(capi-system-system-settings)
107 # for ATSPI (Accessibility) support
108 BuildRequires: pkgconfig(eldbus)
110 # for feedback plugin
111 BuildRequires: pkgconfig(mm-sound)
112 BuildRequires: pkgconfig(feedback)
113 BuildRequires: pkgconfig(component-based-core-base)
116 %if ( 0%{?tizen_version_major} == 6 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 7
117 BuildRequires: pkgconfig(thorvg)
121 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
122 BuildRequires: asan-force-options
123 BuildRequires: asan-build-env
124 BuildRequires: libasan
128 Requires: %{name}-compat = %{version}-%{release}
129 Recommends: %{name}-profile_common = %{version}-%{release}
132 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
133 platform abstraction and application shell
135 ###########################################
136 # Dali adapter for profiles
137 ###########################################
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
150 %description profile_mobile
151 The DALi Tizen Adaptor for mobile.
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"
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
165 %description profile_tv
166 The DALi Tizen Adaptor for tv.
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
180 %description profile_wearable
181 The DALi Tizen Adaptor for wearable.
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"
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
195 %description profile_ivi
196 The DALi Tizen Adaptor for ivi.
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
211 %description profile_common
212 The DALi Tizen Adaptor for common.
215 ##############################
217 ##############################
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}
225 Development components for the DALi Tizen Adaptor - public headers and package configs
227 ##############################
229 ##############################
230 %package integration-devel
231 Summary: Integration development package for the Adaptor
232 Group: Development/Building
233 Requires: %{name} = %{version}-%{release}
235 %description integration-devel
236 Integration development package for the Adaptor - headers for integrating with an adaptor library.
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
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
256 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
257 %define dali_plugin_sound_files /plugins/sounds/
259 ##############################
261 ##############################
266 ##############################
268 ##############################
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 "
275 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
279 CXXFLAGS+=" -DWAYLAND"
280 cmake_flags=" -DENABLE_WAYLAND=ON -DENABLE_ATSPI=ON"
282 %if 0%{?enable_streamline}
283 cmake_flags+=" -DENABLE_TRACE_STREAMLINE=ON"
285 cmake_flags+=" -DENABLE_TRACE=ON"
288 # Use this conditional when Tizen version is 5.x or greater
289 %if 0%{?tizen_version_major} >= 5
290 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
292 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
293 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
294 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
295 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
298 # Use this conditional when Tizen version is 7.x or greater
299 %if 0%{?tizen_version_major} >= 7
300 CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
303 # Use this conditional when Tizen version is 8.x or greater
304 %if 0%{?tizen_version_major} >= 8
305 CXXFLAGS+=" -DOVER_TIZEN_VERSION_8"
308 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
309 CFLAGS+=" -fsanitize=address"
310 CXXFLAGS+=" -fsanitize=address"
311 LDFLAGS+=" -fsanitize=address"
314 %if 0%{?enable_debug}
315 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
318 %if 0%{?enable_logging}
319 cmake_flags+=" -DENABLE_NETWORK_LOGGING=ON"
323 cd %{_builddir}/%{name}-%{version}/build/tizen
325 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
326 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
327 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
328 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
329 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
330 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
331 %if 0%{?tizen_platform_config_supported}
332 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
335 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
336 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
337 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
338 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
339 cmake_flags+=" -DENABLE_FEEDBACK=YES"
340 cmake_flags+=" -DENABLE_APPFW=YES"
341 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
343 # Set up the build via Cmake
344 #######################################################################
345 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
346 # if mobile || "undefined"
347 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
352 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
355 make %{?jobs:-j%jobs}
360 #######################################################################
361 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
362 # if tv ||"undefined"
363 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
368 cmake -DENABLE_PROFILE=TV $cmake_flags ..
371 make %{?jobs:-j%jobs}
376 #######################################################################
377 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
378 # if wearable || "undefined"
379 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
384 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
387 make %{?jobs:-j%jobs}
392 #######################################################################
393 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
394 # if ivi ||"undefined"
395 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
400 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
403 make %{?jobs:-j%jobs}
408 #######################################################################
410 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
411 # if common ||"undefined"
412 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
417 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
420 make %{?jobs:-j%jobs}
425 ##############################
427 ##############################
431 pushd %{_builddir}/%{name}-%{version}/build/tizen
433 # if mobile || "undefined"
434 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
437 %if "%{?profile}" != "mobile"
438 pushd %{buildroot}%{_libdir}
439 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
441 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
446 # if tv ||"undefined"
447 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
450 %if "%{?profile}" != "tv"
451 pushd %{buildroot}%{_libdir}
452 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
454 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
459 # if wearable || "undefined"
460 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
463 %if "%{?profile}" != "wearable"
464 pushd %{buildroot}%{_libdir}
465 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
467 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
472 # if ivi ||"undefined"
473 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
476 %if "%{?profile}" != "ivi"
477 pushd %{buildroot}%{_libdir}
478 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
480 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
485 # if common ||"undefined"
486 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
489 # No clean so we can gather symbol/size information for the common profile
493 # Create a symbolic link in integration-api to preserve legacy repo build
494 pushd %{buildroot}%{_includedir}/dali/integration-api
495 ln -sf adaptor-framework adaptors
498 ##############################
500 # 1 - Pre Install new package
501 # 2 - Install new package
502 # 3 - Post install new package
503 # 4 - Pre uninstall old package
504 # 5 - Remove files not overwritten by new package
505 # 6 - Post uninstall old package
506 ##############################
508 ##############################
509 # Adaptor package Commands
515 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
527 ##############################
528 # Mobile Profile Commands
529 # if mobile || "undefined"
530 # No need to create a symbolic link on install required if only building this profile
531 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
533 %if "%{?profile}" != "mobile"
535 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
541 %postun profile_mobile
546 ##############################
547 # TV Profile Commands
548 # No need to create a symbolic link on install required if only building this profile
549 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
551 %if "%{?profile}" != "tv"
553 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
564 ##############################
565 # Wearable Profile Commands
566 # No need to create a symbolic link on install required if only building this profile
567 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
568 %post profile_wearable
569 %if "%{?profile}" != "wearable"
571 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
577 %postun profile_wearable
582 ##############################
583 # IVI Profile Commands
584 # No need to create a symbolic link on install required if only building this profile
585 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
587 %if "%{?profile}" != "ivi"
589 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.2.0.0
600 ##############################
601 # Common Profile Commands
602 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
607 %postun profile_common
612 ##############################
613 # Files in Binary Packages
614 ##############################
617 %manifest dali-adaptor.manifest
618 %defattr(-,root,root,-)
619 %dir %{user_shader_cache_dir}
622 %defattr(-,root,root,-)
623 %{_libdir}/libdali2-adaptor.so
624 %{_libdir}/libdali2-adaptor.so.2
625 %{_libdir}/libdali2-adaptor.so.2.0.0
627 #################################################
629 %files dali2-feedback-plugin
630 %manifest dali-adaptor.manifest
631 %defattr(-,root,root,-)
632 %{_libdir}/libdali2-feedback-plugin.so*
633 %{dali_plugin_sound_files}/*
635 #################################################
637 # if common ||"undefined"
638 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
639 %files profile_common
640 %manifest dali-adaptor.manifest
641 # default .so files are housed in the main pkg.
644 # if mobile || "undefined"
645 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
646 %files profile_mobile
647 %manifest dali-adaptor.manifest
648 %defattr(-,root,root,-)
649 %if "%{?profile}" != "mobile"
650 %{_libdir}/libdali2-adaptor.so.mobile
654 # if tv ||"undefined"
655 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
657 %manifest dali-adaptor.manifest
658 %defattr(-,root,root,-)
659 %if "%{?profile}" != "tv"
660 %{_libdir}/libdali2-adaptor.so.tv
664 # if wearable || "undefined"
665 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
666 %files profile_wearable
667 %manifest dali-adaptor.manifest
668 %defattr(-,root,root,-)
669 %if "%{?profile}" != "wearable"
670 %{_libdir}/libdali2-adaptor.so.wearable
674 # if ivi ||"undefined"
675 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
677 %manifest dali-adaptor.manifest
678 %defattr(-,root,root,-)
679 %if "%{?profile}" != "ivi"
680 %{_libdir}/libdali2-adaptor.so.ivi
685 %defattr(-,root,root,-)
686 %{_includedir}/dali/dali.h
687 %{_includedir}/dali/public-api/*
688 %{_includedir}/dali/devel-api/*
689 %{_includedir}/dali/doc/*
690 %{_libdir}/pkgconfig/dali2-adaptor.pc
692 %files integration-devel
693 %defattr(-,root,root,-)
694 %{_includedir}/dali/integration-api/adaptor-framework/*
695 %{_includedir}/dali/integration-api/adaptors
696 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc