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(cairo)
72 BuildRequires: pkgconfig(wayland-egl)
73 BuildRequires: pkgconfig(wayland-client)
74 BuildRequires: pkgconfig(input-method-client)
75 BuildRequires: wayland-devel
76 BuildRequires: wayland-extension-client-devel
78 # WebP support only from Tizen 6 onwards
79 %if 0%{?tizen_version_major} >= 6
80 BuildRequires: pkgconfig(libwebp)
81 BuildRequires: pkgconfig(libwebpdecoder)
82 BuildRequires: pkgconfig(libwebpdemux)
83 BuildRequires: pkgconfig(libwebpmux)
86 # We use ecore mainloop
87 %if 0%{?tizen_version_major} >= 5
88 BuildRequires: pkgconfig(ecore-wl2)
89 BuildRequires: pkgconfig(wayland-egl-tizen)
91 BuildRequires: pkgconfig(ecore-wayland)
94 # We need tbm_surface in tizen 3.0 wayland
95 BuildRequires: pkgconfig(libtbm)
98 BuildRequires: pkgconfig(app-core-ui-cpp)
99 BuildRequires: pkgconfig(appcore-widget-base)
100 BuildRequires: pkgconfig(bundle)
101 BuildRequires: pkgconfig(capi-appfw-app-common)
102 BuildRequires: pkgconfig(capi-appfw-app-control)
103 BuildRequires: pkgconfig(ecore-imf)
105 BuildRequires: pkgconfig(capi-system-system-settings)
107 # for ATSPI (Accessibility) support
108 BuildRequires: pkgconfig(eldbus)
110 # for feedback plugin
111 BuildRequires: pkgconfig(mm-sound)
112 BuildRequires: pkgconfig(feedback)
113 BuildRequires: pkgconfig(component-based-core-base)
116 %if ( 0%{?tizen_version_major} == 6 && 0%{?tizen_version_minor} >= 5 ) || 0%{?tizen_version_major} >= 7
117 BuildRequires: pkgconfig(thorvg)
121 Requires: %{name}-compat = %{version}-%{release}
122 Recommends: %{name}-profile_common = %{version}-%{release}
125 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
126 platform abstraction and application shell
128 ###########################################
129 # Dali adapter for profiles
130 ###########################################
132 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
133 # if mobile || "undefined"
134 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
135 %package profile_mobile
136 Summary: The DALi Tizen Adaptor for mobile
137 Provides: %{name}-compat = %{version}-%{release}
138 Conflicts: %{name}-profile_tv
139 Conflicts: %{name}-profile_wearable
140 Conflicts: %{name}-profile_ivi
141 Conflicts: %{name}-profile_common
143 %description profile_mobile
144 The DALi Tizen Adaptor for mobile.
147 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
148 # if tv ||"undefined"
149 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
151 Summary: The DALi Tizen Adaptor for tv
152 Provides: %{name}-compat = %{version}-%{release}
153 Conflicts: %{name}-profile_mobile
154 Conflicts: %{name}-profile_wearable
155 Conflicts: %{name}-profile_ivi
156 Conflicts: %{name}-profile_common
158 %description profile_tv
159 The DALi Tizen Adaptor for tv.
162 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
163 # if wearable || "undefined"
164 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
165 %package profile_wearable
166 Summary: The DALi Tizen Adaptor for wearable
167 Provides: %{name}-compat = %{version}-%{release}
168 Conflicts: %{name}-profile_mobile
169 Conflicts: %{name}-profile_tv
170 Conflicts: %{name}-profile_ivi
171 Conflicts: %{name}-profile_common
173 %description profile_wearable
174 The DALi Tizen Adaptor for wearable.
177 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
178 # if ivi ||"undefined"
179 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
181 Summary: The DALi Tizen Adaptor for ivi
182 Provides: %{name}-compat = %{version}-%{release}
183 Conflicts: %{name}-profile_mobile
184 Conflicts: %{name}-profile_wearable
185 Conflicts: %{name}-profile_tv
186 Conflicts: %{name}-profile_common
188 %description profile_ivi
189 The DALi Tizen Adaptor for ivi.
192 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
193 # if common ||"undefined"
194 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
195 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
196 %package profile_common
197 Summary: The DALi Tizen Adaptor for common
198 Provides: %{name}-compat = %{version}-%{release}
199 Conflicts: %{name}-profile_mobile
200 Conflicts: %{name}-profile_wearable
201 Conflicts: %{name}-profile_tv
202 Conflicts: %{name}-profile_ivi
204 %description profile_common
205 The DALi Tizen Adaptor for common.
208 ##############################
210 ##############################
212 Summary: Development components for the DALi Tizen Adaptor
213 Group: Development/Building
214 Requires: %{name} = %{version}-%{release}
215 Requires: %{name}-integration-devel = %{version}-%{release}
218 Development components for the DALi Tizen Adaptor - public headers and package configs
220 ##############################
222 ##############################
223 %package integration-devel
224 Summary: Integration development package for the Adaptor
225 Group: Development/Building
226 Requires: %{name} = %{version}-%{release}
228 %description integration-devel
229 Integration development package for the Adaptor - headers for integrating with an adaptor library.
231 ##############################
232 # Dali Feedback Plugin
233 ##############################
234 %package dali2-feedback-plugin
235 Summary: Plugin to play haptic and audio feedback for Dali
236 Group: System/Libraries
237 Requires: %{name} = %{version}-%{release}
238 %description dali2-feedback-plugin
239 Feedback plugin to play haptic and audio feedback for Dali
241 #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 ##############################
259 ##############################
261 ##############################
264 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
265 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
268 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
272 CXXFLAGS+=" -DWAYLAND"
273 cmake_flags=" -DENABLE_WAYLAND=ON -DENABLE_ATSPI=ON"
275 %if 0%{?enable_streamline}
276 cmake_flags+=" -DENABLE_TRACE_STREAMLINE=ON"
278 cmake_flags+=" -DENABLE_TRACE=ON"
281 # Use this conditional when Tizen version is 5.x or greater
282 %if 0%{?tizen_version_major} >= 5
283 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
285 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
286 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
287 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
288 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
291 # Use this conditional when Tizen version is 7.x or greater
292 %if 0%{?tizen_version_major} >= 7
293 CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
296 # Use this conditional when Tizen version is 8.x or greater
297 %if 0%{?tizen_version_major} >= 8
298 CXXFLAGS+=" -DOVER_TIZEN_VERSION_8"
301 %if 0%{?enable_debug}
302 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
305 %if 0%{?enable_logging}
306 cmake_flags+=" -DENABLE_NETWORK_LOGGING=ON"
310 cd %{_builddir}/%{name}-%{version}/build/tizen
312 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
313 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
314 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
315 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
316 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
317 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
318 %if 0%{?tizen_platform_config_supported}
319 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
322 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
323 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
324 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
325 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
326 cmake_flags+=" -DENABLE_FEEDBACK=YES"
327 cmake_flags+=" -DENABLE_APPFW=YES"
328 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
330 # Set up the build via Cmake
331 #######################################################################
332 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
333 # if mobile || "undefined"
334 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
339 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
342 make %{?jobs:-j%jobs}
347 #######################################################################
348 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
349 # if tv ||"undefined"
350 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
355 cmake -DENABLE_PROFILE=TV $cmake_flags ..
358 make %{?jobs:-j%jobs}
363 #######################################################################
364 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
365 # if wearable || "undefined"
366 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
371 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
374 make %{?jobs:-j%jobs}
379 #######################################################################
380 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
381 # if ivi ||"undefined"
382 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
387 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
390 make %{?jobs:-j%jobs}
395 #######################################################################
397 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
398 # if common ||"undefined"
399 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
404 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
407 make %{?jobs:-j%jobs}
412 ##############################
414 ##############################
418 pushd %{_builddir}/%{name}-%{version}/build/tizen
420 # if mobile || "undefined"
421 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
424 %if "%{?profile}" != "mobile"
425 pushd %{buildroot}%{_libdir}
426 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
428 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
433 # if tv ||"undefined"
434 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
437 %if "%{?profile}" != "tv"
438 pushd %{buildroot}%{_libdir}
439 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
441 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
446 # if wearable || "undefined"
447 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
450 %if "%{?profile}" != "wearable"
451 pushd %{buildroot}%{_libdir}
452 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
454 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
459 # if ivi ||"undefined"
460 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
463 %if "%{?profile}" != "ivi"
464 pushd %{buildroot}%{_libdir}
465 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
467 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
472 # if common ||"undefined"
473 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
476 # No clean so we can gather symbol/size information for the common profile
480 # Create a symbolic link in integration-api to preserve legacy repo build
481 pushd %{buildroot}%{_includedir}/dali/integration-api
482 ln -sf adaptor-framework adaptors
485 ##############################
487 # 1 - Pre Install new package
488 # 2 - Install new package
489 # 3 - Post install new package
490 # 4 - Pre uninstall old package
491 # 5 - Remove files not overwritten by new package
492 # 6 - Post uninstall old package
493 ##############################
495 ##############################
496 # Adaptor package Commands
502 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
514 ##############################
515 # Mobile Profile Commands
516 # if mobile || "undefined"
517 # No need to create a symbolic link on install required if only building this profile
518 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
520 %if "%{?profile}" != "mobile"
522 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
528 %postun profile_mobile
533 ##############################
534 # TV Profile Commands
535 # No need to create a symbolic link on install required if only building this profile
536 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
538 %if "%{?profile}" != "tv"
540 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
551 ##############################
552 # Wearable Profile Commands
553 # No need to create a symbolic link on install required if only building this profile
554 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
555 %post profile_wearable
556 %if "%{?profile}" != "wearable"
558 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
564 %postun profile_wearable
569 ##############################
570 # IVI Profile Commands
571 # No need to create a symbolic link on install required if only building this profile
572 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
574 %if "%{?profile}" != "ivi"
576 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.2.0.0
587 ##############################
588 # Common Profile Commands
589 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
594 %postun profile_common
599 ##############################
600 # Files in Binary Packages
601 ##############################
604 %manifest dali-adaptor.manifest
605 %defattr(-,root,root,-)
606 %dir %{user_shader_cache_dir}
609 %defattr(-,root,root,-)
610 %{_libdir}/libdali2-adaptor.so
611 %{_libdir}/libdali2-adaptor.so.2
612 %{_libdir}/libdali2-adaptor.so.2.0.0
614 #################################################
616 %files dali2-feedback-plugin
617 %manifest dali-adaptor.manifest
618 %defattr(-,root,root,-)
619 %{_libdir}/libdali2-feedback-plugin.so*
620 %{dali_plugin_sound_files}/*
622 #################################################
624 # if common ||"undefined"
625 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
626 %files profile_common
627 %manifest dali-adaptor.manifest
628 # default .so files are housed in the main pkg.
631 # if mobile || "undefined"
632 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
633 %files profile_mobile
634 %manifest dali-adaptor.manifest
635 %defattr(-,root,root,-)
636 %if "%{?profile}" != "mobile"
637 %{_libdir}/libdali2-adaptor.so.mobile
641 # if tv ||"undefined"
642 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
644 %manifest dali-adaptor.manifest
645 %defattr(-,root,root,-)
646 %if "%{?profile}" != "tv"
647 %{_libdir}/libdali2-adaptor.so.tv
651 # if wearable || "undefined"
652 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
653 %files profile_wearable
654 %manifest dali-adaptor.manifest
655 %defattr(-,root,root,-)
656 %if "%{?profile}" != "wearable"
657 %{_libdir}/libdali2-adaptor.so.wearable
661 # if ivi ||"undefined"
662 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
664 %manifest dali-adaptor.manifest
665 %defattr(-,root,root,-)
666 %if "%{?profile}" != "ivi"
667 %{_libdir}/libdali2-adaptor.so.ivi
672 %defattr(-,root,root,-)
673 %{_includedir}/dali/dali.h
674 %{_includedir}/dali/public-api/*
675 %{_includedir}/dali/devel-api/*
676 %{_includedir}/dali/doc/*
677 %{_libdir}/pkgconfig/dali2-adaptor.pc
679 %files integration-devel
680 %defattr(-,root,root,-)
681 %{_includedir}/dali/integration-api/adaptor-framework/*
682 %{_includedir}/dali/integration-api/adaptors
683 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc