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 %if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5
99 BuildRequires: pkgconfig(capi-ui-autofill)
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
129 %description profile_mobile
130 The DALi Tizen Adaptor for mobile.
133 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
134 # if tv ||"undefined"
135 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
137 Summary: The DALi Tizen Adaptor for tv
138 Provides: %{name}-compat = %{version}-%{release}
139 Conflicts: %{name}-profile_mobile
140 Conflicts: %{name}-profile_wearable
141 Conflicts: %{name}-profile_ivi
142 Conflicts: %{name}-profile_common
144 %description profile_tv
145 The DALi Tizen Adaptor for tv.
148 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
149 # if wearable || "undefined"
150 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
151 %package profile_wearable
152 Summary: The DALi Tizen Adaptor for wearable
153 Provides: %{name}-compat = %{version}-%{release}
154 Conflicts: %{name}-profile_mobile
155 Conflicts: %{name}-profile_tv
156 Conflicts: %{name}-profile_ivi
157 Conflicts: %{name}-profile_common
159 %description profile_wearable
160 The DALi Tizen Adaptor for wearable.
163 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
164 # if ivi ||"undefined"
165 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
167 Summary: The DALi Tizen Adaptor for ivi
168 Provides: %{name}-compat = %{version}-%{release}
169 Conflicts: %{name}-profile_mobile
170 Conflicts: %{name}-profile_wearable
171 Conflicts: %{name}-profile_tv
172 Conflicts: %{name}-profile_common
174 %description profile_ivi
175 The DALi Tizen Adaptor for ivi.
178 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
179 # if common ||"undefined"
180 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
181 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
182 %package profile_common
183 Summary: The DALi Tizen Adaptor for common
184 Provides: %{name}-compat = %{version}-%{release}
185 Conflicts: %{name}-profile_mobile
186 Conflicts: %{name}-profile_wearable
187 Conflicts: %{name}-profile_tv
188 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 dali2-feedback-plugin
221 Summary: Plugin to play haptic and audio feedback for Dali
222 Group: System/Libraries
223 Requires: %{name} = %{version}-%{release}
224 %description dali2-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"
279 %if 0%{?enable_appfw}
280 cmake_flags+=" -DUSE_APPFW"
284 cd %{_builddir}/%{name}-%{version}/build/tizen
286 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
287 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
288 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
289 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
290 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
291 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
292 %if 0%{?tizen_platform_config_supported}
293 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
296 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
297 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
298 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
299 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
300 cmake_flags+=" -DENABLE_TIZEN_MINOR_VERSION=%{tizen_version_minor}"
301 cmake_flags+=" -DENABLE_FEEDBACK=YES"
302 cmake_flags+=" -DENABLE_APPFW=YES"
304 # Set up the build via Cmake
305 #######################################################################
306 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
307 # if mobile || "undefined"
308 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
313 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
316 make %{?jobs:-j%jobs}
321 #######################################################################
322 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
323 # if tv ||"undefined"
324 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
329 cmake -DENABLE_PROFILE=TV $cmake_flags ..
332 make %{?jobs:-j%jobs}
337 #######################################################################
338 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
339 # if wearable || "undefined"
340 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
345 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
348 make %{?jobs:-j%jobs}
353 #######################################################################
354 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
355 # if ivi ||"undefined"
356 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
361 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
364 make %{?jobs:-j%jobs}
369 #######################################################################
371 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
372 # if common ||"undefined"
373 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
378 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
381 make %{?jobs:-j%jobs}
386 ##############################
388 ##############################
392 pushd %{_builddir}/%{name}-%{version}/build/tizen
394 # if mobile || "undefined"
395 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
398 %if "%{?profile}" != "mobile"
399 pushd %{buildroot}%{_libdir}
400 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
402 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
407 # if tv ||"undefined"
408 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
411 %if "%{?profile}" != "tv"
412 pushd %{buildroot}%{_libdir}
413 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
415 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
420 # if wearable || "undefined"
421 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
424 %if "%{?profile}" != "wearable"
425 pushd %{buildroot}%{_libdir}
426 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
428 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
433 # if ivi ||"undefined"
434 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
437 %if "%{?profile}" != "ivi"
438 pushd %{buildroot}%{_libdir}
439 cp libdali2-adaptor.so.*.*.* libdali2-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
441 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
446 # if common ||"undefined"
447 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
450 # No clean so we can gather symbol/size information for the common profile
454 # Create a symbolic link in integration-api to preserve legacy repo build
455 pushd %{buildroot}%{_includedir}/dali/integration-api
456 ln -sf adaptor-framework adaptors
459 ##############################
461 # 1 - Pre Install new package
462 # 2 - Install new package
463 # 3 - Post install new package
464 # 4 - Pre uninstall old package
465 # 5 - Remove files not overwritten by new package
466 # 6 - Post uninstall old package
467 ##############################
469 ##############################
470 # Adaptor package Commands
476 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
488 ##############################
489 # Mobile Profile Commands
490 # if mobile || "undefined"
491 # No need to create a symbolic link on install required if only building this profile
492 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
494 %if "%{?profile}" != "mobile"
496 ln -sf libdali2-adaptor.so.mobile libdali2-adaptor.so.2.0.0
502 %postun profile_mobile
507 ##############################
508 # TV Profile Commands
509 # No need to create a symbolic link on install required if only building this profile
510 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
512 %if "%{?profile}" != "tv"
514 ln -sf libdali2-adaptor.so.tv libdali2-adaptor.so.2.0.0
525 ##############################
526 # Wearable Profile Commands
527 # No need to create a symbolic link on install required if only building this profile
528 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
529 %post profile_wearable
530 %if "%{?profile}" != "wearable"
532 ln -sf libdali2-adaptor.so.wearable libdali2-adaptor.so.2.0.0
538 %postun profile_wearable
543 ##############################
544 # IVI Profile Commands
545 # No need to create a symbolic link on install required if only building this profile
546 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
548 %if "%{?profile}" != "ivi"
550 ln -sf libdali2-adaptor.so.ivi libdali2-adaptor.so.0.0.0
561 ##############################
562 # Common Profile Commands
563 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
568 %postun profile_common
573 ##############################
574 # Files in Binary Packages
575 ##############################
578 %manifest dali-adaptor.manifest
579 %defattr(-,root,root,-)
580 %dir %{user_shader_cache_dir}
583 %defattr(-,root,root,-)
584 %{_libdir}/libdali2-adaptor.so
585 %{_libdir}/libdali2-adaptor.so.2
586 %{_libdir}/libdali2-adaptor.so.2.0.0
588 #################################################
590 %files dali2-feedback-plugin
591 %manifest dali-adaptor.manifest
592 %defattr(-,root,root,-)
593 %{_libdir}/libdali2-feedback-plugin.so*
594 %{dali_plugin_sound_files}/*
596 #################################################
598 # if common ||"undefined"
599 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
600 %files profile_common
601 %manifest dali-adaptor.manifest
602 # default .so files are housed in the main pkg.
605 # if mobile || "undefined"
606 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
607 %files profile_mobile
608 %manifest dali-adaptor.manifest
609 %defattr(-,root,root,-)
610 %if "%{?profile}" != "mobile"
611 %{_libdir}/libdali2-adaptor.so.mobile
615 # if tv ||"undefined"
616 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
618 %manifest dali-adaptor.manifest
619 %defattr(-,root,root,-)
620 %if "%{?profile}" != "tv"
621 %{_libdir}/libdali2-adaptor.so.tv
625 # if wearable || "undefined"
626 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
627 %files profile_wearable
628 %manifest dali-adaptor.manifest
629 %defattr(-,root,root,-)
630 %if "%{?profile}" != "wearable"
631 %{_libdir}/libdali2-adaptor.so.wearable
635 # if ivi ||"undefined"
636 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
638 %manifest dali-adaptor.manifest
639 %defattr(-,root,root,-)
640 %if "%{?profile}" != "ivi"
641 %{_libdir}/libdali2-adaptor.so.ivi
646 %defattr(-,root,root,-)
647 %{_includedir}/dali/dali.h
648 %{_includedir}/dali/public-api/*
649 %{_includedir}/dali/devel-api/*
650 %{_includedir}/dali/doc/*
651 %{_libdir}/pkgconfig/dali2-adaptor.pc
653 %files integration-devel
654 %defattr(-,root,root,-)
655 %{_includedir}/dali/integration-api/adaptor-framework/*
656 %{_includedir}/dali/integration-api/adaptors
657 %{_libdir}/pkgconfig/dali2-adaptor-integration.pc