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
30 Provides: libdali-adaptor-cxx11.so
31 Provides: libdali-adaptor-cxx11.so.0
32 Provides: libdali-adaptor-cxx11.so.0.0.0
33 Provides: libdali-adaptor.so
34 Provides: libdali-adaptor.so.0
35 Provides: libdali-adaptor.so.0.0.0
37 %define tizen_platform_config_supported 1
38 BuildRequires: pkgconfig(libtzplatform-config)
40 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
41 # if wearable || "undefined"
42 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
43 BuildRequires: pkgconfig(capi-appfw-watch-application)
44 BuildRequires: pkgconfig(appcore-watch)
45 BuildRequires: pkgconfig(screen_connector_provider)
48 BuildRequires: pkgconfig(gles20)
49 BuildRequires: pkgconfig(glesv2)
50 BuildRequires: pkgconfig(ttrace)
52 BuildRequires: dali-devel
53 BuildRequires: dali-integration-devel
55 BuildRequires: pkgconfig
58 BuildRequires: giflib-devel
59 BuildRequires: pkgconfig(fontconfig)
60 BuildRequires: libjpeg-turbo-devel
61 BuildRequires: pkgconfig(vconf)
62 BuildRequires: tts-devel
63 BuildRequires: pkgconfig(dlog)
64 BuildRequires: libdrm-devel
65 BuildRequires: pkgconfig(libexif)
66 BuildRequires: pkgconfig(libpng)
67 BuildRequires: pkgconfig(egl)
68 BuildRequires: libcurl-devel
69 BuildRequires: pkgconfig(harfbuzz)
70 BuildRequires: fribidi-devel
72 BuildRequires: pkgconfig(capi-system-info)
73 BuildRequires: pkgconfig(capi-system-sensor)
75 BuildRequires: pkgconfig(cairo)
77 BuildRequires: pkgconfig(wayland-egl)
78 BuildRequires: pkgconfig(wayland-client)
79 BuildRequires: wayland-devel
80 BuildRequires: wayland-extension-client-devel
82 # WebP support only from Tizen 6 onwards
83 %if 0%{?tizen_version_major} >= 6
84 BuildRequires: pkgconfig(libwebp)
85 BuildRequires: pkgconfig(libwebpdecoder)
86 BuildRequires: pkgconfig(libwebpdemux)
87 BuildRequires: pkgconfig(libwebpmux)
90 # We use ecore mainloop
91 %if 0%{?tizen_version_major} >= 5
92 BuildRequires: pkgconfig(ecore-wl2)
93 BuildRequires: pkgconfig(wayland-egl-tizen)
95 BuildRequires: pkgconfig(ecore-wayland)
98 # dali-adaptor needs tbm_surface in tizen 3.0 wayland
99 BuildRequires: pkgconfig(libtbm)
102 BuildRequires: pkgconfig(appcore-ui)
103 BuildRequires: pkgconfig(appcore-widget-base)
104 BuildRequires: pkgconfig(bundle)
105 BuildRequires: pkgconfig(capi-appfw-app-common)
106 BuildRequires: pkgconfig(capi-appfw-app-control)
107 BuildRequires: pkgconfig(ecore-imf)
109 BuildRequires: pkgconfig(capi-system-system-settings)
112 %if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5
113 BuildRequires: pkgconfig(capi-ui-autofill)
116 # for feedback plugin
117 BuildRequires: pkgconfig(mm-sound)
118 BuildRequires: pkgconfig(feedback)
119 BuildRequires: pkgconfig(component-based-core-base)
122 Requires: %{name}-compat = %{version}-%{release}
123 Recommends: %{name}-profile_common = %{version}-%{release}
126 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
127 platform abstraction and application shell
129 ###########################################
130 # Dali adapter for profiles
131 ###########################################
133 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
134 # if mobile || "undefined"
135 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
136 %package profile_mobile
137 Summary: The DALi Tizen Adaptor for mobile
138 Provides: %{name}-compat = %{version}-%{release}
139 Conflicts: %{name}-profile_tv
140 Conflicts: %{name}-profile_wearable
141 Conflicts: %{name}-profile_ivi
142 Conflicts: %{name}-profile_common
144 %description profile_mobile
145 The DALi Tizen Adaptor for mobile.
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"
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
159 %description profile_tv
160 The DALi Tizen Adaptor for tv.
163 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
164 # if wearable || "undefined"
165 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
166 %package profile_wearable
167 Summary: The DALi Tizen Adaptor for wearable
168 Provides: %{name}-compat = %{version}-%{release}
169 Conflicts: %{name}-profile_mobile
170 Conflicts: %{name}-profile_tv
171 Conflicts: %{name}-profile_ivi
172 Conflicts: %{name}-profile_common
174 %description profile_wearable
175 The DALi Tizen Adaptor for wearable.
178 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
179 # if ivi ||"undefined"
180 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
182 Summary: The DALi Tizen Adaptor for ivi
183 Provides: %{name}-compat = %{version}-%{release}
184 Conflicts: %{name}-profile_mobile
185 Conflicts: %{name}-profile_wearable
186 Conflicts: %{name}-profile_tv
187 Conflicts: %{name}-profile_common
189 %description profile_ivi
190 The DALi Tizen Adaptor for ivi.
193 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
194 # if common ||"undefined"
195 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
196 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
197 %package profile_common
198 Summary: The DALi Tizen Adaptor for common
199 Provides: %{name}-compat = %{version}-%{release}
200 Conflicts: %{name}-profile_mobile
201 Conflicts: %{name}-profile_wearable
202 Conflicts: %{name}-profile_tv
203 Conflicts: %{name}-profile_ivi
205 %description profile_common
206 The DALi Tizen Adaptor for common.
209 ##############################
211 ##############################
213 Summary: Development components for the DALi Tizen Adaptor
214 Group: Development/Building
215 Requires: %{name} = %{version}-%{release}
216 Requires: %{name}-integration-devel = %{version}-%{release}
219 Development components for the DALi Tizen Adaptor - public headers and package configs
221 ##############################
223 ##############################
224 %package integration-devel
225 Summary: Integration development package for the Adaptor
226 Group: Development/Building
227 Requires: %{name} = %{version}-%{release}
229 %description integration-devel
230 Integration development package for the Adaptor - headers for integrating with an adaptor library.
232 ##############################
233 # Dali Feedback Plugin
234 ##############################
235 %package dali-feedback-plugin
236 Summary: Plugin to play haptic and audio feedback for Dali
237 Group: System/Libraries
238 Requires: %{name} = %{version}-%{release}
239 %description dali-feedback-plugin
240 Feedback plugin to play haptic and audio feedback for Dali
242 ##############################
244 ##############################
248 #Use TZ_PATH when tizen version is 3.x or greater
250 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali-legacy/
251 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali-legacy/
252 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
253 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
254 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
255 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
257 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
258 %define dali_plugin_sound_files /plugins/sounds/
260 ##############################
262 ##############################
265 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
266 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
269 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
273 CXXFLAGS+=" -DWAYLAND"
274 cmake_flags=" -DENABLE_WAYLAND=ON"
276 # Use this conditional when Tizen version is 5.x or greater
277 %if 0%{?tizen_version_major} >= 5
278 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
280 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
281 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
282 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
283 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
286 %if 0%{?enable_debug}
287 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
290 %if 0%{?enable_trace}
291 cmake_flags+=" -DENABLE_TRACE=ON"
295 cd %{_builddir}/%{name}-%{version}/build/tizen
297 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
298 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
299 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
300 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
301 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
302 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
303 %if 0%{?tizen_platform_config_supported}
304 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
307 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
308 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
309 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
310 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
311 cmake_flags+=" -DENABLE_TIZEN_MINOR_VERSION=%{tizen_version_minor}"
312 cmake_flags+=" -DENABLE_FEEDBACK=YES"
313 cmake_flags+=" -DENABLE_APPFW=YES"
314 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
316 # Set up the build via Cmake
317 #######################################################################
318 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
319 # if mobile || "undefined"
320 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
325 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
328 make %{?jobs:-j%jobs}
333 #######################################################################
334 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
335 # if tv ||"undefined"
336 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
341 cmake -DENABLE_PROFILE=TV $cmake_flags ..
344 make %{?jobs:-j%jobs}
349 #######################################################################
350 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
351 # if wearable || "undefined"
352 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
357 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
360 make %{?jobs:-j%jobs}
365 #######################################################################
366 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
367 # if ivi ||"undefined"
368 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
373 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
376 make %{?jobs:-j%jobs}
381 #######################################################################
383 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
384 # if common ||"undefined"
385 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
390 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
393 make %{?jobs:-j%jobs}
398 ##############################
400 ##############################
404 pushd %{_builddir}/%{name}-%{version}/build/tizen
406 # if mobile || "undefined"
407 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
410 %if "%{?profile}" != "mobile"
411 pushd %{buildroot}%{_libdir}
412 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
414 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
419 # if tv ||"undefined"
420 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
423 %if "%{?profile}" != "tv"
424 pushd %{buildroot}%{_libdir}
425 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
427 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
432 # if wearable || "undefined"
433 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
436 %if "%{?profile}" != "wearable"
437 pushd %{buildroot}%{_libdir}
438 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
440 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
445 # if ivi ||"undefined"
446 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
449 %if "%{?profile}" != "ivi"
450 pushd %{buildroot}%{_libdir}
451 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
453 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
458 # if common ||"undefined"
459 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
462 # No clean so we can gather symbol/size information for the common profile
466 # Create links to ensure linking with cxx11 library is preserved
467 pushd %{buildroot}%{_libdir}
468 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so
469 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
470 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
473 # Create a symbolic link in integration-api to preserve legacy repo build
474 pushd %{buildroot}%{_includedir}/dali/integration-api
475 ln -sf adaptor-framework adaptors
478 ##############################
480 # 1 - Pre Install new package
481 # 2 - Install new package
482 # 3 - Post install new package
483 # 4 - Pre uninstall old package
484 # 5 - Remove files not overwritten by new package
485 # 6 - Post uninstall old package
486 ##############################
488 ##############################
489 # Adaptor package Commands
495 for i in mobile tv wearable ivi; do [[ -f libdali-adaptor.so.$i ]] && ln -sf libdali-adaptor.so.$i libdali-adaptor.so.0.0.0; done
507 ##############################
508 # Mobile Profile Commands
509 # if mobile || "undefined"
510 # No need to create a symbolic link on install required if only building this profile
511 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
513 %if "%{?profile}" != "mobile"
515 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
521 %postun profile_mobile
526 ##############################
527 # TV Profile Commands
528 # No need to create a symbolic link on install required if only building this profile
529 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
531 %if "%{?profile}" != "tv"
533 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
544 ##############################
545 # Wearable Profile Commands
546 # No need to create a symbolic link on install required if only building this profile
547 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
548 %post profile_wearable
549 %if "%{?profile}" != "wearable"
551 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
557 %postun profile_wearable
562 ##############################
563 # IVI Profile Commands
564 # No need to create a symbolic link on install required if only building this profile
565 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
567 %if "%{?profile}" != "ivi"
569 ln -sf libdali-adaptor.so.ivi libdali-adaptor.so.0.0.0
580 ##############################
581 # Common Profile Commands
582 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
587 %postun profile_common
592 ##############################
593 # Files in Binary Packages
594 ##############################
597 %manifest dali-adaptor.manifest
598 %defattr(-,root,root,-)
599 %dir %{user_shader_cache_dir}
602 %defattr(-,root,root,-)
603 %{_libdir}/libdali-adaptor-cxx11.so
604 %{_libdir}/libdali-adaptor-cxx11.so.0
605 %{_libdir}/libdali-adaptor-cxx11.so.0.0.0
606 %{_libdir}/libdali-adaptor.so
607 %{_libdir}/libdali-adaptor.so.0
608 %{_libdir}/libdali-adaptor.so.0.0.0
610 #################################################
612 %files dali-feedback-plugin
613 %manifest dali-adaptor.manifest
614 %defattr(-,root,root,-)
615 %{_libdir}/libdali-feedback-plugin-cxx11.so*
616 %{dali_plugin_sound_files}/*
618 #################################################
620 # if common ||"undefined"
621 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
622 %files profile_common
623 %manifest dali-adaptor.manifest
624 # default .so files are housed in the main pkg.
627 # if mobile || "undefined"
628 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
629 %files profile_mobile
630 %manifest dali-adaptor.manifest
631 %defattr(-,root,root,-)
632 %if "%{?profile}" != "mobile"
633 %{_libdir}/libdali-adaptor.so.mobile
637 # if tv ||"undefined"
638 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
640 %manifest dali-adaptor.manifest
641 %defattr(-,root,root,-)
642 %if "%{?profile}" != "tv"
643 %{_libdir}/libdali-adaptor.so.tv
647 # if wearable || "undefined"
648 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
649 %files profile_wearable
650 %manifest dali-adaptor.manifest
651 %defattr(-,root,root,-)
652 %if "%{?profile}" != "wearable"
653 %{_libdir}/libdali-adaptor.so.wearable
657 # if ivi ||"undefined"
658 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
660 %manifest dali-adaptor.manifest
661 %defattr(-,root,root,-)
662 %if "%{?profile}" != "ivi"
663 %{_libdir}/libdali-adaptor.so.ivi
668 %defattr(-,root,root,-)
669 %{_includedir}/dali/dali.h
670 %{_includedir}/dali/public-api/*
671 %{_includedir}/dali/devel-api/*
672 %{_includedir}/dali/doc/*
673 %{_libdir}/pkgconfig/dali-adaptor.pc
675 %files integration-devel
676 %defattr(-,root,root,-)
677 %{_includedir}/dali/integration-api/adaptor-framework/*
678 %{_includedir}/dali/integration-api/adaptors
679 %{_libdir}/pkgconfig/dali-adaptor-integration.pc