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)
94 BuildRequires: pkgconfig(appcore-ui)
95 BuildRequires: pkgconfig(appcore-widget-base)
96 BuildRequires: pkgconfig(bundle)
97 BuildRequires: pkgconfig(capi-appfw-app-common)
98 BuildRequires: pkgconfig(capi-appfw-app-control)
99 BuildRequires: pkgconfig(ecore-imf)
101 BuildRequires: pkgconfig(capi-system-system-settings)
104 %if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5
105 BuildRequires: pkgconfig(capi-ui-autofill)
108 # for feedback plugin
109 BuildRequires: pkgconfig(mm-sound)
110 BuildRequires: pkgconfig(feedback)
113 Requires: %{name}-compat = %{version}-%{release}
114 Recommends: %{name}-profile_common = %{version}-%{release}
117 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
118 platform abstraction and application shell
120 ###########################################
121 # Dali adapter for profiles
122 ###########################################
124 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
125 # if mobile || "undefined"
126 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
127 %package profile_mobile
128 Summary: The DALi Tizen Adaptor for mobile
129 Provides: %{name}-compat = %{version}-%{release}
130 Conflicts: %{name}-profile_tv
131 Conflicts: %{name}-profile_wearable
132 Conflicts: %{name}-profile_ivi
133 Conflicts: %{name}-profile_common
135 %description profile_mobile
136 The DALi Tizen Adaptor for mobile.
139 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
140 # if tv ||"undefined"
141 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
143 Summary: The DALi Tizen Adaptor for tv
144 Provides: %{name}-compat = %{version}-%{release}
145 Conflicts: %{name}-profile_mobile
146 Conflicts: %{name}-profile_wearable
147 Conflicts: %{name}-profile_ivi
148 Conflicts: %{name}-profile_common
150 %description profile_tv
151 The DALi Tizen Adaptor for tv.
154 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
155 # if wearable || "undefined"
156 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
157 %package profile_wearable
158 Summary: The DALi Tizen Adaptor for wearable
159 Provides: %{name}-compat = %{version}-%{release}
160 Conflicts: %{name}-profile_mobile
161 Conflicts: %{name}-profile_tv
162 Conflicts: %{name}-profile_ivi
163 Conflicts: %{name}-profile_common
165 %description profile_wearable
166 The DALi Tizen Adaptor for wearable.
169 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
170 # if ivi ||"undefined"
171 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
173 Summary: The DALi Tizen Adaptor for ivi
174 Provides: %{name}-compat = %{version}-%{release}
175 Conflicts: %{name}-profile_mobile
176 Conflicts: %{name}-profile_wearable
177 Conflicts: %{name}-profile_tv
178 Conflicts: %{name}-profile_common
180 %description profile_ivi
181 The DALi Tizen Adaptor for ivi.
184 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
185 # if common ||"undefined"
186 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
187 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
188 %package profile_common
189 Summary: The DALi Tizen Adaptor for common
190 Provides: %{name}-compat = %{version}-%{release}
191 Conflicts: %{name}-profile_mobile
192 Conflicts: %{name}-profile_wearable
193 Conflicts: %{name}-profile_tv
194 Conflicts: %{name}-profile_ivi
196 %description profile_common
197 The DALi Tizen Adaptor for common.
200 ##############################
202 ##############################
204 Summary: Development components for the DALi Tizen Adaptor
205 Group: Development/Building
206 Requires: %{name} = %{version}-%{release}
207 Requires: %{name}-integration-devel = %{version}-%{release}
210 Development components for the DALi Tizen Adaptor - public headers and package configs
212 ##############################
214 ##############################
215 %package integration-devel
216 Summary: Integration development package for the Adaptor
217 Group: Development/Building
218 Requires: %{name} = %{version}-%{release}
220 %description integration-devel
221 Integration development package for the Adaptor - headers for integrating with an adaptor library.
223 ##############################
224 # Dali Feedback Plugin
225 ##############################
226 %package dali-feedback-plugin
227 Summary: Plugin to play haptic and audio feedback for Dali
228 Group: System/Libraries
229 Requires: %{name} = %{version}-%{release}
230 %description dali-feedback-plugin
231 Feedback plugin to play haptic and audio feedback for Dali
233 ##############################
235 ##############################
239 #Use TZ_PATH when tizen version is 3.x or greater
241 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
242 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
243 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
244 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
245 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
246 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
248 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
249 %define dali_plugin_sound_files /plugins/sounds/
251 ##############################
253 ##############################
256 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
257 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
260 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
264 CXXFLAGS+=" -DWAYLAND"
265 cmake_flags=" -DENABLE_WAYLAND=ON"
267 # Use this conditional when Tizen version is 5.x or greater
268 %if 0%{?tizen_version_major} >= 5
269 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
271 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
272 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
273 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
274 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
277 %if 0%{?enable_debug}
278 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
281 %if 0%{?enable_trace}
282 cmake_flags+=" -DENABLE_TRACE=ON"
285 %if 0%{?enable_appfw}
286 cmake_flags+=" -DUSE_APPFW"
290 cd %{_builddir}/%{name}-%{version}/build/tizen
292 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
293 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
294 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
295 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
296 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
297 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
298 %if 0%{?tizen_platform_config_supported}
299 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
302 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
303 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
304 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
305 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
306 cmake_flags+=" -DENABLE_TIZEN_MINOR_VERSION=%{tizen_version_minor}"
307 cmake_flags+=" -DENABLE_FEEDBACK=YES"
308 cmake_flags+=" -DENABLE_APPFW=YES"
310 # Set up the build via Cmake
311 #######################################################################
312 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
313 # if mobile || "undefined"
314 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
319 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
322 make %{?jobs:-j%jobs}
327 #######################################################################
328 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
329 # if tv ||"undefined"
330 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
335 cmake -DENABLE_PROFILE=TV $cmake_flags ..
338 make %{?jobs:-j%jobs}
343 #######################################################################
344 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
345 # if wearable || "undefined"
346 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
351 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
354 make %{?jobs:-j%jobs}
359 #######################################################################
360 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
361 # if ivi ||"undefined"
362 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
367 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
370 make %{?jobs:-j%jobs}
375 #######################################################################
377 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
378 # if common ||"undefined"
379 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
384 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
387 make %{?jobs:-j%jobs}
392 ##############################
394 ##############################
398 pushd %{_builddir}/%{name}-%{version}/build/tizen
400 # if mobile || "undefined"
401 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
404 %if "%{?profile}" != "mobile"
405 pushd %{buildroot}%{_libdir}
406 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
408 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
413 # if tv ||"undefined"
414 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
417 %if "%{?profile}" != "tv"
418 pushd %{buildroot}%{_libdir}
419 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
421 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
426 # if wearable || "undefined"
427 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
430 %if "%{?profile}" != "wearable"
431 pushd %{buildroot}%{_libdir}
432 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
434 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
439 # if ivi ||"undefined"
440 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
443 %if "%{?profile}" != "ivi"
444 pushd %{buildroot}%{_libdir}
445 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
447 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
452 # if common ||"undefined"
453 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
456 # No clean so we can gather symbol/size information for the common profile
460 # Create links to ensure linking with cxx11 library is preserved
461 pushd %{buildroot}%{_libdir}
462 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so
463 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
464 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
467 # Create a symbolic link in integration-api to preserve legacy repo build
468 pushd %{buildroot}%{_includedir}/dali/integration-api
469 ln -sf adaptor-framework adaptors
472 ##############################
474 # 1 - Pre Install new package
475 # 2 - Install new package
476 # 3 - Post install new package
477 # 4 - Pre uninstall old package
478 # 5 - Remove files not overwritten by new package
479 # 6 - Post uninstall old package
480 ##############################
482 ##############################
483 # Adaptor package Commands
489 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
501 ##############################
502 # Mobile Profile Commands
503 # if mobile || "undefined"
504 # No need to create a symbolic link on install required if only building this profile
505 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
507 %if "%{?profile}" != "mobile"
509 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
515 %postun profile_mobile
520 ##############################
521 # TV Profile Commands
522 # No need to create a symbolic link on install required if only building this profile
523 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
525 %if "%{?profile}" != "tv"
527 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
538 ##############################
539 # Wearable Profile Commands
540 # No need to create a symbolic link on install required if only building this profile
541 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
542 %post profile_wearable
543 %if "%{?profile}" != "wearable"
545 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
551 %postun profile_wearable
556 ##############################
557 # IVI Profile Commands
558 # No need to create a symbolic link on install required if only building this profile
559 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
561 %if "%{?profile}" != "ivi"
563 ln -sf libdali-adaptor.so.ivi libdali-adaptor.so.0.0.0
574 ##############################
575 # Common Profile Commands
576 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
581 %postun profile_common
586 ##############################
587 # Files in Binary Packages
588 ##############################
591 %manifest dali-adaptor.manifest
592 %defattr(-,root,root,-)
593 %dir %{user_shader_cache_dir}
596 %defattr(-,root,root,-)
597 %{_libdir}/libdali-adaptor-cxx11.so
598 %{_libdir}/libdali-adaptor-cxx11.so.0
599 %{_libdir}/libdali-adaptor-cxx11.so.0.0.0
600 %{_libdir}/libdali-adaptor.so
601 %{_libdir}/libdali-adaptor.so.0
602 %{_libdir}/libdali-adaptor.so.0.0.0
604 #################################################
606 %files dali-feedback-plugin
607 %manifest dali-adaptor.manifest
608 %defattr(-,root,root,-)
609 %{_libdir}/libdali-feedback-plugin-cxx11.so*
610 %{dali_plugin_sound_files}/*
612 #################################################
614 # if common ||"undefined"
615 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
616 %files profile_common
617 %manifest dali-adaptor.manifest
618 # default .so files are housed in the main pkg.
621 # if mobile || "undefined"
622 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
623 %files profile_mobile
624 %manifest dali-adaptor.manifest
625 %defattr(-,root,root,-)
626 %if "%{?profile}" != "mobile"
627 %{_libdir}/libdali-adaptor.so.mobile
631 # if tv ||"undefined"
632 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
634 %manifest dali-adaptor.manifest
635 %defattr(-,root,root,-)
636 %if "%{?profile}" != "tv"
637 %{_libdir}/libdali-adaptor.so.tv
641 # if wearable || "undefined"
642 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
643 %files profile_wearable
644 %manifest dali-adaptor.manifest
645 %defattr(-,root,root,-)
646 %if "%{?profile}" != "wearable"
647 %{_libdir}/libdali-adaptor.so.wearable
651 # if ivi ||"undefined"
652 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
654 %manifest dali-adaptor.manifest
655 %defattr(-,root,root,-)
656 %if "%{?profile}" != "ivi"
657 %{_libdir}/libdali-adaptor.so.ivi
662 %defattr(-,root,root,-)
663 %{_includedir}/dali/dali.h
664 %{_includedir}/dali/public-api/*
665 %{_includedir}/dali/devel-api/*
666 %{_includedir}/dali/doc/*
667 %{_libdir}/pkgconfig/dali-adaptor.pc
669 %files integration-devel
670 %defattr(-,root,root,-)
671 %{_includedir}/dali/integration-api/adaptor-framework/*
672 %{_includedir}/dali/integration-api/adaptors
673 %{_libdir}/pkgconfig/dali-adaptor-integration.pc