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)
109 %if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5
110 BuildRequires: pkgconfig(capi-ui-autofill)
113 # for feedback plugin
114 BuildRequires: pkgconfig(mm-sound)
115 BuildRequires: pkgconfig(feedback)
116 BuildRequires: pkgconfig(component-based-core-base)
119 %if ( 0%{?tizen_version_major} == 6 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 7
120 BuildRequires: pkgconfig(thorvg)
124 Requires: %{name}-compat = %{version}-%{release}
125 Recommends: %{name}-profile_common = %{version}-%{release}
128 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
129 platform abstraction and application shell
131 ###########################################
132 # Dali adapter for profiles
133 ###########################################
135 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
136 # if mobile || "undefined"
137 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
138 %package profile_mobile
139 Summary: The DALi Tizen Adaptor for mobile
140 Provides: %{name}-compat = %{version}-%{release}
141 Conflicts: %{name}-profile_tv
142 Conflicts: %{name}-profile_wearable
143 Conflicts: %{name}-profile_ivi
144 Conflicts: %{name}-profile_common
146 %description profile_mobile
147 The DALi Tizen Adaptor for mobile.
150 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
151 # if tv ||"undefined"
152 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
154 Summary: The DALi Tizen Adaptor for tv
155 Provides: %{name}-compat = %{version}-%{release}
156 Conflicts: %{name}-profile_mobile
157 Conflicts: %{name}-profile_wearable
158 Conflicts: %{name}-profile_ivi
159 Conflicts: %{name}-profile_common
161 %description profile_tv
162 The DALi Tizen Adaptor for tv.
165 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
166 # if wearable || "undefined"
167 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
168 %package profile_wearable
169 Summary: The DALi Tizen Adaptor for wearable
170 Provides: %{name}-compat = %{version}-%{release}
171 Conflicts: %{name}-profile_mobile
172 Conflicts: %{name}-profile_tv
173 Conflicts: %{name}-profile_ivi
174 Conflicts: %{name}-profile_common
176 %description profile_wearable
177 The DALi Tizen Adaptor for wearable.
180 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
181 # if ivi ||"undefined"
182 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
184 Summary: The DALi Tizen Adaptor for ivi
185 Provides: %{name}-compat = %{version}-%{release}
186 Conflicts: %{name}-profile_mobile
187 Conflicts: %{name}-profile_wearable
188 Conflicts: %{name}-profile_tv
189 Conflicts: %{name}-profile_common
191 %description profile_ivi
192 The DALi Tizen Adaptor for ivi.
195 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
196 # if common ||"undefined"
197 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
198 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
199 %package profile_common
200 Summary: The DALi Tizen Adaptor for common
201 Provides: %{name}-compat = %{version}-%{release}
202 Conflicts: %{name}-profile_mobile
203 Conflicts: %{name}-profile_wearable
204 Conflicts: %{name}-profile_tv
205 Conflicts: %{name}-profile_ivi
207 %description profile_common
208 The DALi Tizen Adaptor for common.
211 ##############################
213 ##############################
215 Summary: Development components for the DALi Tizen Adaptor
216 Group: Development/Building
217 Requires: %{name} = %{version}-%{release}
218 Requires: %{name}-integration-devel = %{version}-%{release}
221 Development components for the DALi Tizen Adaptor - public headers and package configs
223 ##############################
225 ##############################
226 %package integration-devel
227 Summary: Integration development package for the Adaptor
228 Group: Development/Building
229 Requires: %{name} = %{version}-%{release}
231 %description integration-devel
232 Integration development package for the Adaptor - headers for integrating with an adaptor library.
234 ##############################
235 # Dali Feedback Plugin
236 ##############################
237 %package dali2-feedback-plugin
238 Summary: Plugin to play haptic and audio feedback for Dali
239 Group: System/Libraries
240 Requires: %{name} = %{version}-%{release}
241 %description dali2-feedback-plugin
242 Feedback plugin to play haptic and audio feedback for Dali
244 ##############################
246 ##############################
250 #Use TZ_PATH when tizen version is 3.x or greater
252 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
253 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
254 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
255 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
256 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
257 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
259 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
260 %define dali_plugin_sound_files /plugins/sounds/
262 ##############################
264 ##############################
267 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
268 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
271 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
275 CXXFLAGS+=" -DWAYLAND"
276 cmake_flags=" -DENABLE_WAYLAND=ON -DENABLE_ATSPI=ON"
278 # Use this conditional when Tizen version is 5.x or greater
279 %if 0%{?tizen_version_major} >= 5
280 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
282 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
283 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
284 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
285 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
288 %if 0%{?enable_debug}
289 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
292 %if 0%{?enable_trace}
293 cmake_flags+=" -DENABLE_TRACE=ON"
297 cd %{_builddir}/%{name}-%{version}/build/tizen
299 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
300 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
301 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
302 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
303 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
304 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
305 %if 0%{?tizen_platform_config_supported}
306 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
309 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
310 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
311 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
312 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
313 cmake_flags+=" -DENABLE_TIZEN_MINOR_VERSION=%{tizen_version_minor}"
314 cmake_flags+=" -DENABLE_FEEDBACK=YES"
315 cmake_flags+=" -DENABLE_APPFW=YES"
316 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
318 # Set up the build via Cmake
319 #######################################################################
320 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
321 # if mobile || "undefined"
322 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
327 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
330 make %{?jobs:-j%jobs}
335 #######################################################################
336 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
337 # if tv ||"undefined"
338 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
343 cmake -DENABLE_PROFILE=TV $cmake_flags ..
346 make %{?jobs:-j%jobs}
351 #######################################################################
352 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
353 # if wearable || "undefined"
354 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
359 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
362 make %{?jobs:-j%jobs}
367 #######################################################################
368 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
369 # if ivi ||"undefined"
370 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
375 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
378 make %{?jobs:-j%jobs}
383 #######################################################################
385 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
386 # if common ||"undefined"
387 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
392 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
395 make %{?jobs:-j%jobs}
400 ##############################
402 ##############################
406 pushd %{_builddir}/%{name}-%{version}/build/tizen
408 # if mobile || "undefined"
409 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
412 %if "%{?profile}" != "mobile"
413 pushd %{buildroot}%{_libdir}
414 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
416 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
421 # if tv ||"undefined"
422 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
425 %if "%{?profile}" != "tv"
426 pushd %{buildroot}%{_libdir}
427 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
429 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
434 # if wearable || "undefined"
435 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
438 %if "%{?profile}" != "wearable"
439 pushd %{buildroot}%{_libdir}
440 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
442 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
447 # if ivi ||"undefined"
448 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
451 %if "%{?profile}" != "ivi"
452 pushd %{buildroot}%{_libdir}
453 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
455 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
460 # if common ||"undefined"
461 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
464 # No clean so we can gather symbol/size information for the common profile
468 # Create a symbolic link in integration-api to preserve legacy repo build
469 pushd %{buildroot}%{_includedir}/dali/integration-api
470 ln -sf adaptor-framework adaptors
473 ##############################
475 # 1 - Pre Install new package
476 # 2 - Install new package
477 # 3 - Post install new package
478 # 4 - Pre uninstall old package
479 # 5 - Remove files not overwritten by new package
480 # 6 - Post uninstall old package
481 ##############################
483 ##############################
484 # Adaptor package Commands
490 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
502 ##############################
503 # Mobile Profile Commands
504 # if mobile || "undefined"
505 # No need to create a symbolic link on install required if only building this profile
506 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
508 %if "%{?profile}" != "mobile"
510 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
516 %postun profile_mobile
521 ##############################
522 # TV Profile Commands
523 # No need to create a symbolic link on install required if only building this profile
524 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
526 %if "%{?profile}" != "tv"
528 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
539 ##############################
540 # Wearable Profile Commands
541 # No need to create a symbolic link on install required if only building this profile
542 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
543 %post profile_wearable
544 %if "%{?profile}" != "wearable"
546 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
552 %postun profile_wearable
557 ##############################
558 # IVI Profile Commands
559 # No need to create a symbolic link on install required if only building this profile
560 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
562 %if "%{?profile}" != "ivi"
564 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.2.0.0
575 ##############################
576 # Common Profile Commands
577 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
582 %postun profile_common
587 ##############################
588 # Files in Binary Packages
589 ##############################
592 %manifest dali-adaptor.manifest
593 %defattr(-,root,root,-)
594 %dir %{user_shader_cache_dir}
597 %defattr(-,root,root,-)
598 %{_libdir}/libdali2-adaptor.so
599 %{_libdir}/libdali2-adaptor.so.2
600 %{_libdir}/libdali2-adaptor.so.2.0.0
602 #################################################
604 %files dali2-feedback-plugin
605 %manifest dali-adaptor.manifest
606 %defattr(-,root,root,-)
607 %{_libdir}/libdali2-feedback-plugin.so*
608 %{dali_plugin_sound_files}/*
610 #################################################
612 # if common ||"undefined"
613 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
614 %files profile_common
615 %manifest dali-adaptor.manifest
616 # default .so files are housed in the main pkg.
619 # if mobile || "undefined"
620 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
621 %files profile_mobile
622 %manifest dali-adaptor.manifest
623 %defattr(-,root,root,-)
624 %if "%{?profile}" != "mobile"
625 %{_libdir}/libdali2-adaptor.so.mobile
629 # if tv ||"undefined"
630 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
632 %manifest dali-adaptor.manifest
633 %defattr(-,root,root,-)
634 %if "%{?profile}" != "tv"
635 %{_libdir}/libdali2-adaptor.so.tv
639 # if wearable || "undefined"
640 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
641 %files profile_wearable
642 %manifest dali-adaptor.manifest
643 %defattr(-,root,root,-)
644 %if "%{?profile}" != "wearable"
645 %{_libdir}/libdali2-adaptor.so.wearable
649 # if ivi ||"undefined"
650 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
652 %manifest dali-adaptor.manifest
653 %defattr(-,root,root,-)
654 %if "%{?profile}" != "ivi"
655 %{_libdir}/libdali2-adaptor.so.ivi
660 %defattr(-,root,root,-)
661 %{_includedir}/dali/dali.h
662 %{_includedir}/dali/public-api/*
663 %{_includedir}/dali/devel-api/*
664 %{_includedir}/dali/doc/*
665 %{_libdir}/pkgconfig/dali2-adaptor.pc
667 %files integration-devel
668 %defattr(-,root,root,-)
669 %{_includedir}/dali/integration-api/adaptor-framework/*
670 %{_includedir}/dali/integration-api/adaptors
671 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc