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)
41 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(wayland-egl)
71 BuildRequires: pkgconfig(wayland-client)
72 BuildRequires: pkgconfig(input-method-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(app-core-ui-cpp)
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 #Use TZ_PATH when tizen version is 3.x or greater
240 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
241 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
242 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
243 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
244 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
245 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
247 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
248 %define dali_plugin_sound_files /plugins/sounds/
250 ##############################
252 ##############################
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 %if 0%{?enable_streamline}
274 cmake_flags+=" -DENABLE_TRACE_STREAMLINE=ON"
276 cmake_flags+=" -DENABLE_TRACE=ON"
279 # Use this conditional when Tizen version is 5.x or greater
280 %if 0%{?tizen_version_major} >= 5
281 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
283 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
284 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
285 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
286 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
289 # Use this conditional when Tizen version is 7.x or greater
290 %if 0%{?tizen_version_major} >= 7
291 CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
294 # Use this conditional when Tizen version is 8.x or greater
295 %if 0%{?tizen_version_major} >= 8
296 CXXFLAGS+=" -DOVER_TIZEN_VERSION_8"
299 %if 0%{?enable_debug}
300 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
303 %if 0%{?enable_logging}
304 cmake_flags+=" -DENABLE_NETWORK_LOGGING=ON"
308 cd %{_builddir}/%{name}-%{version}/build/tizen
310 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
311 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
312 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
313 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
314 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
315 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
316 %if 0%{?tizen_platform_config_supported}
317 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
320 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
321 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
322 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
323 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
324 cmake_flags+=" -DENABLE_FEEDBACK=YES"
325 cmake_flags+=" -DENABLE_APPFW=YES"
326 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
328 # Set up the build via Cmake
329 #######################################################################
330 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
331 # if mobile || "undefined"
332 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
337 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
340 make %{?jobs:-j%jobs}
345 #######################################################################
346 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
347 # if tv ||"undefined"
348 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
353 cmake -DENABLE_PROFILE=TV $cmake_flags ..
356 make %{?jobs:-j%jobs}
361 #######################################################################
362 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
363 # if wearable || "undefined"
364 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
369 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
372 make %{?jobs:-j%jobs}
377 #######################################################################
378 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
379 # if ivi ||"undefined"
380 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
385 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
388 make %{?jobs:-j%jobs}
393 #######################################################################
395 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
396 # if common ||"undefined"
397 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
402 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
405 make %{?jobs:-j%jobs}
410 ##############################
412 ##############################
416 pushd %{_builddir}/%{name}-%{version}/build/tizen
418 # if mobile || "undefined"
419 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
422 %if "%{?profile}" != "mobile"
423 pushd %{buildroot}%{_libdir}
424 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
426 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
431 # if tv ||"undefined"
432 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
435 %if "%{?profile}" != "tv"
436 pushd %{buildroot}%{_libdir}
437 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
439 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
444 # if wearable || "undefined"
445 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
448 %if "%{?profile}" != "wearable"
449 pushd %{buildroot}%{_libdir}
450 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
452 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
457 # if ivi ||"undefined"
458 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
461 %if "%{?profile}" != "ivi"
462 pushd %{buildroot}%{_libdir}
463 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
465 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
470 # if common ||"undefined"
471 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
474 # No clean so we can gather symbol/size information for the common profile
478 # Create a symbolic link in integration-api to preserve legacy repo build
479 pushd %{buildroot}%{_includedir}/dali/integration-api
480 ln -sf adaptor-framework adaptors
483 ##############################
485 # 1 - Pre Install new package
486 # 2 - Install new package
487 # 3 - Post install new package
488 # 4 - Pre uninstall old package
489 # 5 - Remove files not overwritten by new package
490 # 6 - Post uninstall old package
491 ##############################
493 ##############################
494 # Adaptor package Commands
500 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
512 ##############################
513 # Mobile Profile Commands
514 # if mobile || "undefined"
515 # No need to create a symbolic link on install required if only building this profile
516 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
518 %if "%{?profile}" != "mobile"
520 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
526 %postun profile_mobile
531 ##############################
532 # TV Profile Commands
533 # No need to create a symbolic link on install required if only building this profile
534 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
536 %if "%{?profile}" != "tv"
538 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
549 ##############################
550 # Wearable Profile Commands
551 # No need to create a symbolic link on install required if only building this profile
552 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
553 %post profile_wearable
554 %if "%{?profile}" != "wearable"
556 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
562 %postun profile_wearable
567 ##############################
568 # IVI Profile Commands
569 # No need to create a symbolic link on install required if only building this profile
570 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
572 %if "%{?profile}" != "ivi"
574 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.2.0.0
585 ##############################
586 # Common Profile Commands
587 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
592 %postun profile_common
597 ##############################
598 # Files in Binary Packages
599 ##############################
602 %manifest dali-adaptor.manifest
603 %defattr(-,root,root,-)
604 %dir %{user_shader_cache_dir}
607 %defattr(-,root,root,-)
608 %{_libdir}/libdali2-adaptor.so
609 %{_libdir}/libdali2-adaptor.so.2
610 %{_libdir}/libdali2-adaptor.so.2.0.0
612 #################################################
614 %files dali2-feedback-plugin
615 %manifest dali-adaptor.manifest
616 %defattr(-,root,root,-)
617 %{_libdir}/libdali2-feedback-plugin.so*
618 %{dali_plugin_sound_files}/*
620 #################################################
622 # if common ||"undefined"
623 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
624 %files profile_common
625 %manifest dali-adaptor.manifest
626 # default .so files are housed in the main pkg.
629 # if mobile || "undefined"
630 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
631 %files profile_mobile
632 %manifest dali-adaptor.manifest
633 %defattr(-,root,root,-)
634 %if "%{?profile}" != "mobile"
635 %{_libdir}/libdali2-adaptor.so.mobile
639 # if tv ||"undefined"
640 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
642 %manifest dali-adaptor.manifest
643 %defattr(-,root,root,-)
644 %if "%{?profile}" != "tv"
645 %{_libdir}/libdali2-adaptor.so.tv
649 # if wearable || "undefined"
650 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
651 %files profile_wearable
652 %manifest dali-adaptor.manifest
653 %defattr(-,root,root,-)
654 %if "%{?profile}" != "wearable"
655 %{_libdir}/libdali2-adaptor.so.wearable
659 # if ivi ||"undefined"
660 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
662 %manifest dali-adaptor.manifest
663 %defattr(-,root,root,-)
664 %if "%{?profile}" != "ivi"
665 %{_libdir}/libdali2-adaptor.so.ivi
670 %defattr(-,root,root,-)
671 %{_includedir}/dali/dali.h
672 %{_includedir}/dali/public-api/*
673 %{_includedir}/dali/devel-api/*
674 %{_includedir}/dali/doc/*
675 %{_libdir}/pkgconfig/dali2-adaptor.pc
677 %files integration-devel
678 %defattr(-,root,root,-)
679 %{_includedir}/dali/integration-api/adaptor-framework/*
680 %{_includedir}/dali/integration-api/adaptors
681 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc