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)
100 BuildRequires: pkgconfig(component-based-core-base)
103 Requires: %{name}-compat = %{version}-%{release}
104 Recommends: %{name}-profile_common = %{version}-%{release}
107 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
108 platform abstraction and application shell
110 ###########################################
111 # Dali adapter for profiles
112 ###########################################
114 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
115 # if mobile || "undefined"
116 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
117 %package profile_mobile
118 Summary: The DALi Tizen Adaptor for mobile
119 Provides: %{name}-compat = %{version}-%{release}
120 Conflicts: %{name}-profile_tv
121 Conflicts: %{name}-profile_wearable
122 Conflicts: %{name}-profile_ivi
123 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
140 %description profile_tv
141 The DALi Tizen Adaptor for tv.
144 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
145 # if wearable || "undefined"
146 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
147 %package profile_wearable
148 Summary: The DALi Tizen Adaptor for wearable
149 Provides: %{name}-compat = %{version}-%{release}
150 Conflicts: %{name}-profile_mobile
151 Conflicts: %{name}-profile_tv
152 Conflicts: %{name}-profile_ivi
153 Conflicts: %{name}-profile_common
155 %description profile_wearable
156 The DALi Tizen Adaptor for wearable.
159 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
160 # if ivi ||"undefined"
161 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
163 Summary: The DALi Tizen Adaptor for ivi
164 Provides: %{name}-compat = %{version}-%{release}
165 Conflicts: %{name}-profile_mobile
166 Conflicts: %{name}-profile_wearable
167 Conflicts: %{name}-profile_tv
168 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
186 %description profile_common
187 The DALi Tizen Adaptor for common.
190 ##############################
192 ##############################
194 Summary: Development components for the DALi Tizen Adaptor
195 Group: Development/Building
196 Requires: %{name} = %{version}-%{release}
197 Requires: %{name}-integration-devel = %{version}-%{release}
200 Development components for the DALi Tizen Adaptor - public headers and package configs
202 ##############################
204 ##############################
205 %package integration-devel
206 Summary: Integration development package for the Adaptor
207 Group: Development/Building
208 Requires: %{name} = %{version}-%{release}
210 %description integration-devel
211 Integration development package for the Adaptor - headers for integrating with an adaptor library.
213 ##############################
214 # Dali Feedback Plugin
215 ##############################
216 %package dali2-feedback-plugin
217 Summary: Plugin to play haptic and audio feedback for Dali
218 Group: System/Libraries
219 Requires: %{name} = %{version}-%{release}
220 %description dali2-feedback-plugin
221 Feedback plugin to play haptic and audio feedback for Dali
223 ##############################
225 ##############################
229 #Use TZ_PATH when tizen version is 3.x or greater
231 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
232 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
233 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
234 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
235 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
236 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
238 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
239 %define dali_plugin_sound_files /plugins/sounds/
241 ##############################
243 ##############################
246 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
247 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
250 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
254 CXXFLAGS+=" -DWAYLAND"
255 cmake_flags=" -DENABLE_WAYLAND=ON"
257 # Use this conditional when Tizen version is 5.x or greater
258 %if 0%{?tizen_version_major} >= 5
259 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
261 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
262 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
263 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
264 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
267 %if 0%{?enable_debug}
268 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
271 %if 0%{?enable_trace}
272 cmake_flags+=" -DENABLE_TRACE=ON"
276 cd %{_builddir}/%{name}-%{version}/build/tizen
278 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
279 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
280 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
281 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
282 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
283 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
284 %if 0%{?tizen_platform_config_supported}
285 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
288 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
289 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
290 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
291 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
292 cmake_flags+=" -DENABLE_FEEDBACK=YES"
293 cmake_flags+=" -DENABLE_APPFW=YES"
294 cmake_flags+=" -DCOMPONENT_APPLICATION_SUPPORT=YES"
296 # Set up the build via Cmake
297 #######################################################################
298 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
299 # if mobile || "undefined"
300 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
305 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
308 make %{?jobs:-j%jobs}
313 #######################################################################
314 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
315 # if tv ||"undefined"
316 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
321 cmake -DENABLE_PROFILE=TV $cmake_flags ..
324 make %{?jobs:-j%jobs}
329 #######################################################################
330 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
331 # if wearable || "undefined"
332 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
337 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
340 make %{?jobs:-j%jobs}
345 #######################################################################
346 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
347 # if ivi ||"undefined"
348 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
353 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
356 make %{?jobs:-j%jobs}
361 #######################################################################
363 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
364 # if common ||"undefined"
365 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
370 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
373 make %{?jobs:-j%jobs}
378 ##############################
380 ##############################
384 pushd %{_builddir}/%{name}-%{version}/build/tizen
386 # if mobile || "undefined"
387 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
390 %if "%{?profile}" != "mobile"
391 pushd %{buildroot}%{_libdir}
392 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
394 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
399 # if tv ||"undefined"
400 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
403 %if "%{?profile}" != "tv"
404 pushd %{buildroot}%{_libdir}
405 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
407 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
412 # if wearable || "undefined"
413 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
416 %if "%{?profile}" != "wearable"
417 pushd %{buildroot}%{_libdir}
418 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
420 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
425 # if ivi ||"undefined"
426 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
429 %if "%{?profile}" != "ivi"
430 pushd %{buildroot}%{_libdir}
431 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
433 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
438 # if common ||"undefined"
439 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
442 # No clean so we can gather symbol/size information for the common profile
446 # Create a symbolic link in integration-api to preserve legacy repo build
447 pushd %{buildroot}%{_includedir}/dali/integration-api
448 ln -sf adaptor-framework adaptors
451 ##############################
453 # 1 - Pre Install new package
454 # 2 - Install new package
455 # 3 - Post install new package
456 # 4 - Pre uninstall old package
457 # 5 - Remove files not overwritten by new package
458 # 6 - Post uninstall old package
459 ##############################
461 ##############################
462 # Adaptor package Commands
468 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
480 ##############################
481 # Mobile Profile Commands
482 # if mobile || "undefined"
483 # No need to create a symbolic link on install required if only building this profile
484 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
486 %if "%{?profile}" != "mobile"
488 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
494 %postun profile_mobile
499 ##############################
500 # TV Profile Commands
501 # No need to create a symbolic link on install required if only building this profile
502 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
504 %if "%{?profile}" != "tv"
506 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
517 ##############################
518 # Wearable Profile Commands
519 # No need to create a symbolic link on install required if only building this profile
520 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
521 %post profile_wearable
522 %if "%{?profile}" != "wearable"
524 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
530 %postun profile_wearable
535 ##############################
536 # IVI Profile Commands
537 # No need to create a symbolic link on install required if only building this profile
538 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
540 %if "%{?profile}" != "ivi"
542 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.0.0.0
553 ##############################
554 # Common Profile Commands
555 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
560 %postun profile_common
565 ##############################
566 # Files in Binary Packages
567 ##############################
570 %manifest dali-adaptor.manifest
571 %defattr(-,root,root,-)
572 %dir %{user_shader_cache_dir}
575 %defattr(-,root,root,-)
576 %{_libdir}/libdali2-adaptor.so
577 %{_libdir}/libdali2-adaptor.so.2
578 %{_libdir}/libdali2-adaptor.so.2.0.0
580 #################################################
582 %files dali2-feedback-plugin
583 %manifest dali-adaptor.manifest
584 %defattr(-,root,root,-)
585 %{_libdir}/libdali2-feedback-plugin.so*
586 %{dali_plugin_sound_files}/*
588 #################################################
590 # if common ||"undefined"
591 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
592 %files profile_common
593 %manifest dali-adaptor.manifest
594 # default .so files are housed in the main pkg.
597 # if mobile || "undefined"
598 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
599 %files profile_mobile
600 %manifest dali-adaptor.manifest
601 %defattr(-,root,root,-)
602 %if "%{?profile}" != "mobile"
603 %{_libdir}/libdali2-adaptor.so.mobile
607 # if tv ||"undefined"
608 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
610 %manifest dali-adaptor.manifest
611 %defattr(-,root,root,-)
612 %if "%{?profile}" != "tv"
613 %{_libdir}/libdali2-adaptor.so.tv
617 # if wearable || "undefined"
618 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
619 %files profile_wearable
620 %manifest dali-adaptor.manifest
621 %defattr(-,root,root,-)
622 %if "%{?profile}" != "wearable"
623 %{_libdir}/libdali2-adaptor.so.wearable
627 # if ivi ||"undefined"
628 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
630 %manifest dali-adaptor.manifest
631 %defattr(-,root,root,-)
632 %if "%{?profile}" != "ivi"
633 %{_libdir}/libdali2-adaptor.so.ivi
638 %defattr(-,root,root,-)
639 %{_includedir}/dali/dali.h
640 %{_includedir}/dali/public-api/*
641 %{_includedir}/dali/devel-api/*
642 %{_includedir}/dali/doc/*
643 %{_libdir}/pkgconfig/dali2-adaptor.pc
645 %files integration-devel
646 %defattr(-,root,root,-)
647 %{_includedir}/dali/integration-api/adaptor-framework/*
648 %{_includedir}/dali/integration-api/adaptors
649 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc