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: dali2-devel
47 BuildRequires: dali2-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 # We use 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 # We need tbm_surface in tizen 3.0 wayland
85 BuildRequires: pkgconfig(libtbm)
88 BuildRequires: pkgconfig(appcore-ui)
89 BuildRequires: pkgconfig(appcore-widget-base)
90 BuildRequires: pkgconfig(bundle)
91 BuildRequires: pkgconfig(capi-appfw-app-common)
92 BuildRequires: pkgconfig(capi-appfw-app-control)
93 BuildRequires: pkgconfig(ecore-imf)
95 BuildRequires: pkgconfig(capi-system-system-settings)
98 BuildRequires: pkgconfig(mm-sound)
99 BuildRequires: pkgconfig(feedback)
102 Requires: %{name}-compat = %{version}-%{release}
103 Recommends: %{name}-profile_common = %{version}-%{release}
106 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
107 platform abstraction and application shell
109 ###########################################
110 # Dali adapter for profiles
111 ###########################################
113 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
114 # if mobile || "undefined"
115 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
116 %package profile_mobile
117 Summary: The DALi Tizen Adaptor for mobile
118 Provides: %{name}-compat = %{version}-%{release}
119 Conflicts: %{name}-profile_tv
120 Conflicts: %{name}-profile_wearable
121 Conflicts: %{name}-profile_ivi
122 Conflicts: %{name}-profile_common
124 %description profile_mobile
125 The DALi Tizen Adaptor for mobile.
128 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
129 # if tv ||"undefined"
130 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
132 Summary: The DALi Tizen Adaptor for tv
133 Provides: %{name}-compat = %{version}-%{release}
134 Conflicts: %{name}-profile_mobile
135 Conflicts: %{name}-profile_wearable
136 Conflicts: %{name}-profile_ivi
137 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
154 %description profile_wearable
155 The DALi Tizen Adaptor for wearable.
158 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
159 # if ivi ||"undefined"
160 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
162 Summary: The DALi Tizen Adaptor for ivi
163 Provides: %{name}-compat = %{version}-%{release}
164 Conflicts: %{name}-profile_mobile
165 Conflicts: %{name}-profile_wearable
166 Conflicts: %{name}-profile_tv
167 Conflicts: %{name}-profile_common
169 %description profile_ivi
170 The DALi Tizen Adaptor for ivi.
173 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
174 # if common ||"undefined"
175 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
176 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
177 %package profile_common
178 Summary: The DALi Tizen Adaptor for common
179 Provides: %{name}-compat = %{version}-%{release}
180 Conflicts: %{name}-profile_mobile
181 Conflicts: %{name}-profile_wearable
182 Conflicts: %{name}-profile_tv
183 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 dali2-feedback-plugin
216 Summary: Plugin to play haptic and audio feedback for Dali
217 Group: System/Libraries
218 Requires: %{name} = %{version}-%{release}
219 %description dali2-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"
274 %if 0%{?enable_appfw}
275 cmake_flags+=" -DUSE_APPFW"
279 cd %{_builddir}/%{name}-%{version}/build/tizen
281 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
282 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
283 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
284 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
285 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
286 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
287 %if 0%{?tizen_platform_config_supported}
288 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
291 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
292 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
293 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
294 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
295 cmake_flags+=" -DENABLE_FEEDBACK=YES"
296 cmake_flags+=" -DENABLE_APPFW=YES"
298 # Set up the build via Cmake
299 #######################################################################
300 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
301 # if mobile || "undefined"
302 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
307 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
310 make %{?jobs:-j%jobs}
315 #######################################################################
316 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
317 # if tv ||"undefined"
318 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
323 cmake -DENABLE_PROFILE=TV $cmake_flags ..
326 make %{?jobs:-j%jobs}
331 #######################################################################
332 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
333 # if wearable || "undefined"
334 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
339 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
342 make %{?jobs:-j%jobs}
347 #######################################################################
348 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
349 # if ivi ||"undefined"
350 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
355 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
358 make %{?jobs:-j%jobs}
363 #######################################################################
365 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
366 # if common ||"undefined"
367 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
372 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
375 make %{?jobs:-j%jobs}
380 ##############################
382 ##############################
386 pushd %{_builddir}/%{name}-%{version}/build/tizen
388 # if mobile || "undefined"
389 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
392 %if "%{?profile}" != "mobile"
393 pushd %{buildroot}%{_libdir}
394 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
396 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
401 # if tv ||"undefined"
402 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
405 %if "%{?profile}" != "tv"
406 pushd %{buildroot}%{_libdir}
407 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
409 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
414 # if wearable || "undefined"
415 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
418 %if "%{?profile}" != "wearable"
419 pushd %{buildroot}%{_libdir}
420 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
422 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
427 # if ivi ||"undefined"
428 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
431 %if "%{?profile}" != "ivi"
432 pushd %{buildroot}%{_libdir}
433 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
435 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
440 # if common ||"undefined"
441 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
444 # No clean so we can gather symbol/size information for the common profile
448 # Create a symbolic link in integration-api to preserve legacy repo build
449 pushd %{buildroot}%{_includedir}/dali/integration-api
450 ln -sf adaptor-framework adaptors
453 ##############################
455 # 1 - Pre Install new package
456 # 2 - Install new package
457 # 3 - Post install new package
458 # 4 - Pre uninstall old package
459 # 5 - Remove files not overwritten by new package
460 # 6 - Post uninstall old package
461 ##############################
463 ##############################
464 # Adaptor package Commands
470 for i in mobile tv wearable ivi; do [[ -f libdali2-adaptor.so.$i ]] && ln -sf libdali2-adaptor.so.$i libdali2-adaptor.so.2.0.0; done
482 ##############################
483 # Mobile Profile Commands
484 # if mobile || "undefined"
485 # No need to create a symbolic link on install required if only building this profile
486 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
488 %if "%{?profile}" != "mobile"
490 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
496 %postun profile_mobile
501 ##############################
502 # TV Profile Commands
503 # No need to create a symbolic link on install required if only building this profile
504 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
506 %if "%{?profile}" != "tv"
508 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
519 ##############################
520 # Wearable Profile Commands
521 # No need to create a symbolic link on install required if only building this profile
522 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
523 %post profile_wearable
524 %if "%{?profile}" != "wearable"
526 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
532 %postun profile_wearable
537 ##############################
538 # IVI Profile Commands
539 # No need to create a symbolic link on install required if only building this profile
540 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
542 %if "%{?profile}" != "ivi"
544 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.0.0.0
555 ##############################
556 # Common Profile Commands
557 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
562 %postun profile_common
567 ##############################
568 # Files in Binary Packages
569 ##############################
572 %manifest dali-adaptor.manifest
573 %defattr(-,root,root,-)
574 %dir %{user_shader_cache_dir}
577 %defattr(-,root,root,-)
578 %{_libdir}/libdali2-adaptor.so
579 %{_libdir}/libdali2-adaptor.so.2
580 %{_libdir}/libdali2-adaptor.so.2.0.0
582 #################################################
584 %files dali2-feedback-plugin
585 %manifest dali-adaptor.manifest
586 %defattr(-,root,root,-)
587 %{_libdir}/libdali2-feedback-plugin.so*
588 %{dali_plugin_sound_files}/*
590 #################################################
592 # if common ||"undefined"
593 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
594 %files profile_common
595 %manifest dali-adaptor.manifest
596 # default .so files are housed in the main pkg.
599 # if mobile || "undefined"
600 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
601 %files profile_mobile
602 %manifest dali-adaptor.manifest
603 %defattr(-,root,root,-)
604 %if "%{?profile}" != "mobile"
605 %{_libdir}/libdali2-adaptor.so.mobile
609 # if tv ||"undefined"
610 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
612 %manifest dali-adaptor.manifest
613 %defattr(-,root,root,-)
614 %if "%{?profile}" != "tv"
615 %{_libdir}/libdali2-adaptor.so.tv
619 # if wearable || "undefined"
620 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
621 %files profile_wearable
622 %manifest dali-adaptor.manifest
623 %defattr(-,root,root,-)
624 %if "%{?profile}" != "wearable"
625 %{_libdir}/libdali2-adaptor.so.wearable
629 # if ivi ||"undefined"
630 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
632 %manifest dali-adaptor.manifest
633 %defattr(-,root,root,-)
634 %if "%{?profile}" != "ivi"
635 %{_libdir}/libdali2-adaptor.so.ivi
640 %defattr(-,root,root,-)
641 %{_includedir}/dali/dali.h
642 %{_includedir}/dali/public-api/*
643 %{_includedir}/dali/devel-api/*
644 %{_includedir}/dali/doc/*
645 %{_libdir}/pkgconfig/dali2-adaptor.pc
647 %files integration-devel
648 %defattr(-,root,root,-)
649 %{_includedir}/dali/integration-api/adaptor-framework/*
650 %{_includedir}/dali/integration-api/adaptors
651 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc