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 # WebP support only from Tizen 6 onwards
83 %if 0%{?tizen_version_major} >= 6
84 BuildRequires: pkgconfig(libwebp)
85 BuildRequires: pkgconfig(libwebpdecoder)
86 BuildRequires: pkgconfig(libwebpdemux)
87 BuildRequires: pkgconfig(libwebpmux)
90 # We use ecore mainloop
91 %if 0%{?tizen_version_major} >= 5
92 BuildRequires: pkgconfig(ecore-wl2)
93 BuildRequires: pkgconfig(wayland-egl-tizen)
95 BuildRequires: pkgconfig(ecore-wayland)
98 # dali-adaptor needs tbm_surface in tizen 3.0 wayland
99 BuildRequires: pkgconfig(libtbm)
102 BuildRequires: pkgconfig(appcore-ui)
103 BuildRequires: pkgconfig(appcore-widget-base)
104 BuildRequires: pkgconfig(bundle)
105 BuildRequires: pkgconfig(capi-appfw-app-common)
106 BuildRequires: pkgconfig(capi-appfw-app-control)
107 BuildRequires: pkgconfig(ecore-imf)
109 BuildRequires: pkgconfig(capi-system-system-settings)
111 # for feedback plugin
112 BuildRequires: pkgconfig(mm-sound)
113 BuildRequires: pkgconfig(feedback)
114 BuildRequires: pkgconfig(component-based-core-base)
117 Requires: %{name}-compat = %{version}-%{release}
118 Recommends: %{name}-profile_common = %{version}-%{release}
121 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
122 platform abstraction and application shell
124 ###########################################
125 # Dali adapter for profiles
126 ###########################################
128 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
129 # if mobile || "undefined"
130 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
131 %package profile_mobile
132 Summary: The DALi Tizen Adaptor for mobile
133 Provides: %{name}-compat = %{version}-%{release}
134 Conflicts: %{name}-profile_tv
135 Conflicts: %{name}-profile_wearable
136 Conflicts: %{name}-profile_ivi
137 Conflicts: %{name}-profile_common
139 %description profile_mobile
140 The DALi Tizen Adaptor for mobile.
143 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
144 # if tv ||"undefined"
145 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
147 Summary: The DALi Tizen Adaptor for tv
148 Provides: %{name}-compat = %{version}-%{release}
149 Conflicts: %{name}-profile_mobile
150 Conflicts: %{name}-profile_wearable
151 Conflicts: %{name}-profile_ivi
152 Conflicts: %{name}-profile_common
154 %description profile_tv
155 The DALi Tizen Adaptor for tv.
158 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
159 # if wearable || "undefined"
160 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
161 %package profile_wearable
162 Summary: The DALi Tizen Adaptor for wearable
163 Provides: %{name}-compat = %{version}-%{release}
164 Conflicts: %{name}-profile_mobile
165 Conflicts: %{name}-profile_tv
166 Conflicts: %{name}-profile_ivi
167 Conflicts: %{name}-profile_common
169 %description profile_wearable
170 The DALi Tizen Adaptor for wearable.
173 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
174 # if ivi ||"undefined"
175 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
177 Summary: The DALi Tizen Adaptor for ivi
178 Provides: %{name}-compat = %{version}-%{release}
179 Conflicts: %{name}-profile_mobile
180 Conflicts: %{name}-profile_wearable
181 Conflicts: %{name}-profile_tv
182 Conflicts: %{name}-profile_common
184 %description profile_ivi
185 The DALi Tizen Adaptor for ivi.
188 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
189 # if common ||"undefined"
190 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
191 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
192 %package profile_common
193 Summary: The DALi Tizen Adaptor for common
194 Provides: %{name}-compat = %{version}-%{release}
195 Conflicts: %{name}-profile_mobile
196 Conflicts: %{name}-profile_wearable
197 Conflicts: %{name}-profile_tv
198 Conflicts: %{name}-profile_ivi
200 %description profile_common
201 The DALi Tizen Adaptor for common.
204 ##############################
206 ##############################
208 Summary: Development components for the DALi Tizen Adaptor
209 Group: Development/Building
210 Requires: %{name} = %{version}-%{release}
211 Requires: %{name}-integration-devel = %{version}-%{release}
214 Development components for the DALi Tizen Adaptor - public headers and package configs
216 ##############################
218 ##############################
219 %package integration-devel
220 Summary: Integration development package for the Adaptor
221 Group: Development/Building
222 Requires: %{name} = %{version}-%{release}
224 %description integration-devel
225 Integration development package for the Adaptor - headers for integrating with an adaptor library.
227 ##############################
228 # Dali Feedback Plugin
229 ##############################
230 %package dali-feedback-plugin
231 Summary: Plugin to play haptic and audio feedback for Dali
232 Group: System/Libraries
233 Requires: %{name} = %{version}-%{release}
234 %description dali-feedback-plugin
235 Feedback plugin to play haptic and audio feedback for Dali
237 ##############################
239 ##############################
243 #Use TZ_PATH when tizen version is 3.x or greater
245 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali-legacy/
246 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali-legacy/
247 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
248 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
249 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
250 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
252 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
253 %define dali_plugin_sound_files /plugins/sounds/
255 ##############################
257 ##############################
260 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
261 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
264 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
268 CXXFLAGS+=" -DWAYLAND"
269 cmake_flags=" -DENABLE_WAYLAND=ON"
271 # Use this conditional when Tizen version is 5.x or greater
272 %if 0%{?tizen_version_major} >= 5
273 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
275 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
276 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
277 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
278 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
281 %if 0%{?enable_debug}
282 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
285 %if 0%{?enable_trace}
286 cmake_flags+=" -DENABLE_TRACE=ON"
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_FEEDBACK=YES"
307 cmake_flags+=" -DENABLE_APPFW=YES"
308 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=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