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
30 Provides: libdali-adaptor-cxx11.so
31 Provides: libdali-adaptor-cxx11.so.0
32 Provides: libdali-adaptor-cxx11.so.0.0.0
33 Provides: libdali-adaptor.so
34 Provides: libdali-adaptor.so.0
35 Provides: libdali-adaptor.so.0.0.0
37 %define tizen_platform_config_supported 1
38 BuildRequires: pkgconfig(libtzplatform-config)
40 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
41 # if wearable || "undefined"
42 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
43 BuildRequires: pkgconfig(capi-appfw-watch-application)
44 BuildRequires: pkgconfig(appcore-watch)
45 BuildRequires: pkgconfig(screen_connector_provider)
48 BuildRequires: pkgconfig(gles20)
49 BuildRequires: pkgconfig(glesv2)
50 BuildRequires: pkgconfig(ttrace)
52 BuildRequires: dali-devel
53 BuildRequires: dali-integration-devel
55 BuildRequires: pkgconfig
58 BuildRequires: giflib-devel
59 BuildRequires: pkgconfig(fontconfig)
60 BuildRequires: libjpeg-turbo-devel
61 BuildRequires: pkgconfig(vconf)
62 BuildRequires: tts-devel
63 BuildRequires: pkgconfig(dlog)
64 BuildRequires: libdrm-devel
65 BuildRequires: pkgconfig(libexif)
66 BuildRequires: pkgconfig(libpng)
67 BuildRequires: pkgconfig(egl)
68 BuildRequires: libcurl-devel
69 BuildRequires: pkgconfig(harfbuzz)
70 BuildRequires: fribidi-devel
72 BuildRequires: pkgconfig(capi-system-info)
73 BuildRequires: pkgconfig(capi-system-sensor)
75 BuildRequires: pkgconfig(cairo)
77 BuildRequires: pkgconfig(wayland-egl)
78 BuildRequires: pkgconfig(wayland-client)
79 BuildRequires: wayland-devel
80 BuildRequires: wayland-extension-client-devel
82 # dali-adaptor uses ecore mainloop
83 %if 0%{?tizen_version_major} >= 5
84 BuildRequires: pkgconfig(ecore-wl2)
85 BuildRequires: pkgconfig(wayland-egl-tizen)
87 BuildRequires: pkgconfig(ecore-wayland)
90 # dali-adaptor needs tbm_surface in tizen 3.0 wayland
91 BuildRequires: pkgconfig(libtbm)
93 BuildRequires: pkgconfig(tpkp-curl)
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 feedback plugin
106 BuildRequires: pkgconfig(mm-sound)
107 BuildRequires: pkgconfig(feedback)
110 Requires: %{name}-compat = %{version}-%{release}
111 Recommends: %{name}-profile_common = %{version}-%{release}
114 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
115 platform abstraction and application shell
117 ###########################################
118 # Dali adapter for profiles
119 ###########################################
121 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
122 # if mobile || "undefined"
123 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
124 %package profile_mobile
125 Summary: The DALi Tizen Adaptor for mobile
126 Provides: %{name}-compat = %{version}-%{release}
127 Conflicts: %{name}-profile_tv
128 Conflicts: %{name}-profile_wearable
129 Conflicts: %{name}-profile_ivi
130 Conflicts: %{name}-profile_common
132 %description profile_mobile
133 The DALi Tizen Adaptor for mobile.
136 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
137 # if tv ||"undefined"
138 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
140 Summary: The DALi Tizen Adaptor for tv
141 Provides: %{name}-compat = %{version}-%{release}
142 Conflicts: %{name}-profile_mobile
143 Conflicts: %{name}-profile_wearable
144 Conflicts: %{name}-profile_ivi
145 Conflicts: %{name}-profile_common
147 %description profile_tv
148 The DALi Tizen Adaptor for tv.
151 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
152 # if wearable || "undefined"
153 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
154 %package profile_wearable
155 Summary: The DALi Tizen Adaptor for wearable
156 Provides: %{name}-compat = %{version}-%{release}
157 Conflicts: %{name}-profile_mobile
158 Conflicts: %{name}-profile_tv
159 Conflicts: %{name}-profile_ivi
160 Conflicts: %{name}-profile_common
162 %description profile_wearable
163 The DALi Tizen Adaptor for wearable.
166 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
167 # if ivi ||"undefined"
168 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
170 Summary: The DALi Tizen Adaptor for ivi
171 Provides: %{name}-compat = %{version}-%{release}
172 Conflicts: %{name}-profile_mobile
173 Conflicts: %{name}-profile_wearable
174 Conflicts: %{name}-profile_tv
175 Conflicts: %{name}-profile_common
177 %description profile_ivi
178 The DALi Tizen Adaptor for ivi.
181 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
182 # if common ||"undefined"
183 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
184 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
185 %package profile_common
186 Summary: The DALi Tizen Adaptor for common
187 Provides: %{name}-compat = %{version}-%{release}
188 Conflicts: %{name}-profile_mobile
189 Conflicts: %{name}-profile_wearable
190 Conflicts: %{name}-profile_tv
191 Conflicts: %{name}-profile_ivi
193 %description profile_common
194 The DALi Tizen Adaptor for common.
197 ##############################
199 ##############################
201 Summary: Development components for the DALi Tizen Adaptor
202 Group: Development/Building
203 Requires: %{name} = %{version}-%{release}
204 Requires: %{name}-integration-devel = %{version}-%{release}
207 Development components for the DALi Tizen Adaptor - public headers and package configs
209 ##############################
211 ##############################
212 %package integration-devel
213 Summary: Integration development package for the Adaptor
214 Group: Development/Building
215 Requires: %{name} = %{version}-%{release}
217 %description integration-devel
218 Integration development package for the Adaptor - headers for integrating with an adaptor library.
220 ##############################
221 # Dali Feedback Plugin
222 ##############################
223 %package dali-feedback-plugin
224 Summary: Plugin to play haptic and audio feedback for Dali
225 Group: System/Libraries
226 Requires: %{name} = %{version}-%{release}
227 %description dali-feedback-plugin
228 Feedback plugin to play haptic and audio feedback for Dali
230 ##############################
232 ##############################
236 #Use TZ_PATH when tizen version is 3.x or greater
238 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
239 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
240 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
241 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
242 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
243 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
245 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
246 %define dali_plugin_sound_files /plugins/sounds/
248 ##############################
250 ##############################
253 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
254 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
257 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
261 CXXFLAGS+=" -DWAYLAND"
262 cmake_flags=" -DENABLE_WAYLAND=ON"
264 # Use this conditional when Tizen version is 5.x or greater
265 %if 0%{?tizen_version_major} >= 5
266 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
268 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
269 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
270 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
271 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
274 %if 0%{?enable_debug}
275 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
278 %if 0%{?enable_trace}
279 cmake_flags+=" -DENABLE_TRACE=ON"
283 cd %{_builddir}/%{name}-%{version}/build/tizen
285 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
286 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
287 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
288 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
289 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
290 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
291 %if 0%{?tizen_platform_config_supported}
292 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
295 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
296 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
297 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
298 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
299 cmake_flags+=" -DENABLE_FEEDBACK=YES"
300 cmake_flags+=" -DENABLE_APPFW=YES"
302 # Set up the build via Cmake
303 #######################################################################
304 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
305 # if mobile || "undefined"
306 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
311 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
314 make %{?jobs:-j%jobs}
319 #######################################################################
320 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
321 # if tv ||"undefined"
322 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
327 cmake -DENABLE_PROFILE=TV $cmake_flags ..
330 make %{?jobs:-j%jobs}
335 #######################################################################
336 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
337 # if wearable || "undefined"
338 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
343 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
346 make %{?jobs:-j%jobs}
351 #######################################################################
352 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
353 # if ivi ||"undefined"
354 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
359 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
362 make %{?jobs:-j%jobs}
367 #######################################################################
369 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
370 # if common ||"undefined"
371 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
376 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
379 make %{?jobs:-j%jobs}
384 ##############################
386 ##############################
390 pushd %{_builddir}/%{name}-%{version}/build/tizen
392 # if mobile || "undefined"
393 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
396 %if "%{?profile}" != "mobile"
397 pushd %{buildroot}%{_libdir}
398 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
400 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
405 # if tv ||"undefined"
406 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
409 %if "%{?profile}" != "tv"
410 pushd %{buildroot}%{_libdir}
411 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
413 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
418 # if wearable || "undefined"
419 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
422 %if "%{?profile}" != "wearable"
423 pushd %{buildroot}%{_libdir}
424 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable # 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 ivi ||"undefined"
432 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
435 %if "%{?profile}" != "ivi"
436 pushd %{buildroot}%{_libdir}
437 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi # 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 common ||"undefined"
445 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
448 # No clean so we can gather symbol/size information for the common profile
452 # Create links to ensure linking with cxx11 library is preserved
453 pushd %{buildroot}%{_libdir}
454 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so
455 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
456 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
459 # Create a symbolic link in integration-api to preserve legacy repo build
460 pushd %{buildroot}%{_includedir}/dali/integration-api
461 ln -sf adaptor-framework adaptors
464 ##############################
466 # 1 - Pre Install new package
467 # 2 - Install new package
468 # 3 - Post install new package
469 # 4 - Pre uninstall old package
470 # 5 - Remove files not overwritten by new package
471 # 6 - Post uninstall old package
472 ##############################
474 ##############################
475 # Adaptor package Commands
481 for i in mobile tv wearable ivi; do [[ -f libdali-adaptor.so.$i ]] && ln -sf libdali-adaptor.so.$i libdali-adaptor.so.0.0.0; done
493 ##############################
494 # Mobile Profile Commands
495 # if mobile || "undefined"
496 # No need to create a symbolic link on install required if only building this profile
497 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
499 %if "%{?profile}" != "mobile"
501 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
507 %postun profile_mobile
512 ##############################
513 # TV Profile Commands
514 # No need to create a symbolic link on install required if only building this profile
515 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
517 %if "%{?profile}" != "tv"
519 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
530 ##############################
531 # Wearable Profile Commands
532 # No need to create a symbolic link on install required if only building this profile
533 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
534 %post profile_wearable
535 %if "%{?profile}" != "wearable"
537 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
543 %postun profile_wearable
548 ##############################
549 # IVI Profile Commands
550 # No need to create a symbolic link on install required if only building this profile
551 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
553 %if "%{?profile}" != "ivi"
555 ln -sf libdali-adaptor.so.ivi libdali-adaptor.so.0.0.0
566 ##############################
567 # Common Profile Commands
568 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
573 %postun profile_common
578 ##############################
579 # Files in Binary Packages
580 ##############################
583 %manifest dali-adaptor.manifest
584 %defattr(-,root,root,-)
585 %dir %{user_shader_cache_dir}
588 %defattr(-,root,root,-)
589 %{_libdir}/libdali-adaptor-cxx11.so
590 %{_libdir}/libdali-adaptor-cxx11.so.0
591 %{_libdir}/libdali-adaptor-cxx11.so.0.0.0
592 %{_libdir}/libdali-adaptor.so
593 %{_libdir}/libdali-adaptor.so.0
594 %{_libdir}/libdali-adaptor.so.0.0.0
596 #################################################
598 %files dali-feedback-plugin
599 %manifest dali-adaptor.manifest
600 %defattr(-,root,root,-)
601 %{_libdir}/libdali-feedback-plugin-cxx11.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}/libdali-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}/libdali-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}/libdali-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}/libdali-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/dali-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/dali-adaptor-integration.pc