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
34 %define tizen_platform_config_supported 1
35 BuildRequires: pkgconfig(libtzplatform-config)
37 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
38 # if wearable || "undefined"
39 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
40 BuildRequires: pkgconfig(capi-appfw-watch-application)
41 BuildRequires: pkgconfig(appcore-watch)
42 BuildRequires: pkgconfig(screen_connector_provider)
45 BuildRequires: pkgconfig(gles20)
46 BuildRequires: pkgconfig(glesv2)
47 BuildRequires: pkgconfig(ttrace)
49 BuildRequires: dali-devel
50 BuildRequires: dali-integration-devel
52 BuildRequires: pkgconfig
55 BuildRequires: giflib-devel
56 BuildRequires: pkgconfig(fontconfig)
57 BuildRequires: libjpeg-turbo-devel
58 BuildRequires: pkgconfig(vconf)
59 BuildRequires: tts-devel
60 BuildRequires: pkgconfig(dlog)
61 BuildRequires: libdrm-devel
62 BuildRequires: pkgconfig(libexif)
63 BuildRequires: pkgconfig(libpng)
64 BuildRequires: pkgconfig(egl)
65 BuildRequires: libcurl-devel
66 BuildRequires: pkgconfig(harfbuzz)
67 BuildRequires: fribidi-devel
69 BuildRequires: pkgconfig(capi-system-info)
70 BuildRequires: pkgconfig(capi-system-sensor)
72 BuildRequires: pkgconfig(cairo)
74 BuildRequires: pkgconfig(wayland-egl)
75 BuildRequires: pkgconfig(wayland-client)
76 BuildRequires: wayland-devel
77 BuildRequires: wayland-extension-client-devel
79 # dali-adaptor uses ecore mainloop
80 %if 0%{?tizen_version_major} >= 5
81 BuildRequires: pkgconfig(ecore-wl2)
82 BuildRequires: pkgconfig(wayland-egl-tizen)
84 BuildRequires: pkgconfig(ecore-wayland)
87 # dali-adaptor needs tbm_surface in tizen 3.0 wayland
88 BuildRequires: pkgconfig(libtbm)
90 BuildRequires: pkgconfig(tpkp-curl)
93 BuildRequires: pkgconfig(appcore-ui)
94 BuildRequires: pkgconfig(appcore-widget-base)
95 BuildRequires: pkgconfig(bundle)
96 BuildRequires: pkgconfig(capi-appfw-app-common)
97 BuildRequires: pkgconfig(capi-appfw-app-control)
98 BuildRequires: pkgconfig(ecore-imf)
100 BuildRequires: pkgconfig(capi-system-system-settings)
103 %if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5
104 BuildRequires: pkgconfig(capi-ui-autofill)
107 # for feedback plugin
108 BuildRequires: pkgconfig(mm-sound)
109 BuildRequires: pkgconfig(feedback)
112 Requires: %{name}-compat = %{version}-%{release}
113 Recommends: %{name}-profile_common = %{version}-%{release}
116 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
117 platform abstraction and application shell
119 ###########################################
120 # Dali adapter for profiles
121 ###########################################
123 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
124 # if mobile || "undefined"
125 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
126 %package profile_mobile
127 Summary: The DALi Tizen Adaptor for mobile
128 Provides: %{name}-compat = %{version}-%{release}
129 Conflicts: %{name}-profile_tv
130 Conflicts: %{name}-profile_wearable
131 Conflicts: %{name}-profile_ivi
132 Conflicts: %{name}-profile_common
133 %description profile_mobile
134 The DALi Tizen Adaptor for mobile.
137 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
138 # if tv ||"undefined"
139 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
141 Summary: The DALi Tizen Adaptor for tv
142 Provides: %{name}-compat = %{version}-%{release}
143 Conflicts: %{name}-profile_mobile
144 Conflicts: %{name}-profile_wearable
145 Conflicts: %{name}-profile_ivi
146 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
161 %description profile_wearable
162 The DALi Tizen Adaptor for wearable.
165 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
166 # if ivi ||"undefined"
167 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
169 Summary: The DALi Tizen Adaptor for ivi
170 Provides: %{name}-compat = %{version}-%{release}
171 Conflicts: %{name}-profile_mobile
172 Conflicts: %{name}-profile_wearable
173 Conflicts: %{name}-profile_tv
174 Conflicts: %{name}-profile_common
175 %description profile_ivi
176 The DALi Tizen Adaptor for ivi.
179 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
180 # if common ||"undefined"
181 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
182 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
183 %package profile_common
184 Summary: The DALi Tizen Adaptor for common
185 Provides: %{name}-compat = %{version}-%{release}
186 Conflicts: %{name}-profile_mobile
187 Conflicts: %{name}-profile_wearable
188 Conflicts: %{name}-profile_tv
189 Conflicts: %{name}-profile_ivi
190 %description profile_common
191 The DALi Tizen Adaptor for common.
194 ##############################
196 ##############################
198 Summary: Development components for the DALi Tizen Adaptor
199 Group: Development/Building
200 Requires: %{name} = %{version}-%{release}
201 Requires: %{name}-integration-devel = %{version}-%{release}
204 Development components for the DALi Tizen Adaptor - public headers and package configs
206 ##############################
208 ##############################
209 %package integration-devel
210 Summary: Integration development package for the Adaptor
211 Group: Development/Building
212 Requires: %{name} = %{version}-%{release}
214 %description integration-devel
215 Integration development package for the Adaptor - headers for integrating with an adaptor library.
217 ##############################
218 # Dali Feedback Plugin
219 ##############################
220 %package dali-feedback-plugin
221 Summary: Plugin to play haptic and audio feedback for Dali
222 Group: System/Libraries
223 Requires: %{name} = %{version}-%{release}
224 %description dali-feedback-plugin
225 Feedback plugin to play haptic and audio feedback for Dali
227 ##############################
229 ##############################
233 #Use TZ_PATH when tizen version is 3.x or greater
235 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
236 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
237 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
238 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
239 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
240 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
242 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
243 %define dali_plugin_sound_files /plugins/sounds/
245 ##############################
247 ##############################
250 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
251 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
254 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
258 CXXFLAGS+=" -DWAYLAND"
259 cmake_flags=" -DENABLE_WAYLAND=ON"
261 # Use this conditional when Tizen version is 5.x or greater
262 %if 0%{?tizen_version_major} >= 5
263 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
265 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
266 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
267 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
268 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
271 %if 0%{?enable_debug}
272 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
275 %if 0%{?enable_trace}
276 cmake_flags+=" -DENABLE_TRACE=ON"
280 cd %{_builddir}/%{name}-%{version}/build/tizen
282 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
283 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
284 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
285 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
286 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
287 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
288 %if 0%{?tizen_platform_config_supported}
289 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
292 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
293 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
294 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
295 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
296 cmake_flags+=" -DENABLE_TIZEN_MINOR_VERSION=%{tizen_version_minor}"
297 cmake_flags+=" -DENABLE_FEEDBACK=YES"
298 cmake_flags+=" -DENABLE_APPFW=YES"
300 # Set up the build via Cmake
301 #######################################################################
302 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
303 # if mobile || "undefined"
304 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
309 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
312 make %{?jobs:-j%jobs}
317 #######################################################################
318 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
319 # if tv ||"undefined"
320 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
325 cmake -DENABLE_PROFILE=TV $cmake_flags ..
328 make %{?jobs:-j%jobs}
333 #######################################################################
334 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
335 # if wearable || "undefined"
336 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
341 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
344 make %{?jobs:-j%jobs}
349 #######################################################################
350 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
351 # if ivi ||"undefined"
352 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
357 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
360 make %{?jobs:-j%jobs}
365 #######################################################################
367 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
368 # if common ||"undefined"
369 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
374 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
377 make %{?jobs:-j%jobs}
382 ##############################
384 ##############################
388 pushd %{_builddir}/%{name}-%{version}/build/tizen
390 # if mobile || "undefined"
391 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
394 pushd %{buildroot}%{_libdir}
395 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile
397 %if "%{?profile}" != "mobile"
398 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
403 # if tv ||"undefined"
404 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
407 pushd %{buildroot}%{_libdir}
408 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv
410 %if "%{?profile}" != "tv"
411 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
416 # if wearable || "undefined"
417 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
420 pushd %{buildroot}%{_libdir}
421 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable
423 %if "%{?profile}" != "wearable"
424 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
429 # if ivi ||"undefined"
430 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
433 pushd %{buildroot}%{_libdir}
434 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi
436 %if "%{?profile}" != "ivi"
437 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
442 # if common ||"undefined"
443 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
446 # No clean so we can gather symbol/size information for the common profile
450 # Create links to ensure linking with cxx11 library is preserved
451 pushd %{buildroot}%{_libdir}
452 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so
453 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
454 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
457 # Create a symbolic link in integration-api to preserve legacy repo build
458 pushd %{buildroot}%{_includedir}/dali/integration-api
459 ln -sf adaptor-framework adaptors
462 ##############################
464 # 1 - Pre Install new package
465 # 2 - Install new package
466 # 3 - Post install new package
467 # 4 - Pre uninstall old package
468 # 5 - Remove files not overwritten by new package
469 # 6 - Post uninstall old package
470 ##############################
472 ##############################
473 # Adaptor package Commands
488 ##############################
489 # Mobile Profile Commands
490 # if mobile || "undefined"
491 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
494 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
499 %postun profile_mobile
504 ##############################
505 # TV Profile Commands
506 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
509 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
519 ##############################
520 # Wearable Profile Commands
521 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
522 %post profile_wearable
524 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
529 %postun profile_wearable
534 ##############################
535 # IVI Profile Commands
536 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
539 ln -sf libdali-adaptor.so.ivi libdali-adaptor.so.0.0.0
549 ##############################
550 # Common Profile Commands
551 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
556 %postun profile_common
561 ##############################
562 # Files in Binary Packages
563 ##############################
566 %manifest dali-adaptor.manifest
567 %defattr(-,root,root,-)
568 %dir %{user_shader_cache_dir}
571 %defattr(-,root,root,-)
572 %{_libdir}/libdali-adaptor-cxx11.so
573 %{_libdir}/libdali-adaptor-cxx11.so.0
574 %{_libdir}/libdali-adaptor-cxx11.so.0.0.0
575 %{_libdir}/libdali-adaptor.so
576 %{_libdir}/libdali-adaptor.so.0
577 %{_libdir}/libdali-adaptor.so.0.0.0
579 #################################################
581 %files dali-feedback-plugin
582 %manifest dali-adaptor.manifest
583 %defattr(-,root,root,-)
584 %{_libdir}/libdali-feedback-plugin-cxx11.so*
585 %{dali_plugin_sound_files}/*
587 #################################################
589 # if common ||"undefined"
590 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
591 %files profile_common
592 %manifest dali-adaptor.manifest
593 # default .so files are housed in the main pkg.
596 # if mobile || "undefined"
597 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
598 %files profile_mobile
599 %manifest dali-adaptor.manifest
600 %defattr(-,root,root,-)
601 %{_libdir}/libdali-adaptor.so.mobile
604 # if tv ||"undefined"
605 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
607 %manifest dali-adaptor.manifest
608 %defattr(-,root,root,-)
609 %{_libdir}/libdali-adaptor.so.tv
612 # if wearable || "undefined"
613 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
614 %files profile_wearable
615 %manifest dali-adaptor.manifest
616 %defattr(-,root,root,-)
617 %{_libdir}/libdali-adaptor.so.wearable
620 # if ivi ||"undefined"
621 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
623 %manifest dali-adaptor.manifest
624 %defattr(-,root,root,-)
625 %{_libdir}/libdali-adaptor.so.ivi
629 %defattr(-,root,root,-)
630 %{_includedir}/dali/dali.h
631 %{_includedir}/dali/public-api/*
632 %{_includedir}/dali/devel-api/*
633 %{_includedir}/dali/doc/*
634 %{_libdir}/pkgconfig/dali-adaptor.pc
636 %files integration-devel
637 %defattr(-,root,root,-)
638 %{_includedir}/dali/integration-api/adaptor-framework/*
639 %{_includedir}/dali/integration-api/adaptors
640 %{_libdir}/pkgconfig/dali-adaptor-integration.pc