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: dali-devel
47 BuildRequires: dali-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 # dali-adaptor uses 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 # dali-adaptor needs tbm_surface in tizen 3.0 wayland
85 BuildRequires: pkgconfig(libtbm)
87 BuildRequires: pkgconfig(tpkp-curl)
90 BuildRequires: pkgconfig(appcore-ui)
91 BuildRequires: pkgconfig(appcore-widget-base)
92 BuildRequires: pkgconfig(bundle)
93 BuildRequires: pkgconfig(capi-appfw-app-common)
94 BuildRequires: pkgconfig(capi-appfw-app-control)
95 BuildRequires: pkgconfig(ecore-imf)
97 BuildRequires: pkgconfig(capi-system-system-settings)
100 BuildRequires: pkgconfig(mm-sound)
101 BuildRequires: pkgconfig(feedback)
104 Requires: %{name}-compat = %{version}-%{release}
105 Recommends: %{name}-profile_common = %{version}-%{release}
108 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
109 platform abstraction and application shell
111 ###########################################
112 # Dali adapter for profiles
113 ###########################################
115 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
116 # if mobile || "undefined"
117 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
118 %package profile_mobile
119 Summary: The DALi Tizen Adaptor for mobile
120 Provides: %{name}-compat = %{version}-%{release}
121 Conflicts: %{name}-profile_tv
122 Conflicts: %{name}-profile_wearable
123 Conflicts: %{name}-profile_ivi
124 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
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
153 %description profile_wearable
154 The DALi Tizen Adaptor for wearable.
157 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
158 # if ivi ||"undefined"
159 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
161 Summary: The DALi Tizen Adaptor for ivi
162 Provides: %{name}-compat = %{version}-%{release}
163 Conflicts: %{name}-profile_mobile
164 Conflicts: %{name}-profile_wearable
165 Conflicts: %{name}-profile_tv
166 Conflicts: %{name}-profile_common
167 %description profile_ivi
168 The DALi Tizen Adaptor for ivi.
171 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
172 # if common ||"undefined"
173 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
174 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
175 %package profile_common
176 Summary: The DALi Tizen Adaptor for common
177 Provides: %{name}-compat = %{version}-%{release}
178 Conflicts: %{name}-profile_mobile
179 Conflicts: %{name}-profile_wearable
180 Conflicts: %{name}-profile_tv
181 Conflicts: %{name}-profile_ivi
182 %description profile_common
183 The DALi Tizen Adaptor for common.
186 ##############################
188 ##############################
190 Summary: Development components for the DALi Tizen Adaptor
191 Group: Development/Building
192 Requires: %{name} = %{version}-%{release}
193 Requires: %{name}-integration-devel = %{version}-%{release}
196 Development components for the DALi Tizen Adaptor - public headers and package configs
198 ##############################
200 ##############################
201 %package integration-devel
202 Summary: Integration development package for the Adaptor
203 Group: Development/Building
204 Requires: %{name} = %{version}-%{release}
206 %description integration-devel
207 Integration development package for the Adaptor - headers for integrating with an adaptor library.
209 ##############################
210 # Dali Feedback Plugin
211 ##############################
212 %package dali-feedback-plugin
213 Summary: Plugin to play haptic and audio feedback for Dali
214 Group: System/Libraries
215 Requires: %{name} = %{version}-%{release}
216 %description dali-feedback-plugin
217 Feedback plugin to play haptic and audio feedback for Dali
219 ##############################
221 ##############################
225 #Use TZ_PATH when tizen version is 3.x or greater
227 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
228 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
229 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
230 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
231 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
232 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
234 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
235 %define dali_plugin_sound_files /plugins/sounds/
236 %define dev_include_path %{_includedir}
238 ##############################
240 ##############################
243 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
244 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
247 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
251 CXXFLAGS+=" -DWAYLAND"
252 cmake_flags=" -DENABLE_WAYLAND=ON"
254 # Use this conditional when Tizen version is 5.x or greater
255 %if 0%{?tizen_version_major} >= 5
256 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
258 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
259 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
260 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
261 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
264 %if 0%{?enable_debug}
265 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
268 %if 0%{?enable_trace}
269 cmake_flags+=" -DENABLE_TRACE=ON"
273 cd %{_builddir}/%{name}-%{version}/build/tizen
275 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
276 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
277 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
278 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
279 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
280 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
281 %if 0%{?tizen_platform_config_supported}
282 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
285 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
286 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
287 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
288 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
289 cmake_flags+=" -DENABLE_FEEDBACK=YES"
290 cmake_flags+=" -DENABLE_APPFW=YES"
292 # Set up the build via Cmake
293 #######################################################################
294 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
295 # if mobile || "undefined"
296 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
301 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
304 make %{?jobs:-j%jobs}
309 #######################################################################
310 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
311 # if tv ||"undefined"
312 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
317 cmake -DENABLE_PROFILE=TV $cmake_flags ..
320 make %{?jobs:-j%jobs}
325 #######################################################################
326 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
327 # if wearable || "undefined"
328 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
333 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
336 make %{?jobs:-j%jobs}
341 #######################################################################
342 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
343 # if ivi ||"undefined"
344 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
349 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
352 make %{?jobs:-j%jobs}
357 #######################################################################
359 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
360 # if common ||"undefined"
361 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
366 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
369 make %{?jobs:-j%jobs}
374 ##############################
376 ##############################
380 pushd %{_builddir}/%{name}-%{version}/build/tizen
382 # if mobile || "undefined"
383 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
386 pushd %{buildroot}%{_libdir}
387 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile
389 %if "%{?profile}" != "mobile"
390 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
395 # if tv ||"undefined"
396 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
399 pushd %{buildroot}%{_libdir}
400 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv
402 %if "%{?profile}" != "tv"
403 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
408 # if wearable || "undefined"
409 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
412 pushd %{buildroot}%{_libdir}
413 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable
415 %if "%{?profile}" != "wearable"
416 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
421 # if ivi ||"undefined"
422 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
425 pushd %{buildroot}%{_libdir}
426 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi
428 %if "%{?profile}" != "ivi"
429 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
434 # if common ||"undefined"
435 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
438 # No clean so we can gather symbol/size information for the common profile
442 # Create links to ensure linking with cxx11 library is preserved
443 pushd %{buildroot}%{_libdir}
444 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so
445 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
446 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
449 ##############################
451 # 1 - Pre Install new package
452 # 2 - Install new package
453 # 3 - Post install new package
454 # 4 - Pre uninstall old package
455 # 5 - Remove files not overwritten by new package
456 # 6 - Post uninstall old package
457 ##############################
459 ##############################
460 # Adaptor package Commands
475 ##############################
476 # Mobile Profile Commands
477 # if mobile || "undefined"
478 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
481 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
486 %postun profile_mobile
491 ##############################
492 # TV Profile Commands
493 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
496 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
506 ##############################
507 # Wearable Profile Commands
508 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
509 %post profile_wearable
511 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
516 %postun profile_wearable
521 ##############################
522 # IVI Profile Commands
523 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
526 ln -sf libdali-adaptor.so.ivi libdali-adaptor.so.0.0.0
536 ##############################
537 # Common Profile Commands
538 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
543 %postun profile_common
548 ##############################
549 # Files in Binary Packages
550 ##############################
553 %manifest dali-adaptor.manifest
554 %defattr(-,root,root,-)
555 %dir %{user_shader_cache_dir}
558 %defattr(-,root,root,-)
559 %{_libdir}/libdali-adaptor-cxx11.so
560 %{_libdir}/libdali-adaptor-cxx11.so.0
561 %{_libdir}/libdali-adaptor-cxx11.so.0.0.0
562 %{_libdir}/libdali-adaptor.so
563 %{_libdir}/libdali-adaptor.so.0
564 %{_libdir}/libdali-adaptor.so.0.0.0
566 #################################################
568 %files dali-feedback-plugin
569 %manifest dali-adaptor.manifest
570 %defattr(-,root,root,-)
571 %{_libdir}/libdali-feedback-plugin-cxx11.so*
572 %{dali_plugin_sound_files}/*
574 #################################################
576 # if common ||"undefined"
577 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
578 %files profile_common
579 %manifest dali-adaptor.manifest
580 # default .so files are housed in the main pkg.
583 # if mobile || "undefined"
584 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
585 %files profile_mobile
586 %manifest dali-adaptor.manifest
587 %defattr(-,root,root,-)
588 %{_libdir}/libdali-adaptor.so.mobile
591 # if tv ||"undefined"
592 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
594 %manifest dali-adaptor.manifest
595 %defattr(-,root,root,-)
596 %{_libdir}/libdali-adaptor.so.tv
599 # if wearable || "undefined"
600 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
601 %files profile_wearable
602 %manifest dali-adaptor.manifest
603 %defattr(-,root,root,-)
604 %{_libdir}/libdali-adaptor.so.wearable
607 # if ivi ||"undefined"
608 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
610 %manifest dali-adaptor.manifest
611 %defattr(-,root,root,-)
612 %{_libdir}/libdali-adaptor.so.ivi
616 %defattr(-,root,root,-)
617 %{dev_include_path}/dali/dali.h
618 %{dev_include_path}/dali/public-api/*
619 %{dev_include_path}/dali/devel-api/*
620 %{dev_include_path}/dali/doc/*
621 %{_libdir}/pkgconfig/dali-adaptor.pc
623 %files integration-devel
624 %defattr(-,root,root,-)
625 %{dev_include_path}/dali/integration-api/adaptors/*
626 %{_libdir}/pkgconfig/dali-adaptor-integration.pc