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
45 BuildRequires: pkgconfig(dali2-core)
46 BuildRequires: pkgconfig(dali2-adaptor)
47 BuildRequires: pkgconfig(dali2-toolkit)
48 %if "%{_vd_cfg_product_type}" != "AUDIO" && "%{_vd_cfg_product_type}" !="AV"
49 %define rive_animation_view 1
50 BuildRequires: pkgconfig(dali2-extension-rive-animation-view)
54 BuildRequires: pkgconfig(widget_viewer_dali)
55 BuildRequires: pkgconfig(watch_viewer_dali)
56 BuildRequires: pkgconfig(watch-holder-base)
58 %if 0%{?tizen_version_major} >= 5
59 BuildRequires: pkgconfig(ecore-wl2)
61 BuildRequires: pkgconfig(ecore-wayland)
65 Requires: %{name}-compat = %{version}-%{release}
66 Recommends: %{name}-profile_common = %{version}-%{release}
71 ###########################################
72 # Dali csharp binder for profiles
73 ###########################################
75 # If the profile is selected, the line below is repquired.
76 # if mobile || "undefined"
77 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
78 %package profile_mobile
79 Summary: The DALi Tizen csharp binder for mobile
80 Provides: %{name}-compat = %{version}-%{release}
81 Conflicts: %{name}-profile_tv
82 Conflicts: %{name}-profile_wearable
83 Conflicts: %{name}-profile_ivi
84 Conflicts: %{name}-profile_common
85 %description profile_mobile
86 The DALi Tizen csharp binder for mobile.
89 # If the profile is selected, the line below is repquired.
91 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
93 Summary: The DALi Tizen csharp binder for tv
94 Provides: %{name}-compat = %{version}-%{release}
95 Conflicts: %{name}-profile_mobile
96 Conflicts: %{name}-profile_wearable
97 Conflicts: %{name}-profile_ivi
98 Conflicts: %{name}-profile_common
99 %description profile_tv
100 The DALi Tizen csharp binder for tv.
103 # If the profile is selected, the line below is repquired.
104 # if wearable || "undefined"
105 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
106 %package profile_wearable
107 Summary: The DALi Tizen csharp binder for wearable
108 Provides: %{name}-compat = %{version}-%{release}
109 Conflicts: %{name}-profile_mobile
110 Conflicts: %{name}-profile_tv
111 Conflicts: %{name}-profile_ivi
112 Conflicts: %{name}-profile_common
113 %description profile_wearable
114 The DALi Tizen csharp binder for wearable.
117 # If the profile is selected, the line below is repquired.
118 # if ivi ||"undefined"
119 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
121 Summary: The DALi Tizen csharp binder for ivi
122 Provides: %{name}-compat = %{version}-%{release}
123 Conflicts: %{name}-profile_mobile
124 Conflicts: %{name}-profile_wearable
125 Conflicts: %{name}-profile_tv
126 Conflicts: %{name}-profile_common
127 %description profile_ivi
128 The DALi Tizen csharp binder for ivi.
131 # If the profile is selected, the line below is repquired.
132 # if common ||"undefined"
133 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
134 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
135 %package profile_common
136 %define tizen_2_2_compatibility 0
137 Summary: The DALi Tizen csharp binder for common
138 Provides: %{name}-compat = %{version}-%{release}
139 Conflicts: %{name}-profile_mobile
140 Conflicts: %{name}-profile_wearable
141 Conflicts: %{name}-profile_tv
142 Conflicts: %{name}-profile_ivi
143 %description profile_common
144 The DALi Tizen csharp binder for common.
148 ##############################
150 ##############################
152 Summary: build dali csharp binder
153 Group: Development/Building
154 Requires: %{name} = %{version}-%{release}
157 This package includes developer files common to all packages.
159 ##############################
161 ##############################
165 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
166 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
168 ##############################
170 ##############################
173 CXXFLAGS+=" -Wall -g -Os -fPIC"
174 LDFLAGS+=" -Wl,--rpath=%{_libdir} "
178 CXXFLAGS+=" -DWAYLAND"
179 configure_flags="--enable-wayland"
181 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
182 %if 0%{?tizen_version_major} >= 5
183 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
184 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
185 configure_flags+=" --enable-ecore-wayland2"
191 cd %{_builddir}/%{name}-%{version}/build/tizen
194 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
195 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
196 %if 0%{?tizen_platform_config_supported}
197 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
200 # added for key grab binding only for tizen
201 # Do not merge this on tizen branch!
203 # Set up the build via configure.
204 #######################################################################
205 # If the profile is selected, the line below is repquired.
206 # if mobile || "undefined"
207 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
208 %configure --prefix=$PREFIX --enable-profile=MOBILE \
209 --enable-tizen-major-version=%{tizen_version_major} \
210 %if 0%{?enable_debug}
213 %if 0%{?rive_animation_view}
214 --enable-rive-animation-view \
216 $configure_flags --libdir=%{_libdir}
219 make %{?jobs:-j%jobs}
221 pushd %{_builddir}/%{name}-%{version}/build/tizen
222 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
225 pushd %{buildroot}%{_libdir}
226 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
227 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
230 %if "%{?profile}" != "mobile"
236 #######################################################################
237 # If the profile is selected, the line below is repquired.
238 # if tv ||"undefined"
239 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
240 %configure --prefix=$PREFIX --enable-profile=TV \
241 --enable-tizen-major-version=%{tizen_version_major} \
242 %if 0%{?enable_debug}
245 %if 0%{?rive_animation_view}
246 --enable-rive-animation-view \
248 $configure_flags --libdir=%{_libdir}
251 make %{?jobs:-j%jobs}
253 pushd %{_builddir}/%{name}-%{version}/build/tizen
254 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
257 pushd %{buildroot}%{_libdir}
258 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
259 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
262 %if "%{?profile}" != "tv"
268 #######################################################################
269 # If the profile is selected, the line below is repquired.
270 # if wearable || "undefined"
271 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
272 %configure --prefix=$PREFIX --enable-profile=WEARABLE \
273 --enable-tizen-major-version=%{tizen_version_major} \
274 %if 0%{?enable_debug}
277 %if 0%{?rive_animation_view}
278 --enable-rive-animation-view \
280 $configure_flags --libdir=%{_libdir}
283 make %{?jobs:-j%jobs}
285 pushd %{_builddir}/%{name}-%{version}/build/tizen
286 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
289 pushd %{buildroot}%{_libdir}
290 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
291 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
294 %if "%{?profile}" != "wearable"
300 #######################################################################
301 # If the profile is selected, the line below is repquired.
302 # if ivi ||"undefined"
303 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
304 %configure --prefix=$PREFIX --enable-profile=IVI \
305 --enable-tizen-major-version=%{tizen_version_major} \
306 %if 0%{?enable_debug}
309 %if 0%{?rive_animation_view}
310 --enable-rive-animation-view \
312 $configure_flags --libdir=%{_libdir}
315 make %{?jobs:-j%jobs}
317 pushd %{_builddir}/%{name}-%{version}/build/tizen
318 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
321 pushd %{buildroot}%{_libdir}
322 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
323 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
326 %if "%{?profile}" != "ivi"
332 #######################################################################
334 # If the profile is selected, the line below is repquired.
335 # if common ||"undefined"
336 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
337 %configure --prefix=$PREFIX --enable-profile=COMMON \
338 --enable-tizen-major-version=%{tizen_version_major} \
339 %if 0%{?enable_debug}
342 %if 0%{?rive_animation_view}
343 --enable-rive-animation-view \
345 $configure_flags --libdir=%{_libdir}
348 make %{?jobs:-j%jobs}
350 pushd %{_builddir}/%{name}-%{version}/build/tizen
351 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
354 pushd %{buildroot}%{_libdir}
355 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
356 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
359 %if "%{?profile}" != "common"
365 ##############################
367 ##############################
371 pushd %{_builddir}/%{name}-%{version}/build/tizen
372 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
375 # If the profile is selected, the line below is repquired.
376 # !unified && (wearable || tv || ivi || mobile)
377 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
378 rm -rf %{buildroot}%{_libdir}/libdali2-csharp-binder*.so*
381 # If the profile is selected, the line below is repquired.
382 # wearable || tv || ivi || mobile || unified
383 %if "%{?profile}" != "common"
384 for FILE in libdali2-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
385 mv dali2-csharp-binder*.pc %{buildroot}%{_libdir}/pkgconfig/
389 ################################################
391 ###############################################
392 pushd %{buildroot}%{_libdir}
394 # If the profile is selected, the line below is repquired.
395 # if common ||"undefined"
396 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
397 rm -rf libdali2-csharp-binder*.so
398 ln -s libdali2-csharp-binder.so.0.0.0 libdali2-csharp-binder.so
401 # If the profile is selected, the line below is repquired.
402 # if wearable || "undefined"
403 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
404 rm -rf libdali2-csharp-binder*.so.wearable
405 ln -s libdali2-csharp-binder.so.0.0.*.wearable libdali2-csharp-binder.so.wearable
408 # If the profile is selected, the line below is repquired.
409 # if tv ||"undefined"
410 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
411 rm -rf libdali2-csharp-binder*.so.tv
412 ln -s libdali2-csharp-binder.so.0.0.*.tv libdali2-csharp-binder.so.tv
415 # If the profile is selected, the line below is repquired.
416 # if ivi ||"undefined"
417 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
418 rm -rf libdali2-csharp-binder*.so.ivi
419 ln -s libdali2-csharp-binder.so.0.0.*.ivi libdali2-csharp-binder.so.ivi
422 # If the profile is selected, the line below is repquired.
423 # if mobile || "undefined"
424 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
425 rm -rf libdali2-csharp-binder*.so.mobile
426 ln -s libdali2-csharp-binder.so.0.0.*.mobile libdali2-csharp-binder.so.mobile
430 ##############################
432 # 1 - Pre Install new package
433 # 2 - Install new package
434 # 3 - Post install new package
435 # 4 - Pre uninstall old package
436 # 5 - Remove files not overwritten by new package
437 # 6 - Post uninstall old package
438 ##############################
443 ##############################
444 # Post Install new package
445 ##############################
450 ##############################
451 # Pre Uninstall old package
452 ##############################
456 ##############################
457 # Post Uninstall old package
458 ##############################
463 ##############################
465 # If the profile is selected, the line below is repquired.
466 # if mobile || "undefined"
467 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
470 for FILE in libdali2-csharp-binder.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
475 %postun profile_mobile
480 ##############################
482 # If the profile is selected, the line below is repquired.
483 # if tv ||"undefined"
484 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
487 for FILE in libdali2-csharp-binder.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
497 ##############################
499 # If the profile is selected, the line below is repquired.
500 # if wearable || "undefined"
501 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
502 %post profile_wearable
504 for FILE in libdali2-csharp-binder.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
509 %postun profile_wearable
514 ##############################
516 # If the profile is selected, the line below is repquired.
517 # if ivi ||"undefined"
518 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
521 for FILE in libdali2-csharp-binder.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
532 ##############################
533 # Files in Binary Packages
534 ##############################
536 %manifest dali-csharp-binder.manifest
537 %defattr(-,root,root,-)
540 # If the profile is selected, the line below is repquired.
541 # if common ||"undefined"
542 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
543 %defattr(-,root,root,-)
544 %{_libdir}/libdali2-csharp-binder.so*
545 %exclude %{_libdir}/libdali2-csharp-binder*.so*.mobile
546 %exclude %{_libdir}/libdali2-csharp-binder*.so*.wearable
547 %exclude %{_libdir}/libdali2-csharp-binder*.so*.tv
548 %exclude %{_libdir}/libdali2-csharp-binder*.so*.ivi
551 # If the profile is selected, the line below is repquired.
552 # if common ||"undefined"
553 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
554 %files profile_common
555 # default .so files are housed in the main pkg.
558 # If the profile is selected, the line below is repquired.
559 # if mobile || "undefined"
560 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
561 %files profile_mobile
562 %manifest dali-csharp-binder.manifest
563 %defattr(-,root,root,-)
564 %{_libdir}/libdali2-csharp-binder.so.*mobile
567 # If the profile is selected, the line below is repquired.
568 # if tv ||"undefined"
569 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
571 %manifest dali-csharp-binder.manifest
572 %defattr(-,root,root,-)
573 %{_libdir}/libdali2-csharp-binder.so.*tv
576 # If the profile is selected, the line below is repquired.
577 # if wearable || "undefined"
578 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
579 %files profile_wearable
580 %manifest dali-csharp-binder.manifest
581 %defattr(-,root,root,-)
582 %{_libdir}/libdali2-csharp-binder.so.*wearable
585 # If the profile is selected, the line below is repquired.
586 # if ivi ||"undefined"
587 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
589 %manifest dali-csharp-binder.manifest
590 %defattr(-,root,root,-)
591 %{_libdir}/libdali2-csharp-binder.so.*ivi
595 %defattr(-,root,root,-)
596 %dir %{_includedir}/dali-csharp-binder/
597 %{_includedir}/dali-csharp-binder/*
598 %{_libdir}/pkgconfig/%{name}.pc