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)
39 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: wayland-devel
75 BuildRequires: wayland-extension-client-devel
77 # WebP support only from Tizen 6 onwards
78 %if 0%{?tizen_version_major} >= 6
79 BuildRequires: pkgconfig(libwebp)
80 BuildRequires: pkgconfig(libwebpdecoder)
81 BuildRequires: pkgconfig(libwebpdemux)
82 BuildRequires: pkgconfig(libwebpmux)
85 # We use ecore mainloop
86 %if 0%{?tizen_version_major} >= 5
87 BuildRequires: pkgconfig(ecore-wl2)
88 BuildRequires: pkgconfig(wayland-egl-tizen)
90 BuildRequires: pkgconfig(ecore-wayland)
93 # We need tbm_surface in tizen 3.0 wayland
94 BuildRequires: pkgconfig(libtbm)
97 BuildRequires: pkgconfig(appcore-ui)
98 BuildRequires: pkgconfig(appcore-widget-base)
99 BuildRequires: pkgconfig(bundle)
100 BuildRequires: pkgconfig(capi-appfw-app-common)
101 BuildRequires: pkgconfig(capi-appfw-app-control)
102 BuildRequires: pkgconfig(ecore-imf)
104 BuildRequires: pkgconfig(capi-system-system-settings)
106 # for ATSPI (Accessibility) support
107 BuildRequires: pkgconfig(eldbus)
109 # for feedback plugin
110 BuildRequires: pkgconfig(mm-sound)
111 BuildRequires: pkgconfig(feedback)
112 BuildRequires: pkgconfig(component-based-core-base)
115 %if ( 0%{?tizen_version_major} == 6 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 7
116 BuildRequires: pkgconfig(thorvg)
120 Requires: %{name}-compat = %{version}-%{release}
121 Recommends: %{name}-profile_common = %{version}-%{release}
124 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
125 platform abstraction and application shell
127 ###########################################
128 # Dali adapter for profiles
129 ###########################################
131 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
132 # if mobile || "undefined"
133 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
134 %package profile_mobile
135 Summary: The DALi Tizen Adaptor for mobile
136 Provides: %{name}-compat = %{version}-%{release}
137 Conflicts: %{name}-profile_tv
138 Conflicts: %{name}-profile_wearable
139 Conflicts: %{name}-profile_ivi
140 Conflicts: %{name}-profile_common
142 %description profile_mobile
143 The DALi Tizen Adaptor for mobile.
146 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
147 # if tv ||"undefined"
148 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
150 Summary: The DALi Tizen Adaptor for tv
151 Provides: %{name}-compat = %{version}-%{release}
152 Conflicts: %{name}-profile_mobile
153 Conflicts: %{name}-profile_wearable
154 Conflicts: %{name}-profile_ivi
155 Conflicts: %{name}-profile_common
157 %description profile_tv
158 The DALi Tizen Adaptor for tv.
161 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
162 # if wearable || "undefined"
163 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
164 %package profile_wearable
165 Summary: The DALi Tizen Adaptor for wearable
166 Provides: %{name}-compat = %{version}-%{release}
167 Conflicts: %{name}-profile_mobile
168 Conflicts: %{name}-profile_tv
169 Conflicts: %{name}-profile_ivi
170 Conflicts: %{name}-profile_common
172 %description profile_wearable
173 The DALi Tizen Adaptor for wearable.
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"
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
187 %description profile_ivi
188 The DALi Tizen Adaptor for ivi.
191 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
192 # if common ||"undefined"
193 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
194 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
195 %package profile_common
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
203 %description profile_common
204 The DALi Tizen Adaptor for common.
207 ##############################
209 ##############################
211 Summary: Development components for the DALi Tizen Adaptor
212 Group: Development/Building
213 Requires: %{name} = %{version}-%{release}
214 Requires: %{name}-integration-devel = %{version}-%{release}
217 Development components for the DALi Tizen Adaptor - public headers and package configs
219 ##############################
221 ##############################
222 %package integration-devel
223 Summary: Integration development package for the Adaptor
224 Group: Development/Building
225 Requires: %{name} = %{version}-%{release}
227 %description integration-devel
228 Integration development package for the Adaptor - headers for integrating with an adaptor library.
230 ##############################
231 # Dali Feedback Plugin
232 ##############################
233 %package dali2-feedback-plugin
234 Summary: Plugin to play haptic and audio feedback for Dali
235 Group: System/Libraries
236 Requires: %{name} = %{version}-%{release}
237 %description dali2-feedback-plugin
238 Feedback plugin to play haptic and audio feedback for Dali
240 ##############################
242 ##############################
246 #Use TZ_PATH when tizen version is 3.x or greater
248 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
249 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
250 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
251 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
252 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
253 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
255 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
256 %define dali_plugin_sound_files /plugins/sounds/
258 ##############################
260 ##############################
263 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
264 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
267 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
271 CXXFLAGS+=" -DWAYLAND"
272 cmake_flags=" -DENABLE_WAYLAND=ON -DENABLE_ATSPI=ON"
274 # Use this conditional when Tizen version is 5.x or greater
275 %if 0%{?tizen_version_major} >= 5
276 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
278 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
279 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
280 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
281 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
284 %if 0%{?enable_debug}
285 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
288 %if 0%{?enable_trace}
289 cmake_flags+=" -DENABLE_TRACE=ON"
293 cd %{_builddir}/%{name}-%{version}/build/tizen
295 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
296 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
297 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
298 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
299 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
300 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
301 %if 0%{?tizen_platform_config_supported}
302 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
305 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
306 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
307 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
308 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
309 cmake_flags+=" -DENABLE_FEEDBACK=YES"
310 cmake_flags+=" -DENABLE_APPFW=YES"
311 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
313 # Set up the build via Cmake
314 #######################################################################
315 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
316 # if mobile || "undefined"
317 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
322 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
325 make %{?jobs:-j%jobs}
330 #######################################################################
331 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
332 # if tv ||"undefined"
333 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
338 cmake -DENABLE_PROFILE=TV $cmake_flags ..
341 make %{?jobs:-j%jobs}
346 #######################################################################
347 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
348 # if wearable || "undefined"
349 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
354 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
357 make %{?jobs:-j%jobs}
362 #######################################################################
363 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
364 # if ivi ||"undefined"
365 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
370 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
373 make %{?jobs:-j%jobs}
378 #######################################################################
380 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
381 # if common ||"undefined"
382 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
387 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
390 make %{?jobs:-j%jobs}
395 ##############################
397 ##############################
401 pushd %{_builddir}/%{name}-%{version}/build/tizen
403 # if mobile || "undefined"
404 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
407 %if "%{?profile}" != "mobile"
408 pushd %{buildroot}%{_libdir}
409 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
411 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
416 # if tv ||"undefined"
417 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
420 %if "%{?profile}" != "tv"
421 pushd %{buildroot}%{_libdir}
422 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
424 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
429 # if wearable || "undefined"
430 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
433 %if "%{?profile}" != "wearable"
434 pushd %{buildroot}%{_libdir}
435 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
437 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
442 # if ivi ||"undefined"
443 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
446 %if "%{?profile}" != "ivi"
447 pushd %{buildroot}%{_libdir}
448 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
450 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
455 # if common ||"undefined"
456 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
459 # No clean so we can gather symbol/size information for the common profile
463 # Create a symbolic link in integration-api to preserve legacy repo build
464 pushd %{buildroot}%{_includedir}/dali/integration-api
465 ln -sf adaptor-framework adaptors
468 ##############################
470 # 1 - Pre Install new package
471 # 2 - Install new package
472 # 3 - Post install new package
473 # 4 - Pre uninstall old package
474 # 5 - Remove files not overwritten by new package
475 # 6 - Post uninstall old package
476 ##############################
478 ##############################
479 # Adaptor package Commands
485 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
497 ##############################
498 # Mobile Profile Commands
499 # if mobile || "undefined"
500 # No need to create a symbolic link on install required if only building this profile
501 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
503 %if "%{?profile}" != "mobile"
505 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
511 %postun profile_mobile
516 ##############################
517 # TV Profile Commands
518 # No need to create a symbolic link on install required if only building this profile
519 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
521 %if "%{?profile}" != "tv"
523 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
534 ##############################
535 # Wearable Profile Commands
536 # No need to create a symbolic link on install required if only building this profile
537 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
538 %post profile_wearable
539 %if "%{?profile}" != "wearable"
541 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
547 %postun profile_wearable
552 ##############################
553 # IVI Profile Commands
554 # No need to create a symbolic link on install required if only building this profile
555 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
557 %if "%{?profile}" != "ivi"
559 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.2.0.0
570 ##############################
571 # Common Profile Commands
572 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
577 %postun profile_common
582 ##############################
583 # Files in Binary Packages
584 ##############################
587 %manifest dali-adaptor.manifest
588 %defattr(-,root,root,-)
589 %dir %{user_shader_cache_dir}
592 %defattr(-,root,root,-)
593 %{_libdir}/libdali2-adaptor.so
594 %{_libdir}/libdali2-adaptor.so.2
595 %{_libdir}/libdali2-adaptor.so.2.0.0
597 #################################################
599 %files dali2-feedback-plugin
600 %manifest dali-adaptor.manifest
601 %defattr(-,root,root,-)
602 %{_libdir}/libdali2-feedback-plugin.so*
603 %{dali_plugin_sound_files}/*
605 #################################################
607 # if common ||"undefined"
608 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
609 %files profile_common
610 %manifest dali-adaptor.manifest
611 # default .so files are housed in the main pkg.
614 # if mobile || "undefined"
615 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
616 %files profile_mobile
617 %manifest dali-adaptor.manifest
618 %defattr(-,root,root,-)
619 %if "%{?profile}" != "mobile"
620 %{_libdir}/libdali2-adaptor.so.mobile
624 # if tv ||"undefined"
625 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
627 %manifest dali-adaptor.manifest
628 %defattr(-,root,root,-)
629 %if "%{?profile}" != "tv"
630 %{_libdir}/libdali2-adaptor.so.tv
634 # if wearable || "undefined"
635 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
636 %files profile_wearable
637 %manifest dali-adaptor.manifest
638 %defattr(-,root,root,-)
639 %if "%{?profile}" != "wearable"
640 %{_libdir}/libdali2-adaptor.so.wearable
644 # if ivi ||"undefined"
645 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
647 %manifest dali-adaptor.manifest
648 %defattr(-,root,root,-)
649 %if "%{?profile}" != "ivi"
650 %{_libdir}/libdali2-adaptor.so.ivi
655 %defattr(-,root,root,-)
656 %{_includedir}/dali/dali.h
657 %{_includedir}/dali/public-api/*
658 %{_includedir}/dali/devel-api/*
659 %{_includedir}/dali/doc/*
660 %{_libdir}/pkgconfig/dali2-adaptor.pc
662 %files integration-devel
663 %defattr(-,root,root,-)
664 %{_includedir}/dali/integration-api/adaptor-framework/*
665 %{_includedir}/dali/integration-api/adaptors
666 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc