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)
106 %if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5
107 BuildRequires: pkgconfig(capi-ui-autofill)
110 # for feedback plugin
111 BuildRequires: pkgconfig(mm-sound)
112 BuildRequires: pkgconfig(feedback)
115 Requires: %{name}-compat = %{version}-%{release}
116 Recommends: %{name}-profile_common = %{version}-%{release}
119 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
120 platform abstraction and application shell
122 ###########################################
123 # Dali adapter for profiles
124 ###########################################
126 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
127 # if mobile || "undefined"
128 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
129 %package profile_mobile
130 Summary: The DALi Tizen Adaptor for mobile
131 Provides: %{name}-compat = %{version}-%{release}
132 Conflicts: %{name}-profile_tv
133 Conflicts: %{name}-profile_wearable
134 Conflicts: %{name}-profile_ivi
135 Conflicts: %{name}-profile_common
137 %description profile_mobile
138 The DALi Tizen Adaptor for mobile.
141 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
142 # if tv ||"undefined"
143 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
145 Summary: The DALi Tizen Adaptor for tv
146 Provides: %{name}-compat = %{version}-%{release}
147 Conflicts: %{name}-profile_mobile
148 Conflicts: %{name}-profile_wearable
149 Conflicts: %{name}-profile_ivi
150 Conflicts: %{name}-profile_common
152 %description profile_tv
153 The DALi Tizen Adaptor for tv.
156 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
157 # if wearable || "undefined"
158 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
159 %package profile_wearable
160 Summary: The DALi Tizen Adaptor for wearable
161 Provides: %{name}-compat = %{version}-%{release}
162 Conflicts: %{name}-profile_mobile
163 Conflicts: %{name}-profile_tv
164 Conflicts: %{name}-profile_ivi
165 Conflicts: %{name}-profile_common
167 %description profile_wearable
168 The DALi Tizen Adaptor for wearable.
171 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
172 # if ivi ||"undefined"
173 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
175 Summary: The DALi Tizen Adaptor for ivi
176 Provides: %{name}-compat = %{version}-%{release}
177 Conflicts: %{name}-profile_mobile
178 Conflicts: %{name}-profile_wearable
179 Conflicts: %{name}-profile_tv
180 Conflicts: %{name}-profile_common
182 %description profile_ivi
183 The DALi Tizen Adaptor for ivi.
186 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
187 # if common ||"undefined"
188 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
189 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
190 %package profile_common
191 Summary: The DALi Tizen Adaptor for common
192 Provides: %{name}-compat = %{version}-%{release}
193 Conflicts: %{name}-profile_mobile
194 Conflicts: %{name}-profile_wearable
195 Conflicts: %{name}-profile_tv
196 Conflicts: %{name}-profile_ivi
198 %description profile_common
199 The DALi Tizen Adaptor for common.
202 ##############################
204 ##############################
206 Summary: Development components for the DALi Tizen Adaptor
207 Group: Development/Building
208 Requires: %{name} = %{version}-%{release}
209 Requires: %{name}-integration-devel = %{version}-%{release}
212 Development components for the DALi Tizen Adaptor - public headers and package configs
214 ##############################
216 ##############################
217 %package integration-devel
218 Summary: Integration development package for the Adaptor
219 Group: Development/Building
220 Requires: %{name} = %{version}-%{release}
222 %description integration-devel
223 Integration development package for the Adaptor - headers for integrating with an adaptor library.
225 ##############################
226 # Dali Feedback Plugin
227 ##############################
228 %package dali-feedback-plugin
229 Summary: Plugin to play haptic and audio feedback for Dali
230 Group: System/Libraries
231 Requires: %{name} = %{version}-%{release}
232 %description dali-feedback-plugin
233 Feedback plugin to play haptic and audio feedback for Dali
235 ##############################
237 ##############################
241 #Use TZ_PATH when tizen version is 3.x or greater
243 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
244 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
245 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
246 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
247 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
248 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
250 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
251 %define dali_plugin_sound_files /plugins/sounds/
253 ##############################
255 ##############################
258 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
259 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
262 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
266 CXXFLAGS+=" -DWAYLAND"
267 cmake_flags=" -DENABLE_WAYLAND=ON"
269 # Use this conditional when Tizen version is 5.x or greater
270 %if 0%{?tizen_version_major} >= 5
271 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
273 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
274 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
275 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
276 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
279 %if 0%{?enable_debug}
280 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
283 %if 0%{?enable_trace}
284 cmake_flags+=" -DENABLE_TRACE=ON"
287 %if 0%{?enable_appfw}
288 cmake_flags+=" -DUSE_APPFW"
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_TIZEN_MINOR_VERSION=%{tizen_version_minor}"
309 cmake_flags+=" -DENABLE_FEEDBACK=YES"
310 cmake_flags+=" -DENABLE_APPFW=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 libdali-adaptor.so.*.*.* libdali-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 libdali-adaptor.so.*.*.* libdali-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 libdali-adaptor.so.*.*.* libdali-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 libdali-adaptor.so.*.*.* libdali-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 links to ensure linking with cxx11 library is preserved
463 pushd %{buildroot}%{_libdir}
464 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so
465 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
466 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
469 # Create a symbolic link in integration-api to preserve legacy repo build
470 pushd %{buildroot}%{_includedir}/dali/integration-api
471 ln -sf adaptor-framework adaptors
474 ##############################
476 # 1 - Pre Install new package
477 # 2 - Install new package
478 # 3 - Post install new package
479 # 4 - Pre uninstall old package
480 # 5 - Remove files not overwritten by new package
481 # 6 - Post uninstall old package
482 ##############################
484 ##############################
485 # Adaptor package Commands
491 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
503 ##############################
504 # Mobile Profile Commands
505 # if mobile || "undefined"
506 # No need to create a symbolic link on install required if only building this profile
507 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
509 %if "%{?profile}" != "mobile"
511 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
517 %postun profile_mobile
522 ##############################
523 # TV Profile Commands
524 # No need to create a symbolic link on install required if only building this profile
525 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
527 %if "%{?profile}" != "tv"
529 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
540 ##############################
541 # Wearable Profile Commands
542 # No need to create a symbolic link on install required if only building this profile
543 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
544 %post profile_wearable
545 %if "%{?profile}" != "wearable"
547 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
553 %postun profile_wearable
558 ##############################
559 # IVI Profile Commands
560 # No need to create a symbolic link on install required if only building this profile
561 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
563 %if "%{?profile}" != "ivi"
565 ln -sf libdali-adaptor.so.ivi libdali-adaptor.so.0.0.0
576 ##############################
577 # Common Profile Commands
578 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
583 %postun profile_common
588 ##############################
589 # Files in Binary Packages
590 ##############################
593 %manifest dali-adaptor.manifest
594 %defattr(-,root,root,-)
595 %dir %{user_shader_cache_dir}
598 %defattr(-,root,root,-)
599 %{_libdir}/libdali-adaptor-cxx11.so
600 %{_libdir}/libdali-adaptor-cxx11.so.0
601 %{_libdir}/libdali-adaptor-cxx11.so.0.0.0
602 %{_libdir}/libdali-adaptor.so
603 %{_libdir}/libdali-adaptor.so.0
604 %{_libdir}/libdali-adaptor.so.0.0.0
606 #################################################
608 %files dali-feedback-plugin
609 %manifest dali-adaptor.manifest
610 %defattr(-,root,root,-)
611 %{_libdir}/libdali-feedback-plugin-cxx11.so*
612 %{dali_plugin_sound_files}/*
614 #################################################
616 # if common ||"undefined"
617 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
618 %files profile_common
619 %manifest dali-adaptor.manifest
620 # default .so files are housed in the main pkg.
623 # if mobile || "undefined"
624 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
625 %files profile_mobile
626 %manifest dali-adaptor.manifest
627 %defattr(-,root,root,-)
628 %if "%{?profile}" != "mobile"
629 %{_libdir}/libdali-adaptor.so.mobile
633 # if tv ||"undefined"
634 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
636 %manifest dali-adaptor.manifest
637 %defattr(-,root,root,-)
638 %if "%{?profile}" != "tv"
639 %{_libdir}/libdali-adaptor.so.tv
643 # if wearable || "undefined"
644 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
645 %files profile_wearable
646 %manifest dali-adaptor.manifest
647 %defattr(-,root,root,-)
648 %if "%{?profile}" != "wearable"
649 %{_libdir}/libdali-adaptor.so.wearable
653 # if ivi ||"undefined"
654 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
656 %manifest dali-adaptor.manifest
657 %defattr(-,root,root,-)
658 %if "%{?profile}" != "ivi"
659 %{_libdir}/libdali-adaptor.so.ivi
664 %defattr(-,root,root,-)
665 %{_includedir}/dali/dali.h
666 %{_includedir}/dali/public-api/*
667 %{_includedir}/dali/devel-api/*
668 %{_includedir}/dali/doc/*
669 %{_libdir}/pkgconfig/dali-adaptor.pc
671 %files integration-devel
672 %defattr(-,root,root,-)
673 %{_includedir}/dali/integration-api/adaptor-framework/*
674 %{_includedir}/dali/integration-api/adaptors
675 %{_libdir}/pkgconfig/dali-adaptor-integration.pc