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)
39 BuildRequires: pkgconfig(screen_connector_provider)
42 BuildRequires: pkgconfig(gles20)
43 BuildRequires: pkgconfig(glesv2)
44 BuildRequires: pkgconfig(ttrace)
46 BuildRequires: dali-devel
47 BuildRequires: dali-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: fribidi-devel
66 BuildRequires: pkgconfig(capi-system-info)
67 BuildRequires: pkgconfig(capi-system-sensor)
69 BuildRequires: pkgconfig(cairo)
71 BuildRequires: pkgconfig(wayland-egl)
72 BuildRequires: pkgconfig(wayland-client)
73 BuildRequires: wayland-devel
74 BuildRequires: wayland-extension-client-devel
76 # dali-adaptor uses ecore mainloop
77 %if 0%{?tizen_version_major} >= 5
78 BuildRequires: pkgconfig(ecore-wl2)
79 BuildRequires: pkgconfig(wayland-egl-tizen)
81 BuildRequires: pkgconfig(ecore-wayland)
84 # dali-adaptor needs tbm_surface in tizen 3.0 wayland
85 BuildRequires: pkgconfig(libtbm)
87 BuildRequires: pkgconfig(tpkp-curl)
90 BuildRequires: pkgconfig(appcore-ui)
91 BuildRequires: pkgconfig(appcore-widget-base)
92 BuildRequires: pkgconfig(bundle)
93 BuildRequires: pkgconfig(capi-appfw-app-common)
94 BuildRequires: pkgconfig(capi-appfw-app-control)
95 BuildRequires: pkgconfig(ecore-imf)
97 BuildRequires: pkgconfig(capi-system-system-settings)
100 BuildRequires: pkgconfig(mm-sound)
101 BuildRequires: pkgconfig(feedback)
104 Requires: %{name}-compat = %{version}-%{release}
105 Recommends: %{name}-profile_common = %{version}-%{release}
108 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
109 platform abstraction and application shell
111 ###########################################
112 # Dali adapter for profiles
113 ###########################################
115 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
116 # if mobile || "undefined"
117 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
118 %package profile_mobile
119 Summary: The DALi Tizen Adaptor for mobile
120 Provides: %{name}-compat = %{version}-%{release}
121 Conflicts: %{name}-profile_tv
122 Conflicts: %{name}-profile_wearable
123 Conflicts: %{name}-profile_ivi
124 Conflicts: %{name}-profile_common
125 %description profile_mobile
126 The DALi Tizen Adaptor for mobile.
129 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
130 # if tv ||"undefined"
131 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
133 Summary: The DALi Tizen Adaptor for tv
134 Provides: %{name}-compat = %{version}-%{release}
135 Conflicts: %{name}-profile_mobile
136 Conflicts: %{name}-profile_wearable
137 Conflicts: %{name}-profile_ivi
138 Conflicts: %{name}-profile_common
139 %description profile_tv
140 The DALi Tizen Adaptor for tv.
143 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
144 # if wearable || "undefined"
145 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
146 %package profile_wearable
147 Summary: The DALi Tizen Adaptor for wearable
148 Provides: %{name}-compat = %{version}-%{release}
149 Conflicts: %{name}-profile_mobile
150 Conflicts: %{name}-profile_tv
151 Conflicts: %{name}-profile_ivi
152 Conflicts: %{name}-profile_common
153 %description profile_wearable
154 The DALi Tizen Adaptor for wearable.
157 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
158 # if ivi ||"undefined"
159 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
161 Summary: The DALi Tizen Adaptor for ivi
162 Provides: %{name}-compat = %{version}-%{release}
163 Conflicts: %{name}-profile_mobile
164 Conflicts: %{name}-profile_wearable
165 Conflicts: %{name}-profile_tv
166 Conflicts: %{name}-profile_common
167 %description profile_ivi
168 The DALi Tizen Adaptor for ivi.
171 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
172 # if common ||"undefined"
173 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
174 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
175 %package profile_common
176 Summary: The DALi Tizen Adaptor for common
177 Provides: %{name}-compat = %{version}-%{release}
178 Conflicts: %{name}-profile_mobile
179 Conflicts: %{name}-profile_wearable
180 Conflicts: %{name}-profile_tv
181 Conflicts: %{name}-profile_ivi
182 %description profile_common
183 The DALi Tizen Adaptor for common.
186 ##############################
188 ##############################
190 Summary: Development components for the DALi Tizen Adaptor
191 Group: Development/Building
192 Requires: %{name} = %{version}-%{release}
193 Requires: %{name}-integration-devel = %{version}-%{release}
196 Development components for the DALi Tizen Adaptor - public headers and package configs
198 ##############################
200 ##############################
201 %package integration-devel
202 Summary: Integration development package for the Adaptor
203 Group: Development/Building
204 Requires: %{name} = %{version}-%{release}
206 %description integration-devel
207 Integration development package for the Adaptor - headers for integrating with an adaptor library.
209 ##############################
210 # Dali Feedback Plugin
211 ##############################
212 %package dali-feedback-plugin
213 Summary: Plugin to play haptic and audio feedback for Dali
214 Group: System/Libraries
215 Requires: %{name} = %{version}-%{release}
216 %description dali-feedback-plugin
217 Feedback plugin to play haptic and audio feedback for Dali
219 ##############################
221 ##############################
225 #Use TZ_PATH when tizen version is 3.x or greater
227 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
228 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
229 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
230 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
231 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
232 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
234 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
235 %define dali_plugin_sound_files /plugins/sounds/
236 %define dev_include_path %{_includedir}
238 ##############################
240 ##############################
243 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
244 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
247 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
251 CXXFLAGS+=" -DWAYLAND"
252 configure_flags=" -DENABLE_WAYLAND=ON"
254 # Use this conditional when Tizen version is 5.x or greater
255 %if 0%{?tizen_version_major} >= 5
256 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
258 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
259 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
260 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
261 configure_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
265 cd %{_builddir}/%{name}-%{version}/build/tizen
267 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
268 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
269 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
270 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
271 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
272 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
273 %if 0%{?tizen_platform_config_supported}
274 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
277 # Set up the build via Cmake
278 #######################################################################
279 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
280 # if mobile || "undefined"
281 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
287 %if 0%{?enable_debug}
288 -DCMAKE_BUILD_TYPE=Debug \
290 %if 0%{?enable_trace}
293 -DCMAKE_INSTALL_PREFIX=$PREFIX \
294 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
295 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
296 -DENABLE_PROFILE=MOBILE \
297 -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
298 -DENABLE_FEEDBACK=YES \
304 make %{?jobs:-j%jobs}
309 #######################################################################
310 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
311 # if tv ||"undefined"
312 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
318 %if 0%{?enable_debug}
319 -DCMAKE_BUILD_TYPE=Debug \
321 %if 0%{?enable_trace}
324 -DCMAKE_INSTALL_PREFIX=$PREFIX \
325 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
326 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
327 -DENABLE_PROFILE=TV \
328 -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
329 -DENABLE_FEEDBACK=YES \
335 make %{?jobs:-j%jobs}
340 #######################################################################
341 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
342 # if wearable || "undefined"
343 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
349 %if 0%{?enable_debug}
350 -DCMAKE_BUILD_TYPE=Debug \
352 %if 0%{?enable_trace}
355 -DCMAKE_INSTALL_PREFIX=$PREFIX \
356 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
357 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
358 -DENABLE_PROFILE=WEARABLE \
359 -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
360 -DENABLE_FEEDBACK=YES \
366 make %{?jobs:-j%jobs}
371 #######################################################################
372 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
373 # if ivi ||"undefined"
374 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
380 %if 0%{?enable_debug}
381 -DCMAKE_BUILD_TYPE=Debug \
383 %if 0%{?enable_trace}
386 -DCMAKE_INSTALL_PREFIX=$PREFIX \
387 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
388 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
389 -DENABLE_PROFILE=IVI \
390 -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
391 -DENABLE_FEEDBACK=YES \
397 make %{?jobs:-j%jobs}
402 #######################################################################
404 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
405 # if common ||"undefined"
406 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
412 %if 0%{?enable_debug}
413 -DCMAKE_BUILD_TYPE=Debug \
415 %if 0%{?enable_trace}
418 -DCMAKE_INSTALL_PREFIX=$PREFIX \
419 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
420 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
421 -DENABLE_PROFILE=COMMON \
422 -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
423 -DENABLE_FEEDBACK=YES \
429 make %{?jobs:-j%jobs}
434 ##############################
436 ##############################
440 pushd %{_builddir}/%{name}-%{version}/build/tizen
442 # if mobile || "undefined"
443 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
446 pushd %{buildroot}%{_libdir}
447 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile
449 make clean # So that we can gather symbol/size information for only one profile
453 # if tv ||"undefined"
454 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
457 pushd %{buildroot}%{_libdir}
458 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv
460 make clean # So that we can gather symbol/size information for only one profile
464 # if wearable || "undefined"
465 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
468 pushd %{buildroot}%{_libdir}
469 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable
471 make clean # So that we can gather symbol/size information for only one profile
475 # if ivi ||"undefined"
476 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
479 pushd %{buildroot}%{_libdir}
480 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi
482 make clean # So that we can gather symbol/size information for only one profile
486 # if common ||"undefined"
487 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
490 # No clean so we can gather symbol/size information for the common profile
494 # Create links to ensure linking with cxx11 library is preserved
495 pushd %{buildroot}%{_libdir}
496 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so
497 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
498 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
501 ##############################
503 # 1 - Pre Install new package
504 # 2 - Install new package
505 # 3 - Post install new package
506 # 4 - Pre uninstall old package
507 # 5 - Remove files not overwritten by new package
508 # 6 - Post uninstall old package
509 ##############################
511 ##############################
512 # Adaptor package Commands
527 ##############################
528 # Mobile Profile Commands
529 # if mobile || "undefined"
530 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
533 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
538 %postun profile_mobile
543 ##############################
544 # TV Profile Commands
545 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
548 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
558 ##############################
559 # Wearable Profile Commands
560 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
561 %post profile_wearable
563 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
568 %postun profile_wearable
573 ##############################
574 # IVI Profile Commands
575 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
578 ln -sf libdali-adaptor.ivi libdali-adaptor.so.0.0.0
588 ##############################
589 # Common Profile Commands
590 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
595 %postun profile_common
600 ##############################
601 # Files in Binary Packages
602 ##############################
605 %manifest dali-adaptor.manifest
606 %defattr(-,root,root,-)
607 %dir %{user_shader_cache_dir}
610 %defattr(-,root,root,-)
611 %{_libdir}/libdali-adaptor-cxx11.so
612 %{_libdir}/libdali-adaptor-cxx11.so.0
613 %{_libdir}/libdali-adaptor-cxx11.so.0.0.0
614 %{_libdir}/libdali-adaptor.so
615 %{_libdir}/libdali-adaptor.so.0
616 %{_libdir}/libdali-adaptor.so.0.0.0
618 #################################################
620 %files dali-feedback-plugin
621 %manifest dali-adaptor.manifest
622 %defattr(-,root,root,-)
623 %{_libdir}/libdali-feedback-plugin-cxx11.so*
624 %{dali_plugin_sound_files}/*
626 #################################################
628 # if common ||"undefined"
629 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
630 %files profile_common
631 %manifest dali-adaptor.manifest
632 # default .so files are housed in the main pkg.
635 # if mobile || "undefined"
636 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
637 %files profile_mobile
638 %manifest dali-adaptor.manifest
639 %defattr(-,root,root,-)
640 %{_libdir}/libdali-adaptor.so.mobile
643 # if tv ||"undefined"
644 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
646 %manifest dali-adaptor.manifest
647 %defattr(-,root,root,-)
648 %{_libdir}/libdali-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 %{_libdir}/libdali-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 %{_libdir}/libdali-adaptor.so.ivi
668 %defattr(-,root,root,-)
669 %{dev_include_path}/dali/dali.h
670 %{dev_include_path}/dali/public-api/*
671 %{dev_include_path}/dali/devel-api/*
672 %{dev_include_path}/dali/doc/*
673 %{_libdir}/pkgconfig/dali-adaptor.pc
675 %files integration-devel
676 %defattr(-,root,root,-)
677 %{dev_include_path}/dali/integration-api/adaptors/*
678 %{_libdir}/pkgconfig/dali-adaptor-integration.pc