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 BuildRequires: pkgconfig(dali2-extension)
49 BuildRequires: pkgconfig(widget_viewer_dali)
50 BuildRequires: pkgconfig(watch_viewer_dali)
51 BuildRequires: pkgconfig(watch-holder-base)
53 %if 0%{?tizen_version_major} >= 5
54 BuildRequires: pkgconfig(ecore-wl2)
56 BuildRequires: pkgconfig(ecore-wayland)
60 Requires: %{name}-compat = %{version}-%{release}
61 Recommends: %{name}-profile_common = %{version}-%{release}
66 ###########################################
67 # Dali csharp binder for profiles
68 ###########################################
70 # If the profile is selected, the line below is repquired.
71 # if mobile || "undefined"
72 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
73 %package profile_mobile
74 Summary: The DALi Tizen csharp binder for mobile
75 Provides: %{name}-compat = %{version}-%{release}
76 Conflicts: %{name}-profile_tv
77 Conflicts: %{name}-profile_wearable
78 Conflicts: %{name}-profile_ivi
79 Conflicts: %{name}-profile_common
80 %description profile_mobile
81 The DALi Tizen csharp binder for mobile.
84 # If the profile is selected, the line below is repquired.
86 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
88 Summary: The DALi Tizen csharp binder for tv
89 Provides: %{name}-compat = %{version}-%{release}
90 Conflicts: %{name}-profile_mobile
91 Conflicts: %{name}-profile_wearable
92 Conflicts: %{name}-profile_ivi
93 Conflicts: %{name}-profile_common
94 %description profile_tv
95 The DALi Tizen csharp binder for tv.
98 # If the profile is selected, the line below is repquired.
99 # if wearable || "undefined"
100 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
101 %package profile_wearable
102 Summary: The DALi Tizen csharp binder for wearable
103 Provides: %{name}-compat = %{version}-%{release}
104 Conflicts: %{name}-profile_mobile
105 Conflicts: %{name}-profile_tv
106 Conflicts: %{name}-profile_ivi
107 Conflicts: %{name}-profile_common
108 %description profile_wearable
109 The DALi Tizen csharp binder for wearable.
112 # If the profile is selected, the line below is repquired.
113 # if ivi ||"undefined"
114 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
116 Summary: The DALi Tizen csharp binder for ivi
117 Provides: %{name}-compat = %{version}-%{release}
118 Conflicts: %{name}-profile_mobile
119 Conflicts: %{name}-profile_wearable
120 Conflicts: %{name}-profile_tv
121 Conflicts: %{name}-profile_common
122 %description profile_ivi
123 The DALi Tizen csharp binder for ivi.
126 # If the profile is selected, the line below is repquired.
127 # if common ||"undefined"
128 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
129 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
130 %package profile_common
131 %define tizen_2_2_compatibility 0
132 Summary: The DALi Tizen csharp binder for common
133 Provides: %{name}-compat = %{version}-%{release}
134 Conflicts: %{name}-profile_mobile
135 Conflicts: %{name}-profile_wearable
136 Conflicts: %{name}-profile_tv
137 Conflicts: %{name}-profile_ivi
138 %description profile_common
139 The DALi Tizen csharp binder for common.
143 ##############################
145 ##############################
147 Summary: build dali csharp binder
148 Group: Development/Building
149 Requires: %{name} = %{version}-%{release}
152 This package includes developer files common to all packages.
154 ##############################
156 ##############################
160 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
161 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
163 ##############################
165 ##############################
168 CXXFLAGS+=" -Wall -g -Os -fPIC"
169 LDFLAGS+=" -Wl,--rpath=%{_libdir} "
173 CXXFLAGS+=" -DWAYLAND"
174 configure_flags="--enable-wayland"
176 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
177 %if 0%{?tizen_version_major} >= 5
178 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
179 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
180 configure_flags+=" --enable-ecore-wayland2"
186 cd %{_builddir}/%{name}-%{version}/build/tizen
189 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
190 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
191 %if 0%{?tizen_platform_config_supported}
192 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
195 # added for key grab binding only for tizen
196 # Do not merge this on tizen branch!
198 # Set up the build via configure.
199 #######################################################################
200 # If the profile is selected, the line below is repquired.
201 # if mobile || "undefined"
202 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
203 %configure --prefix=$PREFIX --enable-profile=MOBILE \
204 --enable-tizen-major-version=%{tizen_version_major} \
205 %if 0%{?enable_debug}
208 $configure_flags --libdir=%{_libdir}
211 make %{?jobs:-j%jobs}
213 pushd %{_builddir}/%{name}-%{version}/build/tizen
214 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
217 pushd %{buildroot}%{_libdir}
218 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
219 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
225 #######################################################################
226 # If the profile is selected, the line below is repquired.
227 # if tv ||"undefined"
228 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
229 %configure --prefix=$PREFIX --enable-profile=TV \
230 --enable-tizen-major-version=%{tizen_version_major} \
231 %if 0%{?enable_debug}
234 $configure_flags --libdir=%{_libdir}
237 make %{?jobs:-j%jobs}
239 pushd %{_builddir}/%{name}-%{version}/build/tizen
240 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
243 pushd %{buildroot}%{_libdir}
244 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
245 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
251 #######################################################################
252 # If the profile is selected, the line below is repquired.
253 # if wearable || "undefined"
254 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
255 %configure --prefix=$PREFIX --enable-profile=WEARABLE \
256 --enable-tizen-major-version=%{tizen_version_major} \
257 %if 0%{?enable_debug}
260 $configure_flags --libdir=%{_libdir}
263 make %{?jobs:-j%jobs}
265 pushd %{_builddir}/%{name}-%{version}/build/tizen
266 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
269 pushd %{buildroot}%{_libdir}
270 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
271 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
277 #######################################################################
278 # If the profile is selected, the line below is repquired.
279 # if ivi ||"undefined"
280 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
281 %configure --prefix=$PREFIX --enable-profile=IVI \
282 --enable-tizen-major-version=%{tizen_version_major} \
283 %if 0%{?enable_debug}
286 $configure_flags --libdir=%{_libdir}
289 make %{?jobs:-j%jobs}
291 pushd %{_builddir}/%{name}-%{version}/build/tizen
292 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
295 pushd %{buildroot}%{_libdir}
296 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
297 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
303 #######################################################################
305 # If the profile is selected, the line below is repquired.
306 # if common ||"undefined"
307 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
308 %configure --prefix=$PREFIX --enable-profile=COMMON \
309 --enable-tizen-major-version=%{tizen_version_major} \
310 %if 0%{?enable_debug}
313 $configure_flags --libdir=%{_libdir}
316 make %{?jobs:-j%jobs}
318 pushd %{_builddir}/%{name}-%{version}/build/tizen
319 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
322 pushd %{buildroot}%{_libdir}
323 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
324 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
330 ##############################
332 ##############################
336 pushd %{_builddir}/%{name}-%{version}/build/tizen
337 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
340 # If the profile is selected, the line below is repquired.
341 # !unified && (wearable || tv || ivi || mobile)
342 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
343 rm -rf %{buildroot}%{_libdir}/libdali2-csharp-binder*.so*
346 # If the profile is selected, the line below is repquired.
347 # wearable || tv || ivi || mobile || unified
348 %if "%{?profile}" != "common"
349 for FILE in libdali2-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
350 mv dali2-csharp-binder*.pc %{buildroot}%{_libdir}/pkgconfig/
354 ################################################
356 ###############################################
357 pushd %{buildroot}%{_libdir}
359 # If the profile is selected, the line below is repquired.
360 # if common ||"undefined"
361 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
362 rm -rf libdali2-csharp-binder*.so
363 ln -s libdali2-csharp-binder.so.0.0.0 libdali2-csharp-binder.so
366 # If the profile is selected, the line below is repquired.
367 # if wearable || "undefined"
368 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
369 rm -rf libdali2-csharp-binder*.so.wearable
370 ln -s libdali2-csharp-binder.so.0.0.*.wearable libdali2-csharp-binder.so.wearable
373 # If the profile is selected, the line below is repquired.
374 # if tv ||"undefined"
375 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
376 rm -rf libdali2-csharp-binder*.so.tv
377 ln -s libdali2-csharp-binder.so.0.0.*.tv libdali2-csharp-binder.so.tv
380 # If the profile is selected, the line below is repquired.
381 # if ivi ||"undefined"
382 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
383 rm -rf libdali2-csharp-binder*.so.ivi
384 ln -s libdali2-csharp-binder.so.0.0.*.ivi libdali2-csharp-binder.so.ivi
387 # If the profile is selected, the line below is repquired.
388 # if mobile || "undefined"
389 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
390 rm -rf libdali2-csharp-binder*.so.mobile
391 ln -s libdali2-csharp-binder.so.0.0.*.mobile libdali2-csharp-binder.so.mobile
395 ##############################
397 # 1 - Pre Install new package
398 # 2 - Install new package
399 # 3 - Post install new package
400 # 4 - Pre uninstall old package
401 # 5 - Remove files not overwritten by new package
402 # 6 - Post uninstall old package
403 ##############################
408 ##############################
409 # Post Install new package
410 ##############################
415 ##############################
416 # Pre Uninstall old package
417 ##############################
421 ##############################
422 # Post Uninstall old package
423 ##############################
428 ##############################
430 # If the profile is selected, the line below is repquired.
431 # if mobile || "undefined"
432 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
435 for FILE in libdali2-csharp-binder.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
440 %postun profile_mobile
445 ##############################
447 # If the profile is selected, the line below is repquired.
448 # if tv ||"undefined"
449 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
452 for FILE in libdali2-csharp-binder.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
462 ##############################
464 # If the profile is selected, the line below is repquired.
465 # if wearable || "undefined"
466 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
467 %post profile_wearable
469 for FILE in libdali2-csharp-binder.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
474 %postun profile_wearable
479 ##############################
481 # If the profile is selected, the line below is repquired.
482 # if ivi ||"undefined"
483 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
486 for FILE in libdali2-csharp-binder.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
497 ##############################
498 # Files in Binary Packages
499 ##############################
501 %manifest dali-csharp-binder.manifest
502 %defattr(-,root,root,-)
505 # If the profile is selected, the line below is repquired.
506 # if common ||"undefined"
507 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
508 %defattr(-,root,root,-)
509 %{_libdir}/libdali2-csharp-binder.so*
510 %exclude %{_libdir}/libdali2-csharp-binder*.so*.mobile
511 %exclude %{_libdir}/libdali2-csharp-binder*.so*.wearable
512 %exclude %{_libdir}/libdali2-csharp-binder*.so*.tv
513 %exclude %{_libdir}/libdali2-csharp-binder*.so*.ivi
516 # If the profile is selected, the line below is repquired.
517 # if common ||"undefined"
518 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
519 %files profile_common
520 # default .so files are housed in the main pkg.
523 # If the profile is selected, the line below is repquired.
524 # if mobile || "undefined"
525 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
526 %files profile_mobile
527 %manifest dali-csharp-binder.manifest
528 %defattr(-,root,root,-)
529 %{_libdir}/libdali2-csharp-binder.so.*mobile
532 # If the profile is selected, the line below is repquired.
533 # if tv ||"undefined"
534 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
536 %manifest dali-csharp-binder.manifest
537 %defattr(-,root,root,-)
538 %{_libdir}/libdali2-csharp-binder.so.*tv
541 # If the profile is selected, the line below is repquired.
542 # if wearable || "undefined"
543 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
544 %files profile_wearable
545 %manifest dali-csharp-binder.manifest
546 %defattr(-,root,root,-)
547 %{_libdir}/libdali2-csharp-binder.so.*wearable
550 # If the profile is selected, the line below is repquired.
551 # if ivi ||"undefined"
552 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
554 %manifest dali-csharp-binder.manifest
555 %defattr(-,root,root,-)
556 %{_libdir}/libdali2-csharp-binder.so.*ivi
560 %defattr(-,root,root,-)
561 %dir %{_includedir}/dali-csharp-binder/
562 %{_includedir}/dali-csharp-binder/*
563 %{_libdir}/pkgconfig/%{name}.pc