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: fribidi-devel
66 BuildRequires: pkgconfig(capi-system-info)
67 BuildRequires: pkgconfig(capi-system-sensor)
69 BuildRequires: pkgconfig(cairo)
71 BuildRequires: pkgconfig(wayland-egl)
72 BuildRequires: pkgconfig(wayland-client)
73 BuildRequires: wayland-devel
74 BuildRequires: wayland-extension-client-devel
76 # WebP support only from Tizen 6 onwards
77 %if 0%{?tizen_version_major} >= 6
78 BuildRequires: pkgconfig(libwebp)
79 BuildRequires: pkgconfig(libwebpdecoder)
80 BuildRequires: pkgconfig(libwebpdemux)
81 BuildRequires: pkgconfig(libwebpmux)
84 # We use ecore mainloop
85 %if 0%{?tizen_version_major} >= 5
86 BuildRequires: pkgconfig(ecore-wl2)
87 BuildRequires: pkgconfig(wayland-egl-tizen)
89 BuildRequires: pkgconfig(ecore-wayland)
92 # We need tbm_surface in tizen 3.0 wayland
93 BuildRequires: pkgconfig(libtbm)
96 BuildRequires: pkgconfig(appcore-ui)
97 BuildRequires: pkgconfig(appcore-widget-base)
98 BuildRequires: pkgconfig(bundle)
99 BuildRequires: pkgconfig(capi-appfw-app-common)
100 BuildRequires: pkgconfig(capi-appfw-app-control)
101 BuildRequires: pkgconfig(ecore-imf)
103 BuildRequires: pkgconfig(capi-system-system-settings)
105 # for ATSPI (Accessibility) support
106 BuildRequires: pkgconfig(eldbus)
108 # for feedback plugin
109 BuildRequires: pkgconfig(mm-sound)
110 BuildRequires: pkgconfig(feedback)
111 BuildRequires: pkgconfig(component-based-core-base)
114 Requires: %{name}-compat = %{version}-%{release}
115 Recommends: %{name}-profile_common = %{version}-%{release}
118 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
119 platform abstraction and application shell
121 ###########################################
122 # Dali adapter for profiles
123 ###########################################
125 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
126 # if mobile || "undefined"
127 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
128 %package profile_mobile
129 Summary: The DALi Tizen Adaptor for mobile
130 Provides: %{name}-compat = %{version}-%{release}
131 Conflicts: %{name}-profile_tv
132 Conflicts: %{name}-profile_wearable
133 Conflicts: %{name}-profile_ivi
134 Conflicts: %{name}-profile_common
136 %description profile_mobile
137 The DALi Tizen Adaptor for mobile.
140 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
141 # if tv ||"undefined"
142 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
144 Summary: The DALi Tizen Adaptor for tv
145 Provides: %{name}-compat = %{version}-%{release}
146 Conflicts: %{name}-profile_mobile
147 Conflicts: %{name}-profile_wearable
148 Conflicts: %{name}-profile_ivi
149 Conflicts: %{name}-profile_common
151 %description profile_tv
152 The DALi Tizen Adaptor for tv.
155 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
156 # if wearable || "undefined"
157 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
158 %package profile_wearable
159 Summary: The DALi Tizen Adaptor for wearable
160 Provides: %{name}-compat = %{version}-%{release}
161 Conflicts: %{name}-profile_mobile
162 Conflicts: %{name}-profile_tv
163 Conflicts: %{name}-profile_ivi
164 Conflicts: %{name}-profile_common
166 %description profile_wearable
167 The DALi Tizen Adaptor for wearable.
170 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
171 # if ivi ||"undefined"
172 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
174 Summary: The DALi Tizen Adaptor for ivi
175 Provides: %{name}-compat = %{version}-%{release}
176 Conflicts: %{name}-profile_mobile
177 Conflicts: %{name}-profile_wearable
178 Conflicts: %{name}-profile_tv
179 Conflicts: %{name}-profile_common
181 %description profile_ivi
182 The DALi Tizen Adaptor for ivi.
185 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
186 # if common ||"undefined"
187 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
188 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
189 %package profile_common
190 Summary: The DALi Tizen Adaptor for common
191 Provides: %{name}-compat = %{version}-%{release}
192 Conflicts: %{name}-profile_mobile
193 Conflicts: %{name}-profile_wearable
194 Conflicts: %{name}-profile_tv
195 Conflicts: %{name}-profile_ivi
197 %description profile_common
198 The DALi Tizen Adaptor for common.
201 ##############################
203 ##############################
205 Summary: Development components for the DALi Tizen Adaptor
206 Group: Development/Building
207 Requires: %{name} = %{version}-%{release}
208 Requires: %{name}-integration-devel = %{version}-%{release}
211 Development components for the DALi Tizen Adaptor - public headers and package configs
213 ##############################
215 ##############################
216 %package integration-devel
217 Summary: Integration development package for the Adaptor
218 Group: Development/Building
219 Requires: %{name} = %{version}-%{release}
221 %description integration-devel
222 Integration development package for the Adaptor - headers for integrating with an adaptor library.
224 ##############################
225 # Dali Feedback Plugin
226 ##############################
227 %package dali2-feedback-plugin
228 Summary: Plugin to play haptic and audio feedback for Dali
229 Group: System/Libraries
230 Requires: %{name} = %{version}-%{release}
231 %description dali2-feedback-plugin
232 Feedback plugin to play haptic and audio feedback for Dali
234 ##############################
236 ##############################
240 #Use TZ_PATH when tizen version is 3.x or greater
242 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
243 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
244 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
245 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
246 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
247 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
249 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
250 %define dali_plugin_sound_files /plugins/sounds/
252 ##############################
254 ##############################
257 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
258 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
261 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
265 CXXFLAGS+=" -DWAYLAND"
266 cmake_flags=" -DENABLE_WAYLAND=ON"
268 # Use this conditional when Tizen version is 5.x or greater
269 %if 0%{?tizen_version_major} >= 5
270 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
272 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
273 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
274 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
275 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
278 %if 0%{?enable_debug}
279 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
282 %if 0%{?enable_trace}
283 cmake_flags+=" -DENABLE_TRACE=ON"
287 cd %{_builddir}/%{name}-%{version}/build/tizen
289 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
290 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
291 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
292 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
293 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
294 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
295 %if 0%{?tizen_platform_config_supported}
296 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
299 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
300 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
301 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
302 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
303 cmake_flags+=" -DENABLE_FEEDBACK=YES"
304 cmake_flags+=" -DENABLE_APPFW=YES"
305 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
307 # Set up the build via Cmake
308 #######################################################################
309 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
310 # if mobile || "undefined"
311 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
316 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
319 make %{?jobs:-j%jobs}
324 #######################################################################
325 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
326 # if tv ||"undefined"
327 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
332 cmake -DENABLE_PROFILE=TV $cmake_flags ..
335 make %{?jobs:-j%jobs}
340 #######################################################################
341 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
342 # if wearable || "undefined"
343 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
348 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
351 make %{?jobs:-j%jobs}
356 #######################################################################
357 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
358 # if ivi ||"undefined"
359 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
364 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
367 make %{?jobs:-j%jobs}
372 #######################################################################
374 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
375 # if common ||"undefined"
376 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
381 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
384 make %{?jobs:-j%jobs}
389 ##############################
391 ##############################
395 pushd %{_builddir}/%{name}-%{version}/build/tizen
397 # if mobile || "undefined"
398 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
401 %if "%{?profile}" != "mobile"
402 pushd %{buildroot}%{_libdir}
403 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
405 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
410 # if tv ||"undefined"
411 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
414 %if "%{?profile}" != "tv"
415 pushd %{buildroot}%{_libdir}
416 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
418 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
423 # if wearable || "undefined"
424 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
427 %if "%{?profile}" != "wearable"
428 pushd %{buildroot}%{_libdir}
429 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
431 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
436 # if ivi ||"undefined"
437 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
440 %if "%{?profile}" != "ivi"
441 pushd %{buildroot}%{_libdir}
442 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
444 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
449 # if common ||"undefined"
450 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
453 # No clean so we can gather symbol/size information for the common profile
457 # Create a symbolic link in integration-api to preserve legacy repo build
458 pushd %{buildroot}%{_includedir}/dali/integration-api
459 ln -sf adaptor-framework adaptors
462 ##############################
464 # 1 - Pre Install new package
465 # 2 - Install new package
466 # 3 - Post install new package
467 # 4 - Pre uninstall old package
468 # 5 - Remove files not overwritten by new package
469 # 6 - Post uninstall old package
470 ##############################
472 ##############################
473 # Adaptor package Commands
479 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
491 ##############################
492 # Mobile Profile Commands
493 # if mobile || "undefined"
494 # No need to create a symbolic link on install required if only building this profile
495 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
497 %if "%{?profile}" != "mobile"
499 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
505 %postun profile_mobile
510 ##############################
511 # TV Profile Commands
512 # No need to create a symbolic link on install required if only building this profile
513 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
515 %if "%{?profile}" != "tv"
517 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
528 ##############################
529 # Wearable Profile Commands
530 # No need to create a symbolic link on install required if only building this profile
531 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
532 %post profile_wearable
533 %if "%{?profile}" != "wearable"
535 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
541 %postun profile_wearable
546 ##############################
547 # IVI Profile Commands
548 # No need to create a symbolic link on install required if only building this profile
549 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
551 %if "%{?profile}" != "ivi"
553 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.2.0.0
564 ##############################
565 # Common Profile Commands
566 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
571 %postun profile_common
576 ##############################
577 # Files in Binary Packages
578 ##############################
581 %manifest dali-adaptor.manifest
582 %defattr(-,root,root,-)
583 %dir %{user_shader_cache_dir}
586 %defattr(-,root,root,-)
587 %{_libdir}/libdali2-adaptor.so
588 %{_libdir}/libdali2-adaptor.so.2
589 %{_libdir}/libdali2-adaptor.so.2.0.0
591 #################################################
593 %files dali2-feedback-plugin
594 %manifest dali-adaptor.manifest
595 %defattr(-,root,root,-)
596 %{_libdir}/libdali2-feedback-plugin.so*
597 %{dali_plugin_sound_files}/*
599 #################################################
601 # if common ||"undefined"
602 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
603 %files profile_common
604 %manifest dali-adaptor.manifest
605 # default .so files are housed in the main pkg.
608 # if mobile || "undefined"
609 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
610 %files profile_mobile
611 %manifest dali-adaptor.manifest
612 %defattr(-,root,root,-)
613 %if "%{?profile}" != "mobile"
614 %{_libdir}/libdali2-adaptor.so.mobile
618 # if tv ||"undefined"
619 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
621 %manifest dali-adaptor.manifest
622 %defattr(-,root,root,-)
623 %if "%{?profile}" != "tv"
624 %{_libdir}/libdali2-adaptor.so.tv
628 # if wearable || "undefined"
629 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
630 %files profile_wearable
631 %manifest dali-adaptor.manifest
632 %defattr(-,root,root,-)
633 %if "%{?profile}" != "wearable"
634 %{_libdir}/libdali2-adaptor.so.wearable
638 # if ivi ||"undefined"
639 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
641 %manifest dali-adaptor.manifest
642 %defattr(-,root,root,-)
643 %if "%{?profile}" != "ivi"
644 %{_libdir}/libdali2-adaptor.so.ivi
649 %defattr(-,root,root,-)
650 %{_includedir}/dali/dali.h
651 %{_includedir}/dali/public-api/*
652 %{_includedir}/dali/devel-api/*
653 %{_includedir}/dali/doc/*
654 %{_libdir}/pkgconfig/dali2-adaptor.pc
656 %files integration-devel
657 %defattr(-,root,root,-)
658 %{_includedir}/dali/integration-api/adaptor-framework/*
659 %{_includedir}/dali/integration-api/adaptors
660 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc