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 %if ( 0%{?tizen_version_major} == 6 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 7
115 BuildRequires: pkgconfig(thorvg)
119 Requires: %{name}-compat = %{version}-%{release}
120 Recommends: %{name}-profile_common = %{version}-%{release}
123 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
124 platform abstraction and application shell
126 ###########################################
127 # Dali adapter for profiles
128 ###########################################
130 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
131 # if mobile || "undefined"
132 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
133 %package profile_mobile
134 Summary: The DALi Tizen Adaptor for mobile
135 Provides: %{name}-compat = %{version}-%{release}
136 Conflicts: %{name}-profile_tv
137 Conflicts: %{name}-profile_wearable
138 Conflicts: %{name}-profile_ivi
139 Conflicts: %{name}-profile_common
141 %description profile_mobile
142 The DALi Tizen Adaptor for mobile.
145 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
146 # if tv ||"undefined"
147 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
149 Summary: The DALi Tizen Adaptor for tv
150 Provides: %{name}-compat = %{version}-%{release}
151 Conflicts: %{name}-profile_mobile
152 Conflicts: %{name}-profile_wearable
153 Conflicts: %{name}-profile_ivi
154 Conflicts: %{name}-profile_common
156 %description profile_tv
157 The DALi Tizen Adaptor for tv.
160 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
161 # if wearable || "undefined"
162 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
163 %package profile_wearable
164 Summary: The DALi Tizen Adaptor for wearable
165 Provides: %{name}-compat = %{version}-%{release}
166 Conflicts: %{name}-profile_mobile
167 Conflicts: %{name}-profile_tv
168 Conflicts: %{name}-profile_ivi
169 Conflicts: %{name}-profile_common
171 %description profile_wearable
172 The DALi Tizen Adaptor for wearable.
175 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
176 # if ivi ||"undefined"
177 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
179 Summary: The DALi Tizen Adaptor for ivi
180 Provides: %{name}-compat = %{version}-%{release}
181 Conflicts: %{name}-profile_mobile
182 Conflicts: %{name}-profile_wearable
183 Conflicts: %{name}-profile_tv
184 Conflicts: %{name}-profile_common
186 %description profile_ivi
187 The DALi Tizen Adaptor for ivi.
190 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
191 # if common ||"undefined"
192 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
193 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
194 %package profile_common
195 Summary: The DALi Tizen Adaptor for common
196 Provides: %{name}-compat = %{version}-%{release}
197 Conflicts: %{name}-profile_mobile
198 Conflicts: %{name}-profile_wearable
199 Conflicts: %{name}-profile_tv
200 Conflicts: %{name}-profile_ivi
202 %description profile_common
203 The DALi Tizen Adaptor for common.
206 ##############################
208 ##############################
210 Summary: Development components for the DALi Tizen Adaptor
211 Group: Development/Building
212 Requires: %{name} = %{version}-%{release}
213 Requires: %{name}-integration-devel = %{version}-%{release}
216 Development components for the DALi Tizen Adaptor - public headers and package configs
218 ##############################
220 ##############################
221 %package integration-devel
222 Summary: Integration development package for the Adaptor
223 Group: Development/Building
224 Requires: %{name} = %{version}-%{release}
226 %description integration-devel
227 Integration development package for the Adaptor - headers for integrating with an adaptor library.
229 ##############################
230 # Dali Feedback Plugin
231 ##############################
232 %package dali2-feedback-plugin
233 Summary: Plugin to play haptic and audio feedback for Dali
234 Group: System/Libraries
235 Requires: %{name} = %{version}-%{release}
236 %description dali2-feedback-plugin
237 Feedback plugin to play haptic and audio feedback for Dali
239 ##############################
241 ##############################
245 #Use TZ_PATH when tizen version is 3.x or greater
247 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
248 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
249 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
250 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
251 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
252 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
254 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
255 %define dali_plugin_sound_files /plugins/sounds/
257 ##############################
259 ##############################
262 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
263 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
266 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
270 CXXFLAGS+=" -DWAYLAND"
271 cmake_flags=" -DENABLE_WAYLAND=ON -DENABLE_ATSPI=ON"
273 # Use this conditional when Tizen version is 5.x or greater
274 %if 0%{?tizen_version_major} >= 5
275 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
277 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
278 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
279 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
280 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
283 %if 0%{?enable_debug}
284 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
287 %if 0%{?enable_trace}
288 cmake_flags+=" -DENABLE_TRACE=ON"
292 cd %{_builddir}/%{name}-%{version}/build/tizen
294 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
295 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
296 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
297 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
298 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
299 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
300 %if 0%{?tizen_platform_config_supported}
301 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
304 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
305 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
306 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
307 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
308 cmake_flags+=" -DENABLE_FEEDBACK=YES"
309 cmake_flags+=" -DENABLE_APPFW=YES"
310 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
312 # Set up the build via Cmake
313 #######################################################################
314 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
315 # if mobile || "undefined"
316 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
321 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
324 make %{?jobs:-j%jobs}
329 #######################################################################
330 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
331 # if tv ||"undefined"
332 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
337 cmake -DENABLE_PROFILE=TV $cmake_flags ..
340 make %{?jobs:-j%jobs}
345 #######################################################################
346 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
347 # if wearable || "undefined"
348 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
353 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
356 make %{?jobs:-j%jobs}
361 #######################################################################
362 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
363 # if ivi ||"undefined"
364 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
369 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
372 make %{?jobs:-j%jobs}
377 #######################################################################
379 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
380 # if common ||"undefined"
381 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
386 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
389 make %{?jobs:-j%jobs}
394 ##############################
396 ##############################
400 pushd %{_builddir}/%{name}-%{version}/build/tizen
402 # if mobile || "undefined"
403 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
406 %if "%{?profile}" != "mobile"
407 pushd %{buildroot}%{_libdir}
408 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
410 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
415 # if tv ||"undefined"
416 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
419 %if "%{?profile}" != "tv"
420 pushd %{buildroot}%{_libdir}
421 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
423 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
428 # if wearable || "undefined"
429 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
432 %if "%{?profile}" != "wearable"
433 pushd %{buildroot}%{_libdir}
434 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
436 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
441 # if ivi ||"undefined"
442 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
445 %if "%{?profile}" != "ivi"
446 pushd %{buildroot}%{_libdir}
447 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
449 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
454 # if common ||"undefined"
455 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
458 # No clean so we can gather symbol/size information for the common profile
462 # Create a symbolic link in integration-api to preserve legacy repo build
463 pushd %{buildroot}%{_includedir}/dali/integration-api
464 ln -sf adaptor-framework adaptors
467 ##############################
469 # 1 - Pre Install new package
470 # 2 - Install new package
471 # 3 - Post install new package
472 # 4 - Pre uninstall old package
473 # 5 - Remove files not overwritten by new package
474 # 6 - Post uninstall old package
475 ##############################
477 ##############################
478 # Adaptor package Commands
484 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
496 ##############################
497 # Mobile Profile Commands
498 # if mobile || "undefined"
499 # No need to create a symbolic link on install required if only building this profile
500 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
502 %if "%{?profile}" != "mobile"
504 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
510 %postun profile_mobile
515 ##############################
516 # TV Profile Commands
517 # No need to create a symbolic link on install required if only building this profile
518 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
520 %if "%{?profile}" != "tv"
522 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
533 ##############################
534 # Wearable Profile Commands
535 # No need to create a symbolic link on install required if only building this profile
536 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
537 %post profile_wearable
538 %if "%{?profile}" != "wearable"
540 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
546 %postun profile_wearable
551 ##############################
552 # IVI Profile Commands
553 # No need to create a symbolic link on install required if only building this profile
554 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
556 %if "%{?profile}" != "ivi"
558 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.2.0.0
569 ##############################
570 # Common Profile Commands
571 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
576 %postun profile_common
581 ##############################
582 # Files in Binary Packages
583 ##############################
586 %manifest dali-adaptor.manifest
587 %defattr(-,root,root,-)
588 %dir %{user_shader_cache_dir}
591 %defattr(-,root,root,-)
592 %{_libdir}/libdali2-adaptor.so
593 %{_libdir}/libdali2-adaptor.so.2
594 %{_libdir}/libdali2-adaptor.so.2.0.0
596 #################################################
598 %files dali2-feedback-plugin
599 %manifest dali-adaptor.manifest
600 %defattr(-,root,root,-)
601 %{_libdir}/libdali2-feedback-plugin.so*
602 %{dali_plugin_sound_files}/*
604 #################################################
606 # if common ||"undefined"
607 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
608 %files profile_common
609 %manifest dali-adaptor.manifest
610 # default .so files are housed in the main pkg.
613 # if mobile || "undefined"
614 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
615 %files profile_mobile
616 %manifest dali-adaptor.manifest
617 %defattr(-,root,root,-)
618 %if "%{?profile}" != "mobile"
619 %{_libdir}/libdali2-adaptor.so.mobile
623 # if tv ||"undefined"
624 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
626 %manifest dali-adaptor.manifest
627 %defattr(-,root,root,-)
628 %if "%{?profile}" != "tv"
629 %{_libdir}/libdali2-adaptor.so.tv
633 # if wearable || "undefined"
634 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
635 %files profile_wearable
636 %manifest dali-adaptor.manifest
637 %defattr(-,root,root,-)
638 %if "%{?profile}" != "wearable"
639 %{_libdir}/libdali2-adaptor.so.wearable
643 # if ivi ||"undefined"
644 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
646 %manifest dali-adaptor.manifest
647 %defattr(-,root,root,-)
648 %if "%{?profile}" != "ivi"
649 %{_libdir}/libdali2-adaptor.so.ivi
654 %defattr(-,root,root,-)
655 %{_includedir}/dali/dali.h
656 %{_includedir}/dali/public-api/*
657 %{_includedir}/dali/devel-api/*
658 %{_includedir}/dali/doc/*
659 %{_libdir}/pkgconfig/dali2-adaptor.pc
661 %files integration-devel
662 %defattr(-,root,root,-)
663 %{_includedir}/dali/integration-api/adaptor-framework/*
664 %{_includedir}/dali/integration-api/adaptors
665 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc