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)
102 # for feedback plugin
103 BuildRequires: pkgconfig(mm-sound)
104 BuildRequires: pkgconfig(feedback)
107 Requires: %{name}-compat = %{version}-%{release}
108 Recommends: %{name}-profile_common = %{version}-%{release}
111 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
112 platform abstraction and application shell
114 ###########################################
115 # Dali adapter for profiles
116 ###########################################
118 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
119 # if mobile || "undefined"
120 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
121 %package profile_mobile
122 Summary: The DALi Tizen Adaptor for mobile
123 Provides: %{name}-compat = %{version}-%{release}
124 Conflicts: %{name}-profile_tv
125 Conflicts: %{name}-profile_wearable
126 Conflicts: %{name}-profile_ivi
127 Conflicts: %{name}-profile_common
128 %description profile_mobile
129 The DALi Tizen Adaptor for mobile.
132 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
133 # if tv ||"undefined"
134 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
136 Summary: The DALi Tizen Adaptor for tv
137 Provides: %{name}-compat = %{version}-%{release}
138 Conflicts: %{name}-profile_mobile
139 Conflicts: %{name}-profile_wearable
140 Conflicts: %{name}-profile_ivi
141 Conflicts: %{name}-profile_common
142 %description profile_tv
143 The DALi Tizen Adaptor for tv.
146 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
147 # if wearable || "undefined"
148 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
149 %package profile_wearable
150 Summary: The DALi Tizen Adaptor for wearable
151 Provides: %{name}-compat = %{version}-%{release}
152 Conflicts: %{name}-profile_mobile
153 Conflicts: %{name}-profile_tv
154 Conflicts: %{name}-profile_ivi
155 Conflicts: %{name}-profile_common
156 %description profile_wearable
157 The DALi Tizen Adaptor for wearable.
160 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
161 # if ivi ||"undefined"
162 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
164 Summary: The DALi Tizen Adaptor for ivi
165 Provides: %{name}-compat = %{version}-%{release}
166 Conflicts: %{name}-profile_mobile
167 Conflicts: %{name}-profile_wearable
168 Conflicts: %{name}-profile_tv
169 Conflicts: %{name}-profile_common
170 %description profile_ivi
171 The DALi Tizen Adaptor for ivi.
174 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
175 # if common ||"undefined"
176 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
177 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
178 %package profile_common
179 Summary: The DALi Tizen Adaptor for common
180 Provides: %{name}-compat = %{version}-%{release}
181 Conflicts: %{name}-profile_mobile
182 Conflicts: %{name}-profile_wearable
183 Conflicts: %{name}-profile_tv
184 Conflicts: %{name}-profile_ivi
185 %description profile_common
186 The DALi Tizen Adaptor for common.
189 ##############################
191 ##############################
193 Summary: Development components for the DALi Tizen Adaptor
194 Group: Development/Building
195 Requires: %{name} = %{version}-%{release}
196 Requires: %{name}-integration-devel = %{version}-%{release}
199 Development components for the DALi Tizen Adaptor - public headers and package configs
201 ##############################
203 ##############################
204 %package integration-devel
205 Summary: Integration development package for the Adaptor
206 Group: Development/Building
207 Requires: %{name} = %{version}-%{release}
209 %description integration-devel
210 Integration development package for the Adaptor - headers for integrating with an adaptor library.
212 ##############################
213 # Dali Feedback Plugin
214 ##############################
215 %package dali-feedback-plugin
216 Summary: Plugin to play haptic and audio feedback for Dali
217 Group: System/Libraries
218 Requires: %{name} = %{version}-%{release}
219 %description dali-feedback-plugin
220 Feedback plugin to play haptic and audio feedback for Dali
222 ##############################
224 ##############################
228 #Use TZ_PATH when tizen version is 3.x or greater
230 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
231 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
232 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
233 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
234 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
235 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
237 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
238 %define dali_plugin_sound_files /plugins/sounds/
240 ##############################
242 ##############################
245 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
246 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
249 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
253 CXXFLAGS+=" -DWAYLAND"
254 cmake_flags=" -DENABLE_WAYLAND=ON"
256 # Use this conditional when Tizen version is 5.x or greater
257 %if 0%{?tizen_version_major} >= 5
258 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
260 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
261 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
262 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
263 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
266 %if 0%{?enable_debug}
267 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
270 %if 0%{?enable_trace}
271 cmake_flags+=" -DENABLE_TRACE=ON"
275 cd %{_builddir}/%{name}-%{version}/build/tizen
277 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
278 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
279 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
280 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
281 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
282 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
283 %if 0%{?tizen_platform_config_supported}
284 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
287 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
288 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
289 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
290 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
291 cmake_flags+=" -DENABLE_FEEDBACK=YES"
292 cmake_flags+=" -DENABLE_APPFW=YES"
294 # Set up the build via Cmake
295 #######################################################################
296 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
297 # if mobile || "undefined"
298 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
303 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
306 make %{?jobs:-j%jobs}
311 #######################################################################
312 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
313 # if tv ||"undefined"
314 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
319 cmake -DENABLE_PROFILE=TV $cmake_flags ..
322 make %{?jobs:-j%jobs}
327 #######################################################################
328 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
329 # if wearable || "undefined"
330 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
335 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
338 make %{?jobs:-j%jobs}
343 #######################################################################
344 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
345 # if ivi ||"undefined"
346 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
351 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
354 make %{?jobs:-j%jobs}
359 #######################################################################
361 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
362 # if common ||"undefined"
363 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
368 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
371 make %{?jobs:-j%jobs}
376 ##############################
378 ##############################
382 pushd %{_builddir}/%{name}-%{version}/build/tizen
384 # if mobile || "undefined"
385 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
388 pushd %{buildroot}%{_libdir}
389 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile
391 %if "%{?profile}" != "mobile"
392 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
397 # if tv ||"undefined"
398 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
401 pushd %{buildroot}%{_libdir}
402 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv
404 %if "%{?profile}" != "tv"
405 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
410 # if wearable || "undefined"
411 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
414 pushd %{buildroot}%{_libdir}
415 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable
417 %if "%{?profile}" != "wearable"
418 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
423 # if ivi ||"undefined"
424 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
427 pushd %{buildroot}%{_libdir}
428 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi
430 %if "%{?profile}" != "ivi"
431 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
436 # if common ||"undefined"
437 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
440 # No clean so we can gather symbol/size information for the common profile
444 # Create links to ensure linking with cxx11 library is preserved
445 pushd %{buildroot}%{_libdir}
446 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so
447 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
448 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
451 # Create a symbolic link in integration-api to preserve legacy repo build
452 pushd %{buildroot}%{_includedir}/dali/integration-api
453 ln -sf adaptor-framework adaptors
456 ##############################
458 # 1 - Pre Install new package
459 # 2 - Install new package
460 # 3 - Post install new package
461 # 4 - Pre uninstall old package
462 # 5 - Remove files not overwritten by new package
463 # 6 - Post uninstall old package
464 ##############################
466 ##############################
467 # Adaptor package Commands
473 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
485 ##############################
486 # Mobile Profile Commands
487 # if mobile || "undefined"
488 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
491 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
496 %postun profile_mobile
501 ##############################
502 # TV Profile Commands
503 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
506 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
516 ##############################
517 # Wearable Profile Commands
518 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
519 %post profile_wearable
521 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
526 %postun profile_wearable
531 ##############################
532 # IVI Profile Commands
533 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
536 ln -sf libdali-adaptor.so.ivi libdali-adaptor.so.0.0.0
546 ##############################
547 # Common Profile Commands
548 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
553 %postun profile_common
558 ##############################
559 # Files in Binary Packages
560 ##############################
563 %manifest dali-adaptor.manifest
564 %defattr(-,root,root,-)
565 %dir %{user_shader_cache_dir}
568 %defattr(-,root,root,-)
569 %{_libdir}/libdali-adaptor-cxx11.so
570 %{_libdir}/libdali-adaptor-cxx11.so.0
571 %{_libdir}/libdali-adaptor-cxx11.so.0.0.0
572 %{_libdir}/libdali-adaptor.so
573 %{_libdir}/libdali-adaptor.so.0
574 %{_libdir}/libdali-adaptor.so.0.0.0
576 #################################################
578 %files dali-feedback-plugin
579 %manifest dali-adaptor.manifest
580 %defattr(-,root,root,-)
581 %{_libdir}/libdali-feedback-plugin-cxx11.so*
582 %{dali_plugin_sound_files}/*
584 #################################################
586 # if common ||"undefined"
587 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
588 %files profile_common
589 %manifest dali-adaptor.manifest
590 # default .so files are housed in the main pkg.
593 # if mobile || "undefined"
594 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
595 %files profile_mobile
596 %manifest dali-adaptor.manifest
597 %defattr(-,root,root,-)
598 %{_libdir}/libdali-adaptor.so.mobile
601 # if tv ||"undefined"
602 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
604 %manifest dali-adaptor.manifest
605 %defattr(-,root,root,-)
606 %{_libdir}/libdali-adaptor.so.tv
609 # if wearable || "undefined"
610 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
611 %files profile_wearable
612 %manifest dali-adaptor.manifest
613 %defattr(-,root,root,-)
614 %{_libdir}/libdali-adaptor.so.wearable
617 # if ivi ||"undefined"
618 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
620 %manifest dali-adaptor.manifest
621 %defattr(-,root,root,-)
622 %{_libdir}/libdali-adaptor.so.ivi
626 %defattr(-,root,root,-)
627 %{_includedir}/dali/dali.h
628 %{_includedir}/dali/public-api/*
629 %{_includedir}/dali/devel-api/*
630 %{_includedir}/dali/doc/*
631 %{_libdir}/pkgconfig/dali-adaptor.pc
633 %files integration-devel
634 %defattr(-,root,root,-)
635 %{_includedir}/dali/integration-api/adaptor-framework/*
636 %{_includedir}/dali/integration-api/adaptors
637 %{_libdir}/pkgconfig/dali-adaptor-integration.pc