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 # dali-adaptor uses ecore mainloop
83 %if 0%{?tizen_version_major} >= 5
84 BuildRequires: pkgconfig(ecore-wl2)
85 BuildRequires: pkgconfig(wayland-egl-tizen)
87 BuildRequires: pkgconfig(ecore-wayland)
90 # dali-adaptor needs tbm_surface in tizen 3.0 wayland
91 BuildRequires: pkgconfig(libtbm)
93 BuildRequires: pkgconfig(tpkp-curl)
96 BuildRequires: pkgconfig(appcore-ui)
97 BuildRequires: pkgconfig(appcore-widget-base)
98 BuildRequires: pkgconfig(bundle)
99 BuildRequires: pkgconfig(capi-appfw-app-common)
100 BuildRequires: pkgconfig(capi-appfw-app-control)
101 BuildRequires: pkgconfig(ecore-imf)
103 BuildRequires: pkgconfig(capi-system-system-settings)
106 %if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5
107 BuildRequires: pkgconfig(capi-ui-autofill)
110 # for feedback plugin
111 BuildRequires: pkgconfig(mm-sound)
112 BuildRequires: pkgconfig(feedback)
115 Requires: %{name}-compat = %{version}-%{release}
116 Recommends: %{name}-profile_common = %{version}-%{release}
119 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
120 platform abstraction and application shell
122 ###########################################
123 # Dali adapter for profiles
124 ###########################################
126 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
127 # if mobile || "undefined"
128 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
129 %package profile_mobile
130 Summary: The DALi Tizen Adaptor for mobile
131 Provides: %{name}-compat = %{version}-%{release}
132 Conflicts: %{name}-profile_tv
133 Conflicts: %{name}-profile_wearable
134 Conflicts: %{name}-profile_ivi
135 Conflicts: %{name}-profile_common
137 %description profile_mobile
138 The DALi Tizen Adaptor for mobile.
141 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
142 # if tv ||"undefined"
143 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
145 Summary: The DALi Tizen Adaptor for tv
146 Provides: %{name}-compat = %{version}-%{release}
147 Conflicts: %{name}-profile_mobile
148 Conflicts: %{name}-profile_wearable
149 Conflicts: %{name}-profile_ivi
150 Conflicts: %{name}-profile_common
152 %description profile_tv
153 The DALi Tizen Adaptor for tv.
156 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
157 # if wearable || "undefined"
158 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
159 %package profile_wearable
160 Summary: The DALi Tizen Adaptor for wearable
161 Provides: %{name}-compat = %{version}-%{release}
162 Conflicts: %{name}-profile_mobile
163 Conflicts: %{name}-profile_tv
164 Conflicts: %{name}-profile_ivi
165 Conflicts: %{name}-profile_common
167 %description profile_wearable
168 The DALi Tizen Adaptor for wearable.
171 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
172 # if ivi ||"undefined"
173 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
175 Summary: The DALi Tizen Adaptor for ivi
176 Provides: %{name}-compat = %{version}-%{release}
177 Conflicts: %{name}-profile_mobile
178 Conflicts: %{name}-profile_wearable
179 Conflicts: %{name}-profile_tv
180 Conflicts: %{name}-profile_common
182 %description profile_ivi
183 The DALi Tizen Adaptor for ivi.
186 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
187 # if common ||"undefined"
188 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
189 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
190 %package profile_common
191 Summary: The DALi Tizen Adaptor for common
192 Provides: %{name}-compat = %{version}-%{release}
193 Conflicts: %{name}-profile_mobile
194 Conflicts: %{name}-profile_wearable
195 Conflicts: %{name}-profile_tv
196 Conflicts: %{name}-profile_ivi
198 %description profile_common
199 The DALi Tizen Adaptor for common.
202 ##############################
204 ##############################
206 Summary: Development components for the DALi Tizen Adaptor
207 Group: Development/Building
208 Requires: %{name} = %{version}-%{release}
209 Requires: %{name}-integration-devel = %{version}-%{release}
212 Development components for the DALi Tizen Adaptor - public headers and package configs
214 ##############################
216 ##############################
217 %package integration-devel
218 Summary: Integration development package for the Adaptor
219 Group: Development/Building
220 Requires: %{name} = %{version}-%{release}
222 %description integration-devel
223 Integration development package for the Adaptor - headers for integrating with an adaptor library.
225 ##############################
226 # Dali Feedback Plugin
227 ##############################
228 %package dali-feedback-plugin
229 Summary: Plugin to play haptic and audio feedback for Dali
230 Group: System/Libraries
231 Requires: %{name} = %{version}-%{release}
232 %description dali-feedback-plugin
233 Feedback plugin to play haptic and audio feedback for Dali
235 ##############################
237 ##############################
241 #Use TZ_PATH when tizen version is 3.x or greater
243 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
244 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
245 %define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/
246 %define font_downloaded_path %TZ_SYS_SHARE/fonts/
247 %define font_application_path %TZ_SYS_RO_SHARE/app_fonts/
248 %define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
250 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
251 %define dali_plugin_sound_files /plugins/sounds/
253 ##############################
255 ##############################
258 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
259 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
262 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
266 CXXFLAGS+=" -DWAYLAND"
267 cmake_flags=" -DENABLE_WAYLAND=ON"
269 # Use this conditional when Tizen version is 5.x or greater
270 %if 0%{?tizen_version_major} >= 5
271 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
273 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
274 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
275 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
276 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
279 %if 0%{?enable_debug}
280 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
283 %if 0%{?enable_trace}
284 cmake_flags+=" -DENABLE_TRACE=ON"
288 cd %{_builddir}/%{name}-%{version}/build/tizen
290 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
291 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
292 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
293 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
294 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
295 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
296 %if 0%{?tizen_platform_config_supported}
297 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
300 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
301 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
302 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
303 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
304 cmake_flags+=" -DENABLE_TIZEN_MINOR_VERSION=%{tizen_version_minor}"
305 cmake_flags+=" -DENABLE_FEEDBACK=YES"
306 cmake_flags+=" -DENABLE_APPFW=YES"
308 # Set up the build via Cmake
309 #######################################################################
310 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
311 # if mobile || "undefined"
312 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
317 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
320 make %{?jobs:-j%jobs}
325 #######################################################################
326 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
327 # if tv ||"undefined"
328 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
333 cmake -DENABLE_PROFILE=TV $cmake_flags ..
336 make %{?jobs:-j%jobs}
341 #######################################################################
342 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
343 # if wearable || "undefined"
344 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
349 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
352 make %{?jobs:-j%jobs}
357 #######################################################################
358 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
359 # if ivi ||"undefined"
360 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
365 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
368 make %{?jobs:-j%jobs}
373 #######################################################################
375 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
376 # if common ||"undefined"
377 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
382 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
385 make %{?jobs:-j%jobs}
390 ##############################
392 ##############################
396 pushd %{_builddir}/%{name}-%{version}/build/tizen
398 # if mobile || "undefined"
399 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
402 %if "%{?profile}" != "mobile"
403 pushd %{buildroot}%{_libdir}
404 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
406 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
411 # if tv ||"undefined"
412 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
415 %if "%{?profile}" != "tv"
416 pushd %{buildroot}%{_libdir}
417 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
419 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
424 # if wearable || "undefined"
425 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
428 %if "%{?profile}" != "wearable"
429 pushd %{buildroot}%{_libdir}
430 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
432 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
437 # if ivi ||"undefined"
438 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
441 %if "%{?profile}" != "ivi"
442 pushd %{buildroot}%{_libdir}
443 cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
445 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
450 # if common ||"undefined"
451 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
454 # No clean so we can gather symbol/size information for the common profile
458 # Create links to ensure linking with cxx11 library is preserved
459 pushd %{buildroot}%{_libdir}
460 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so
461 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
462 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
465 # Create a symbolic link in integration-api to preserve legacy repo build
466 pushd %{buildroot}%{_includedir}/dali/integration-api
467 ln -sf adaptor-framework adaptors
470 ##############################
472 # 1 - Pre Install new package
473 # 2 - Install new package
474 # 3 - Post install new package
475 # 4 - Pre uninstall old package
476 # 5 - Remove files not overwritten by new package
477 # 6 - Post uninstall old package
478 ##############################
480 ##############################
481 # Adaptor package Commands
487 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
499 ##############################
500 # Mobile Profile Commands
501 # if mobile || "undefined"
502 # No need to create a symbolic link on install required if only building this profile
503 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
505 %if "%{?profile}" != "mobile"
507 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
513 %postun profile_mobile
518 ##############################
519 # TV Profile Commands
520 # No need to create a symbolic link on install required if only building this profile
521 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
523 %if "%{?profile}" != "tv"
525 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
536 ##############################
537 # Wearable Profile Commands
538 # No need to create a symbolic link on install required if only building this profile
539 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
540 %post profile_wearable
541 %if "%{?profile}" != "wearable"
543 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
549 %postun profile_wearable
554 ##############################
555 # IVI Profile Commands
556 # No need to create a symbolic link on install required if only building this profile
557 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
559 %if "%{?profile}" != "ivi"
561 ln -sf libdali-adaptor.so.ivi libdali-adaptor.so.0.0.0
572 ##############################
573 # Common Profile Commands
574 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
579 %postun profile_common
584 ##############################
585 # Files in Binary Packages
586 ##############################
589 %manifest dali-adaptor.manifest
590 %defattr(-,root,root,-)
591 %dir %{user_shader_cache_dir}
594 %defattr(-,root,root,-)
595 %{_libdir}/libdali-adaptor-cxx11.so
596 %{_libdir}/libdali-adaptor-cxx11.so.0
597 %{_libdir}/libdali-adaptor-cxx11.so.0.0.0
598 %{_libdir}/libdali-adaptor.so
599 %{_libdir}/libdali-adaptor.so.0
600 %{_libdir}/libdali-adaptor.so.0.0.0
602 #################################################
604 %files dali-feedback-plugin
605 %manifest dali-adaptor.manifest
606 %defattr(-,root,root,-)
607 %{_libdir}/libdali-feedback-plugin-cxx11.so*
608 %{dali_plugin_sound_files}/*
610 #################################################
612 # if common ||"undefined"
613 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
614 %files profile_common
615 %manifest dali-adaptor.manifest
616 # default .so files are housed in the main pkg.
619 # if mobile || "undefined"
620 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
621 %files profile_mobile
622 %manifest dali-adaptor.manifest
623 %defattr(-,root,root,-)
624 %if "%{?profile}" != "mobile"
625 %{_libdir}/libdali-adaptor.so.mobile
629 # if tv ||"undefined"
630 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
632 %manifest dali-adaptor.manifest
633 %defattr(-,root,root,-)
634 %if "%{?profile}" != "tv"
635 %{_libdir}/libdali-adaptor.so.tv
639 # if wearable || "undefined"
640 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
641 %files profile_wearable
642 %manifest dali-adaptor.manifest
643 %defattr(-,root,root,-)
644 %if "%{?profile}" != "wearable"
645 %{_libdir}/libdali-adaptor.so.wearable
649 # if ivi ||"undefined"
650 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
652 %manifest dali-adaptor.manifest
653 %defattr(-,root,root,-)
654 %if "%{?profile}" != "ivi"
655 %{_libdir}/libdali-adaptor.so.ivi
660 %defattr(-,root,root,-)
661 %{_includedir}/dali/dali.h
662 %{_includedir}/dali/public-api/*
663 %{_includedir}/dali/devel-api/*
664 %{_includedir}/dali/doc/*
665 %{_libdir}/pkgconfig/dali-adaptor.pc
667 %files integration-devel
668 %defattr(-,root,root,-)
669 %{_includedir}/dali/integration-api/adaptor-framework/*
670 %{_includedir}/dali/integration-api/adaptors
671 %{_libdir}/pkgconfig/dali-adaptor-integration.pc