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 Requires: %{name}-compat = %{version}-%{release}
71 Recommends: %{name}-profile_common = %{version}-%{release}
76 ###########################################
77 # Dali csharp binder for profiles
78 ###########################################
80 # If the profile is selected, the line below is repquired.
81 # if mobile || "undefined"
82 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
83 %package profile_mobile
84 Summary: The DALi Tizen csharp binder for mobile
85 Provides: %{name}-compat = %{version}-%{release}
86 Conflicts: %{name}-profile_tv
87 Conflicts: %{name}-profile_wearable
88 Conflicts: %{name}-profile_ivi
89 Conflicts: %{name}-profile_common
90 %description profile_mobile
91 The DALi Tizen csharp binder for mobile.
94 # If the profile is selected, the line below is repquired.
96 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
98 Summary: The DALi Tizen csharp binder for tv
99 Provides: %{name}-compat = %{version}-%{release}
100 Conflicts: %{name}-profile_mobile
101 Conflicts: %{name}-profile_wearable
102 Conflicts: %{name}-profile_ivi
103 Conflicts: %{name}-profile_common
104 %description profile_tv
105 The DALi Tizen csharp binder for tv.
108 # If the profile is selected, the line below is repquired.
109 # if wearable || "undefined"
110 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
111 %package profile_wearable
112 Summary: The DALi Tizen csharp binder for wearable
113 Provides: %{name}-compat = %{version}-%{release}
114 Conflicts: %{name}-profile_mobile
115 Conflicts: %{name}-profile_tv
116 Conflicts: %{name}-profile_ivi
117 Conflicts: %{name}-profile_common
118 %description profile_wearable
119 The DALi Tizen csharp binder for wearable.
122 # If the profile is selected, the line below is repquired.
123 # if ivi ||"undefined"
124 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
126 Summary: The DALi Tizen csharp binder for ivi
127 Provides: %{name}-compat = %{version}-%{release}
128 Conflicts: %{name}-profile_mobile
129 Conflicts: %{name}-profile_wearable
130 Conflicts: %{name}-profile_tv
131 Conflicts: %{name}-profile_common
132 %description profile_ivi
133 The DALi Tizen csharp binder for ivi.
136 # If the profile is selected, the line below is repquired.
137 # if common ||"undefined"
138 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
139 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
140 %package profile_common
141 %define tizen_2_2_compatibility 0
142 Summary: The DALi Tizen csharp binder for common
143 Provides: %{name}-compat = %{version}-%{release}
144 Conflicts: %{name}-profile_mobile
145 Conflicts: %{name}-profile_wearable
146 Conflicts: %{name}-profile_tv
147 Conflicts: %{name}-profile_ivi
148 %description profile_common
149 The DALi Tizen csharp binder for common.
153 ##############################
155 ##############################
157 Summary: build dali csharp binder
158 Group: Development/Building
159 Requires: %{name} = %{version}-%{release}
162 This package includes developer files common to all packages.
165 ##############################
167 ##############################
169 Summary: build dali csharp binder scene3d
170 Group: System/Libraries
171 Requires: %{name} = %{version}-%{release}
175 ##############################
177 ##############################
179 Summary: build dali csharp binder physics2d
180 Group: System/Libraries
181 Requires: %{name} = %{version}-%{release}
182 %description physics2d
185 ##############################
187 ##############################
189 Summary: build dali csharp binder physics3d
190 Group: System/Libraries
191 Requires: %{name} = %{version}-%{release}
192 %description physics3d
196 ##############################
198 ##############################
202 # %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
203 # %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
205 ##############################
207 ##############################
210 CXXFLAGS+=" -Wall -g -Os -fPIC"
211 LDFLAGS+=" -Wl,--rpath=%{_libdir} "
215 CXXFLAGS+=" -DWAYLAND"
216 cmake_flags=" -DENABLE_WAYLAND=ON"
218 # Use this conditional when Tizen version is 5.x or greater
219 %if 0%{?tizen_version_major} >= 5
220 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
222 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
223 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
224 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
225 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
228 # Use this conditional when Tizen version is 7.x or greater
229 %if 0%{?tizen_version_major} >= 7
230 CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
235 %if 0%{?enable_debug}
236 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
239 %if 0%{?rive_animation_view}
240 cmake_flags+=" -DENABLE_RIVE_ANIMATION=ON"
245 cd %{_builddir}/%{name}-%{version}/build/tizen
247 # DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
248 # DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
249 %if 0%{?tizen_platform_config_supported}
250 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
253 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
254 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
255 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
256 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
257 cmake_flags+=" -DENABLE_SCENE3D=ON"
258 cmake_flags+=" -DENABLE_PHYSICS_2D=ON"
259 cmake_flags+=" -DENABLE_PHYSICS_3D=ON"
262 # Set up the build via Cmake
263 #######################################################################
264 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
265 # if mobile || "undefined"
266 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
271 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
274 make %{?jobs:-j%jobs}
279 #######################################################################
280 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
281 # if tv ||"undefined"
282 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
287 cmake -DENABLE_PROFILE=TV $cmake_flags ..
290 make %{?jobs:-j%jobs}
295 #######################################################################
296 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
297 # if wearable || "undefined"
298 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
303 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
306 make %{?jobs:-j%jobs}
311 #######################################################################
312 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
313 # if ivi ||"undefined"
314 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
319 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
322 make %{?jobs:-j%jobs}
327 #######################################################################
329 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
330 # if common ||"undefined"
331 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
336 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
339 make %{?jobs:-j%jobs}
344 ##############################
346 ##############################
350 pushd %{_builddir}/%{name}-%{version}/build/tizen
352 # if mobile || "undefined"
353 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
356 %if "%{?profile}" != "mobile"
357 pushd %{buildroot}%{_libdir}
358 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
360 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
365 # if tv ||"undefined"
366 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
369 %if "%{?profile}" != "tv"
370 pushd %{buildroot}%{_libdir}
371 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
373 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
378 # if wearable || "undefined"
379 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
382 %if "%{?profile}" != "wearable"
383 pushd %{buildroot}%{_libdir}
384 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
386 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
391 # if ivi ||"undefined"
392 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
395 %if "%{?profile}" != "ivi"
396 pushd %{buildroot}%{_libdir}
397 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
399 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
404 # if common ||"undefined"
405 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
408 # No clean so we can gather symbol/size information for the common profile
412 ##############################
414 # 1 - Pre Install new package
415 # 2 - Install new package
416 # 3 - Post install new package
417 # 4 - Pre uninstall old package
418 # 5 - Remove files not overwritten by new package
419 # 6 - Post uninstall old package
420 ##############################
425 ##############################
426 # Post Install new package
427 ##############################
430 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
435 ##############################
436 # Pre Uninstall old package
437 ##############################
441 ##############################
442 # Post Uninstall old package
443 ##############################
448 ##############################
449 # Mobile Profile Commands
450 # No need to create a symbolic link on install required if only building this profile
451 # if mobile || "undefined"
452 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
454 %if "%{?profile}" != "mobile"
456 ln -sf libdali2-csharp-binder.so.mobile libdali2-csharp-binder.so.2.0.0
462 %postun profile_mobile
467 ##############################
468 # TV Profile Commands
469 # No need to create a symbolic link on install required if only building this profile
470 # if tv ||"undefined"
471 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
473 %if "%{?profile}" != "tv"
475 ln -sf libdali2-csharp-binder.so.tv libdali2-csharp-binder.so.2.0.0
486 ##############################
487 # Wearable Profile Commands
488 # No need to create a symbolic link on install required if only building this profile
489 # if wearable || "undefined"
490 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
491 %post profile_wearable
492 %if "%{?profile}" != "wearable"
494 ln -sf libdali2-csharp-binder.so.wearable libdali2-csharp-binder.so.2.0.0
500 %postun profile_wearable
505 ##############################
506 # IVI Profile Commands
507 # No need to create a symbolic link on install required if only building this profile
508 # if ivi ||"undefined"
509 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
511 %if "%{?profile}" != "ivi"
513 ln -sf libdali2-csharp-binder.so.ivi libdali2-csharp-binder.so.2.0.0
524 ##############################
525 # Common Profile Commands
526 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
531 %postun profile_common
536 ##############################
537 # Files in Binary Packages
538 ##############################
540 %manifest dali-csharp-binder.manifest
542 %defattr(-,root,root,-)
543 %{_libdir}/libdali2-csharp-binder.so
544 %{_libdir}/libdali2-csharp-binder.so.2
545 %{_libdir}/libdali2-csharp-binder.so.2.0.0
547 #################################################
550 %manifest dali-csharp-binder.manifest
551 %defattr(-,root,root,-)
552 %{_libdir}/libdali2-csharp-binder-scene3d.so*
554 #################################################
557 %manifest dali-csharp-binder.manifest
558 %defattr(-,root,root,-)
559 %{_libdir}/libdali2-csharp-binder-physics-2d.so*
561 #################################################
564 %manifest dali-csharp-binder.manifest
565 %defattr(-,root,root,-)
566 %{_libdir}/libdali2-csharp-binder-physics-3d.so*
568 #################################################
570 # If the profile is selected, the line below is repquired.
571 # if common ||"undefined"
572 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
573 %files profile_common
574 %manifest dali-csharp-binder.manifest
575 # default .so files are housed in the main pkg.
578 # If the profile is selected, the line below is repquired.
579 # if mobile || "undefined"
580 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
581 %files profile_mobile
582 %manifest dali-csharp-binder.manifest
583 %defattr(-,root,root,-)
584 %if "%{?profile}" != "mobile"
585 %{_libdir}/libdali2-csharp-binder.so.*mobile
589 # If the profile is selected, the line below is repquired.
590 # if tv ||"undefined"
591 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
593 %manifest dali-csharp-binder.manifest
594 %defattr(-,root,root,-)
595 %if "%{?profile}" != "tv"
596 %{_libdir}/libdali2-csharp-binder.so.*tv
600 # If the profile is selected, the line below is repquired.
601 # if wearable || "undefined"
602 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
603 %files profile_wearable
604 %manifest dali-csharp-binder.manifest
605 %defattr(-,root,root,-)
606 %if "%{?profile}" != "wearable"
607 %{_libdir}/libdali2-csharp-binder.so.*wearable
611 # If the profile is selected, the line below is repquired.
612 # if ivi ||"undefined"
613 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
615 %manifest dali-csharp-binder.manifest
616 %defattr(-,root,root,-)
617 %if "%{?profile}" != "ivi"
618 %{_libdir}/libdali2-csharp-binder.so.*ivi
623 %defattr(-,root,root,-)
624 %dir %{_includedir}/dali-csharp-binder/
625 %{_includedir}/dali-csharp-binder/*
626 %{_libdir}/pkgconfig/%{name}.pc
627 %{_libdir}/pkgconfig/%{name}-physics-2d.pc
628 %{_libdir}/pkgconfig/%{name}-physics-3d.pc