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 %if "%{_vd_cfg_product_type}" != "AUDIO" && "%{_vd_cfg_product_type}" !="AV"
52 %define rive_animation_view 1
53 BuildRequires: pkgconfig(dali2-extension-rive-animation-view)
57 BuildRequires: pkgconfig(widget_viewer_dali)
58 BuildRequires: pkgconfig(watch_viewer_dali)
59 BuildRequires: pkgconfig(watch-holder-base)
61 %if 0%{?tizen_version_major} >= 5
62 BuildRequires: pkgconfig(ecore-wl2)
64 BuildRequires: pkgconfig(ecore-wayland)
68 Requires: %{name}-compat = %{version}-%{release}
69 Recommends: %{name}-profile_common = %{version}-%{release}
74 ###########################################
75 # Dali csharp binder for profiles
76 ###########################################
78 # If the profile is selected, the line below is repquired.
79 # if mobile || "undefined"
80 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
81 %package profile_mobile
82 Summary: The DALi Tizen csharp binder for mobile
83 Provides: %{name}-compat = %{version}-%{release}
84 Conflicts: %{name}-profile_tv
85 Conflicts: %{name}-profile_wearable
86 Conflicts: %{name}-profile_ivi
87 Conflicts: %{name}-profile_common
88 %description profile_mobile
89 The DALi Tizen csharp binder for mobile.
92 # If the profile is selected, the line below is repquired.
94 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
96 Summary: The DALi Tizen csharp binder for tv
97 Provides: %{name}-compat = %{version}-%{release}
98 Conflicts: %{name}-profile_mobile
99 Conflicts: %{name}-profile_wearable
100 Conflicts: %{name}-profile_ivi
101 Conflicts: %{name}-profile_common
102 %description profile_tv
103 The DALi Tizen csharp binder for tv.
106 # If the profile is selected, the line below is repquired.
107 # if wearable || "undefined"
108 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
109 %package profile_wearable
110 Summary: The DALi Tizen csharp binder for wearable
111 Provides: %{name}-compat = %{version}-%{release}
112 Conflicts: %{name}-profile_mobile
113 Conflicts: %{name}-profile_tv
114 Conflicts: %{name}-profile_ivi
115 Conflicts: %{name}-profile_common
116 %description profile_wearable
117 The DALi Tizen csharp binder for wearable.
120 # If the profile is selected, the line below is repquired.
121 # if ivi ||"undefined"
122 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
124 Summary: The DALi Tizen csharp binder for ivi
125 Provides: %{name}-compat = %{version}-%{release}
126 Conflicts: %{name}-profile_mobile
127 Conflicts: %{name}-profile_wearable
128 Conflicts: %{name}-profile_tv
129 Conflicts: %{name}-profile_common
130 %description profile_ivi
131 The DALi Tizen csharp binder for ivi.
134 # If the profile is selected, the line below is repquired.
135 # if common ||"undefined"
136 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
137 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
138 %package profile_common
139 %define tizen_2_2_compatibility 0
140 Summary: The DALi Tizen csharp binder for common
141 Provides: %{name}-compat = %{version}-%{release}
142 Conflicts: %{name}-profile_mobile
143 Conflicts: %{name}-profile_wearable
144 Conflicts: %{name}-profile_tv
145 Conflicts: %{name}-profile_ivi
146 %description profile_common
147 The DALi Tizen csharp binder for common.
151 ##############################
153 ##############################
155 Summary: build dali csharp binder
156 Group: Development/Building
157 Requires: %{name} = %{version}-%{release}
160 This package includes developer files common to all packages.
163 ##############################
165 ##############################
167 Summary: build dali csharp binder scene3d
168 Group: System/Libraries
169 Requires: %{name} = %{version}-%{release}
174 ##############################
176 ##############################
180 # %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
181 # %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
183 ##############################
185 ##############################
188 CXXFLAGS+=" -Wall -g -Os -fPIC"
189 LDFLAGS+=" -Wl,--rpath=%{_libdir} "
193 CXXFLAGS+=" -DWAYLAND"
194 cmake_flags=" -DENABLE_WAYLAND=ON"
196 # Use this conditional when Tizen version is 5.x or greater
197 %if 0%{?tizen_version_major} >= 5
198 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
200 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
201 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
202 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
203 cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
206 # Use this conditional when Tizen version is 7.x or greater
207 %if 0%{?tizen_version_major} >= 7
208 CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
213 %if 0%{?enable_debug}
214 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
217 %if 0%{?rive_animation_view}
218 cmake_flags+=" -DENABLE_RIVE_ANIMATION=ON"
223 cd %{_builddir}/%{name}-%{version}/build/tizen
225 # DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
226 # DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
227 %if 0%{?tizen_platform_config_supported}
228 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
231 cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
232 cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
233 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
234 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
235 cmake_flags+=" -DENABLE_SCENE3D=ON"
237 # Set up the build via Cmake
238 #######################################################################
239 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
240 # if mobile || "undefined"
241 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
246 cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
249 make %{?jobs:-j%jobs}
254 #######################################################################
255 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
256 # if tv ||"undefined"
257 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
262 cmake -DENABLE_PROFILE=TV $cmake_flags ..
265 make %{?jobs:-j%jobs}
270 #######################################################################
271 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
272 # if wearable || "undefined"
273 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
278 cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
281 make %{?jobs:-j%jobs}
286 #######################################################################
287 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
288 # if ivi ||"undefined"
289 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
294 cmake -DENABLE_PROFILE=IVI $cmake_flags ..
297 make %{?jobs:-j%jobs}
302 #######################################################################
304 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
305 # if common ||"undefined"
306 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
311 cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
314 make %{?jobs:-j%jobs}
319 ##############################
321 ##############################
325 pushd %{_builddir}/%{name}-%{version}/build/tizen
327 # if mobile || "undefined"
328 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
331 %if "%{?profile}" != "mobile"
332 pushd %{buildroot}%{_libdir}
333 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
335 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
340 # if tv ||"undefined"
341 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
344 %if "%{?profile}" != "tv"
345 pushd %{buildroot}%{_libdir}
346 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
348 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
353 # if wearable || "undefined"
354 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
357 %if "%{?profile}" != "wearable"
358 pushd %{buildroot}%{_libdir}
359 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
361 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
366 # if ivi ||"undefined"
367 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
370 %if "%{?profile}" != "ivi"
371 pushd %{buildroot}%{_libdir}
372 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
374 make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
379 # if common ||"undefined"
380 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
383 # No clean so we can gather symbol/size information for the common profile
387 ##############################
389 # 1 - Pre Install new package
390 # 2 - Install new package
391 # 3 - Post install new package
392 # 4 - Pre uninstall old package
393 # 5 - Remove files not overwritten by new package
394 # 6 - Post uninstall old package
395 ##############################
400 ##############################
401 # Post Install new package
402 ##############################
405 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
410 ##############################
411 # Pre Uninstall old package
412 ##############################
416 ##############################
417 # Post Uninstall old package
418 ##############################
423 ##############################
424 # Mobile Profile Commands
425 # No need to create a symbolic link on install required if only building this profile
426 # if mobile || "undefined"
427 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
429 %if "%{?profile}" != "mobile"
431 ln -sf libdali2-csharp-binder.so.mobile libdali2-csharp-binder.so.2.0.0
437 %postun profile_mobile
442 ##############################
443 # TV Profile Commands
444 # No need to create a symbolic link on install required if only building this profile
445 # if tv ||"undefined"
446 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
448 %if "%{?profile}" != "tv"
450 ln -sf libdali2-csharp-binder.so.tv libdali2-csharp-binder.so.2.0.0
461 ##############################
462 # Wearable Profile Commands
463 # No need to create a symbolic link on install required if only building this profile
464 # if wearable || "undefined"
465 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
466 %post profile_wearable
467 %if "%{?profile}" != "wearable"
469 ln -sf libdali2-csharp-binder.so.wearable libdali2-csharp-binder.so.2.0.0
475 %postun profile_wearable
480 ##############################
481 # IVI Profile Commands
482 # No need to create a symbolic link on install required if only building this profile
483 # if ivi ||"undefined"
484 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
486 %if "%{?profile}" != "ivi"
488 ln -sf libdali2-csharp-binder.so.ivi libdali2-csharp-binder.so.2.0.0
499 ##############################
500 # Common Profile Commands
501 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
506 %postun profile_common
511 ##############################
512 # Files in Binary Packages
513 ##############################
515 %manifest dali-csharp-binder.manifest
517 %defattr(-,root,root,-)
518 %{_libdir}/libdali2-csharp-binder.so
519 %{_libdir}/libdali2-csharp-binder.so.2
520 %{_libdir}/libdali2-csharp-binder.so.2.0.0
522 #################################################
525 %manifest dali-csharp-binder.manifest
526 %defattr(-,root,root,-)
527 %{_libdir}/libdali2-csharp-binder-scene3d.so*
529 #################################################
531 # If the profile is selected, the line below is repquired.
532 # if common ||"undefined"
533 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
534 %files profile_common
535 %manifest dali-csharp-binder.manifest
536 # default .so files are housed in the main pkg.
539 # If the profile is selected, the line below is repquired.
540 # if mobile || "undefined"
541 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
542 %files profile_mobile
543 %manifest dali-csharp-binder.manifest
544 %defattr(-,root,root,-)
545 %if "%{?profile}" != "mobile"
546 %{_libdir}/libdali2-csharp-binder.so.*mobile
550 # If the profile is selected, the line below is repquired.
551 # if tv ||"undefined"
552 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
554 %manifest dali-csharp-binder.manifest
555 %defattr(-,root,root,-)
556 %if "%{?profile}" != "tv"
557 %{_libdir}/libdali2-csharp-binder.so.*tv
561 # If the profile is selected, the line below is repquired.
562 # if wearable || "undefined"
563 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
564 %files profile_wearable
565 %manifest dali-csharp-binder.manifest
566 %defattr(-,root,root,-)
567 %if "%{?profile}" != "wearable"
568 %{_libdir}/libdali2-csharp-binder.so.*wearable
572 # If the profile is selected, the line below is repquired.
573 # if ivi ||"undefined"
574 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
576 %manifest dali-csharp-binder.manifest
577 %defattr(-,root,root,-)
578 %if "%{?profile}" != "ivi"
579 %{_libdir}/libdali2-csharp-binder.so.*ivi
584 %defattr(-,root,root,-)
585 %dir %{_includedir}/dali-csharp-binder/
586 %{_includedir}/dali-csharp-binder/*
587 %{_libdir}/pkgconfig/%{name}.pc