2 # This spec file is used to build DALi C# binder 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 # This if statement is for backward compatibility with GBM/Obsolete build systems
13 %if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
14 %global __provides_exclude_from ^.*\\.(wearable|mobile|tv|ivi|common)$
19 #please update nui_internal_version below, if you changed version-check.cpp
20 %define nui_internal_version nui550
22 Name: dali2-csharp-binder
23 Summary: The DALI Csharp Binder
27 License: Apache-2.0 and BSD-3-Clause and MIT
28 Source: %{name}-%{version}.tar.xz
30 Requires(post): /sbin/ldconfig
31 Requires(postun): /sbin/ldconfig
33 %define tizen_platform_config_supported 1
34 BuildRequires: pkgconfig(libtzplatform-config)
36 # If the profile is selected, the line below is repquired.
37 # if wearable || "undefined"
38 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
39 BuildRequires: pkgconfig(capi-appfw-watch-application)
40 BuildRequires: pkgconfig(appcore-watch)
41 BuildRequires: pkgconfig(screen_connector_provider)
44 BuildRequires: pkgconfig
47 BuildRequires: pkgconfig(dali2-core)
48 BuildRequires: pkgconfig(dali2-adaptor)
49 BuildRequires: pkgconfig(dali2-toolkit)
50 BuildRequires: pkgconfig(dali2-scene3d)
51 BuildRequires: pkgconfig(dali2-physics-2d)
52 BuildRequires: pkgconfig(dali2-physics-3d)
53 %if "%{_vd_cfg_product_type}" != "AUDIO" && "%{_vd_cfg_product_type}" !="AV"
54 %define rive_animation_view 1
55 BuildRequires: pkgconfig(dali2-extension-rive-animation-view)
59 BuildRequires: pkgconfig(widget_viewer_dali)
60 BuildRequires: pkgconfig(watch_viewer_dali)
61 BuildRequires: pkgconfig(watch-holder-base)
63 %if 0%{?tizen_version_major} >= 5
64 BuildRequires: pkgconfig(ecore-wl2)
66 BuildRequires: pkgconfig(ecore-wayland)
70 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
71 BuildRequires: asan-force-options
72 BuildRequires: asan-build-env
73 BuildRequires: libasan
77 Requires: %{name}-compat = %{version}-%{release}
78 Recommends: %{name}-profile_common = %{version}-%{release}
83 ###########################################
84 # Dali csharp binder for profiles
85 ###########################################
87 # If the profile is selected, the line below is repquired.
88 # if mobile || "undefined"
89 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
90 %package profile_mobile
91 Summary: The DALi Tizen csharp binder for mobile
92 Provides: %{name}-compat = %{version}-%{release}
93 Conflicts: %{name}-profile_tv
94 Conflicts: %{name}-profile_wearable
95 Conflicts: %{name}-profile_ivi
96 Conflicts: %{name}-profile_common
97 %description profile_mobile
98 The DALi Tizen csharp binder for mobile.
101 # If the profile is selected, the line below is repquired.
102 # if tv ||"undefined"
103 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
105 Summary: The DALi Tizen csharp binder for tv
106 Provides: %{name}-compat = %{version}-%{release}
107 Conflicts: %{name}-profile_mobile
108 Conflicts: %{name}-profile_wearable
109 Conflicts: %{name}-profile_ivi
110 Conflicts: %{name}-profile_common
111 %description profile_tv
112 The DALi Tizen csharp binder for tv.
115 # If the profile is selected, the line below is repquired.
116 # if wearable || "undefined"
117 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
118 %package profile_wearable
119 Summary: The DALi Tizen csharp binder for wearable
120 Provides: %{name}-compat = %{version}-%{release}
121 Conflicts: %{name}-profile_mobile
122 Conflicts: %{name}-profile_tv
123 Conflicts: %{name}-profile_ivi
124 Conflicts: %{name}-profile_common
125 %description profile_wearable
126 The DALi Tizen csharp binder for wearable.
129 # If the profile is selected, the line below is repquired.
130 # if ivi ||"undefined"
131 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
133 Summary: The DALi Tizen csharp binder for ivi
134 Provides: %{name}-compat = %{version}-%{release}
135 Conflicts: %{name}-profile_mobile
136 Conflicts: %{name}-profile_wearable
137 Conflicts: %{name}-profile_tv
138 Conflicts: %{name}-profile_common
139 %description profile_ivi
140 The DALi Tizen csharp binder for ivi.
143 # If the profile is selected, the line below is repquired.
144 # if common ||"undefined"
145 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
146 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
147 %package profile_common
148 %define tizen_2_2_compatibility 0
149 Summary: The DALi Tizen csharp binder for common
150 Provides: %{name}-compat = %{version}-%{release}
151 Conflicts: %{name}-profile_mobile
152 Conflicts: %{name}-profile_wearable
153 Conflicts: %{name}-profile_tv
154 Conflicts: %{name}-profile_ivi
155 %description profile_common
156 The DALi Tizen csharp binder for common.
160 ##############################
162 ##############################
164 Summary: build dali csharp binder
165 Group: Development/Building
166 Requires: %{name} = %{version}-%{release}
169 This package includes developer files common to all packages.
172 ##############################
174 ##############################
176 Summary: build dali csharp binder scene3d
177 Group: System/Libraries
178 Requires: %{name} = %{version}-%{release}
182 ##############################
184 ##############################
186 Summary: build dali csharp binder physics2d
187 Group: System/Libraries
188 Requires: %{name} = %{version}-%{release}
189 %description physics2d
192 ##############################
194 ##############################
196 Summary: build dali csharp binder physics3d
197 Group: System/Libraries
198 Requires: %{name} = %{version}-%{release}
199 %description physics3d
203 ##############################
205 ##############################
209 # %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
210 # %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
212 ##############################
214 ##############################
217 CXXFLAGS+=" -Wall -g -Os -fPIC"
218 LDFLAGS+=" -Wl,--rpath=%{_libdir} "
222 CXXFLAGS+=" -DWAYLAND"
223 cmake_flags=" -DENABLE_WAYLAND=ON"
225 # Use this conditional when Tizen version is 5.x or greater
226 %if 0%{?tizen_version_major} >= 5
227 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
229 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
230 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
231 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
232 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
235 # Use this conditional when Tizen version is 7.x or greater
236 %if 0%{?tizen_version_major} >= 7
237 CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
242 %if "%{vd_asan}" == "1" || "%{asan}" == "1"
243 CFLAGS+=" -fsanitize=address"
244 CXXFLAGS+=" -fsanitize=address"
245 LDFLAGS+=" -fsanitize=address"
248 %if 0%{?enable_debug}
249 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
252 %if 0%{?rive_animation_view}
253 cmake_flags+=" -DENABLE_RIVE_ANIMATION=ON"
258 cd %{_builddir}/%{name}-%{version}/build/tizen
260 # DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
261 # DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
262 %if 0%{?tizen_platform_config_supported}
263 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
266 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
267 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
268 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
269 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
270 cmake_flags+=" -DENABLE_SCENE3D=ON"
271 cmake_flags+=" -DENABLE_PHYSICS_2D=ON"
272 cmake_flags+=" -DENABLE_PHYSICS_3D=ON"
275 # Set up the build via Cmake
276 #######################################################################
277 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
278 # if mobile || "undefined"
279 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
284 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
287 make %{?jobs:-j%jobs}
292 #######################################################################
293 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
294 # if tv ||"undefined"
295 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
300 cmake -DENABLE_PROFILE=TV $cmake_flags ..
303 make %{?jobs:-j%jobs}
308 #######################################################################
309 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
310 # if wearable || "undefined"
311 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
316 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
319 make %{?jobs:-j%jobs}
324 #######################################################################
325 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
326 # if ivi ||"undefined"
327 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
332 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
335 make %{?jobs:-j%jobs}
340 #######################################################################
342 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
343 # if common ||"undefined"
344 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
349 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
352 make %{?jobs:-j%jobs}
357 ##############################
359 ##############################
363 pushd %{_builddir}/%{name}-%{version}/build/tizen
365 # if mobile || "undefined"
366 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
369 %if "%{?profile}" != "mobile"
370 pushd %{buildroot}%{_libdir}
371 cp libdali2-csharp-binder.so.*.*.* libdali2-csharp-binder.so.mobile # If we're only building this profile, then there's no need to copy the lib
373 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
378 # if tv ||"undefined"
379 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
382 %if "%{?profile}" != "tv"
383 pushd %{buildroot}%{_libdir}
384 cp libdali2-csharp-binder.so.*.*.* libdali2-csharp-binder.so.tv # If we're only building this profile, then there's no need to copy the lib
386 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
391 # if wearable || "undefined"
392 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
395 %if "%{?profile}" != "wearable"
396 pushd %{buildroot}%{_libdir}
397 cp libdali2-csharp-binder.so.*.*.* libdali2-csharp-binder.so.wearable # If we're only building this profile, then there's no need to copy the lib
399 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
404 # if ivi ||"undefined"
405 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
408 %if "%{?profile}" != "ivi"
409 pushd %{buildroot}%{_libdir}
410 cp libdali2-csharp-binder.so.*.*.* libdali2-csharp-binder.so.ivi # If we're only building this profile, then there's no need to copy the lib
412 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
417 # if common ||"undefined"
418 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
421 # No clean so we can gather symbol/size information for the common profile
425 ##############################
427 # 1 - Pre Install new package
428 # 2 - Install new package
429 # 3 - Post install new package
430 # 4 - Pre uninstall old package
431 # 5 - Remove files not overwritten by new package
432 # 6 - Post uninstall old package
433 ##############################
438 ##############################
439 # Post Install new package
440 ##############################
443 for i in mobile tv wearable ivi; do [[ -f libdali2-csharp-binder.so.$i ]] && ln -sf libdali2-csharp-binder.so.$i libdali2-csharp-binder.so.2.0.0; done
448 ##############################
449 # Pre Uninstall old package
450 ##############################
454 ##############################
455 # Post Uninstall old package
456 ##############################
461 ##############################
462 # Mobile Profile Commands
463 # No need to create a symbolic link on install required if only building this profile
464 # if mobile || "undefined"
465 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
467 %if "%{?profile}" != "mobile"
469 ln -sf libdali2-csharp-binder.so.mobile libdali2-csharp-binder.so.2.0.0
475 %postun profile_mobile
480 ##############################
481 # TV Profile Commands
482 # No need to create a symbolic link on install required if only building this profile
483 # if tv ||"undefined"
484 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
486 %if "%{?profile}" != "tv"
488 ln -sf libdali2-csharp-binder.so.tv libdali2-csharp-binder.so.2.0.0
499 ##############################
500 # Wearable Profile Commands
501 # No need to create a symbolic link on install required if only building this profile
502 # if wearable || "undefined"
503 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
504 %post profile_wearable
505 %if "%{?profile}" != "wearable"
507 ln -sf libdali2-csharp-binder.so.wearable libdali2-csharp-binder.so.2.0.0
513 %postun profile_wearable
518 ##############################
519 # IVI Profile Commands
520 # No need to create a symbolic link on install required if only building this profile
521 # if ivi ||"undefined"
522 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
524 %if "%{?profile}" != "ivi"
526 ln -sf libdali2-csharp-binder.so.ivi libdali2-csharp-binder.so.2.0.0
537 ##############################
538 # Common Profile Commands
539 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
544 %postun profile_common
549 ##############################
550 # Files in Binary Packages
551 ##############################
553 %manifest dali-csharp-binder.manifest
555 %defattr(-,root,root,-)
556 %{_libdir}/libdali2-csharp-binder.so
557 %{_libdir}/libdali2-csharp-binder.so.2
558 %{_libdir}/libdali2-csharp-binder.so.2.0.0
560 #################################################
563 %manifest dali-csharp-binder.manifest
564 %defattr(-,root,root,-)
565 %{_libdir}/libdali2-csharp-binder-scene3d.so*
567 #################################################
570 %manifest dali-csharp-binder.manifest
571 %defattr(-,root,root,-)
572 %{_libdir}/libdali2-csharp-binder-physics-2d.so*
574 #################################################
577 %manifest dali-csharp-binder.manifest
578 %defattr(-,root,root,-)
579 %{_libdir}/libdali2-csharp-binder-physics-3d.so*
581 #################################################
583 # If the profile is selected, the line below is repquired.
584 # if common ||"undefined"
585 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
586 %files profile_common
587 %manifest dali-csharp-binder.manifest
588 # default .so files are housed in the main pkg.
591 # If the profile is selected, the line below is repquired.
592 # if mobile || "undefined"
593 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
594 %files profile_mobile
595 %manifest dali-csharp-binder.manifest
596 %defattr(-,root,root,-)
597 %if "%{?profile}" != "mobile"
598 %{_libdir}/libdali2-csharp-binder.so.*mobile
602 # If the profile is selected, the line below is repquired.
603 # if tv ||"undefined"
604 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
606 %manifest dali-csharp-binder.manifest
607 %defattr(-,root,root,-)
608 %if "%{?profile}" != "tv"
609 %{_libdir}/libdali2-csharp-binder.so.*tv
613 # If the profile is selected, the line below is repquired.
614 # if wearable || "undefined"
615 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
616 %files profile_wearable
617 %manifest dali-csharp-binder.manifest
618 %defattr(-,root,root,-)
619 %if "%{?profile}" != "wearable"
620 %{_libdir}/libdali2-csharp-binder.so.*wearable
624 # If the profile is selected, the line below is repquired.
625 # if ivi ||"undefined"
626 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
628 %manifest dali-csharp-binder.manifest
629 %defattr(-,root,root,-)
630 %if "%{?profile}" != "ivi"
631 %{_libdir}/libdali2-csharp-binder.so.*ivi
636 %defattr(-,root,root,-)
637 %dir %{_includedir}/dali-csharp-binder/
638 %{_includedir}/dali-csharp-binder/*
639 %{_libdir}/pkgconfig/%{name}.pc
640 %{_libdir}/pkgconfig/%{name}-physics-2d.pc
641 %{_libdir}/pkgconfig/%{name}-physics-3d.pc