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: dali-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(dali-core)
46 BuildRequires: pkgconfig(dali-adaptor)
47 BuildRequires: pkgconfig(dali-toolkit)
48 BuildRequires: pkgconfig(widget_viewer_dali)
51 %if 0%{?tizen_version_major} >= 5
52 BuildRequires: pkgconfig(ecore-wl2)
54 BuildRequires: pkgconfig(ecore-wayland)
58 Requires: %{name}-compat = %{version}-%{release}
59 Recommends: %{name}-profile_common = %{version}-%{release}
64 ###########################################
65 # Dali csharp binder for profiles
66 ###########################################
68 # If the profile is selected, the line below is repquired.
69 # if mobile || "undefined"
70 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
71 %package profile_mobile
72 Summary: The DALi Tizen csharp binder for mobile
73 Provides: %{name}-compat = %{version}-%{release}
74 Conflicts: %{name}-profile_tv
75 Conflicts: %{name}-profile_wearable
76 Conflicts: %{name}-profile_ivi
77 Conflicts: %{name}-profile_common
78 %description profile_mobile
79 The DALi Tizen csharp binder for mobile.
82 # If the profile is selected, the line below is repquired.
84 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
86 Summary: The DALi Tizen csharp binder for tv
87 Provides: %{name}-compat = %{version}-%{release}
88 Conflicts: %{name}-profile_mobile
89 Conflicts: %{name}-profile_wearable
90 Conflicts: %{name}-profile_ivi
91 Conflicts: %{name}-profile_common
92 %description profile_tv
93 The DALi Tizen csharp binder for tv.
96 # If the profile is selected, the line below is repquired.
97 # if wearable || "undefined"
98 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
99 %package profile_wearable
100 Summary: The DALi Tizen csharp binder for wearable
101 Provides: %{name}-compat = %{version}-%{release}
102 Conflicts: %{name}-profile_mobile
103 Conflicts: %{name}-profile_tv
104 Conflicts: %{name}-profile_ivi
105 Conflicts: %{name}-profile_common
106 %description profile_wearable
107 The DALi Tizen csharp binder for wearable.
110 # If the profile is selected, the line below is repquired.
111 # if ivi ||"undefined"
112 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
114 Summary: The DALi Tizen csharp binder for ivi
115 Provides: %{name}-compat = %{version}-%{release}
116 Conflicts: %{name}-profile_mobile
117 Conflicts: %{name}-profile_wearable
118 Conflicts: %{name}-profile_tv
119 Conflicts: %{name}-profile_common
120 %description profile_ivi
121 The DALi Tizen csharp binder for ivi.
124 # If the profile is selected, the line below is repquired.
125 # if common ||"undefined"
126 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
127 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
128 %package profile_common
129 %define tizen_2_2_compatibility 0
130 Summary: The DALi Tizen csharp binder for common
131 Provides: %{name}-compat = %{version}-%{release}
132 Conflicts: %{name}-profile_mobile
133 Conflicts: %{name}-profile_wearable
134 Conflicts: %{name}-profile_tv
135 Conflicts: %{name}-profile_ivi
136 %description profile_common
137 The DALi Tizen csharp binder for common.
141 ##############################
143 ##############################
145 Summary: build dali csharp binder
146 Group: Development/Building
147 Requires: %{name} = %{version}-%{release}
150 This package includes developer files common to all packages.
152 ##############################
154 ##############################
158 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
159 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
161 ##############################
163 ##############################
166 CXXFLAGS+=" -Wall -g -Os -fPIC"
167 LDFLAGS+=" -Wl,--rpath=%{_libdir} "
171 CXXFLAGS+=" -DWAYLAND"
172 configure_flags="--enable-wayland"
174 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
175 %if 0%{?tizen_version_major} >= 5
176 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
177 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
178 configure_flags+=" --enable-ecore-wayland2"
184 cd %{_builddir}/%{name}-%{version}/build/tizen
187 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
188 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
189 %if 0%{?tizen_platform_config_supported}
190 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
193 # added for key grab binding only for tizen
194 # Do not merge this on tizen branch!
196 # Set up the build via configure.
197 #######################################################################
198 # If the profile is selected, the line below is repquired.
199 # if mobile || "undefined"
200 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
201 %configure --prefix=$PREFIX --enable-profile=MOBILE \
202 --enable-tizen-major-version=%{tizen_version_major} \
203 %if 0%{?enable_debug}
206 $configure_flags --libdir=%{_libdir}
209 make %{?jobs:-j%jobs}
211 pushd %{_builddir}/%{name}-%{version}/build/tizen
212 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
215 pushd %{buildroot}%{_libdir}
216 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
217 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
223 #######################################################################
224 # If the profile is selected, the line below is repquired.
225 # if tv ||"undefined"
226 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
227 %configure --prefix=$PREFIX --enable-profile=TV \
228 --enable-tizen-major-version=%{tizen_version_major} \
229 %if 0%{?enable_debug}
232 $configure_flags --libdir=%{_libdir}
235 make %{?jobs:-j%jobs}
237 pushd %{_builddir}/%{name}-%{version}/build/tizen
238 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
241 pushd %{buildroot}%{_libdir}
242 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
243 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
249 #######################################################################
250 # If the profile is selected, the line below is repquired.
251 # if wearable || "undefined"
252 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
253 %configure --prefix=$PREFIX --enable-profile=WEARABLE \
254 --enable-tizen-major-version=%{tizen_version_major} \
255 %if 0%{?enable_debug}
258 $configure_flags --libdir=%{_libdir}
261 make %{?jobs:-j%jobs}
263 pushd %{_builddir}/%{name}-%{version}/build/tizen
264 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
267 pushd %{buildroot}%{_libdir}
268 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
269 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
275 #######################################################################
276 # If the profile is selected, the line below is repquired.
277 # if ivi ||"undefined"
278 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
279 %configure --prefix=$PREFIX --enable-profile=IVI \
280 --enable-tizen-major-version=%{tizen_version_major} \
281 %if 0%{?enable_debug}
284 $configure_flags --libdir=%{_libdir}
287 make %{?jobs:-j%jobs}
289 pushd %{_builddir}/%{name}-%{version}/build/tizen
290 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
293 pushd %{buildroot}%{_libdir}
294 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
295 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
301 #######################################################################
303 # If the profile is selected, the line below is repquired.
304 # if common ||"undefined"
305 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
306 %configure --prefix=$PREFIX --enable-profile=COMMON \
307 --enable-tizen-major-version=%{tizen_version_major} \
308 %if 0%{?enable_debug}
311 $configure_flags --libdir=%{_libdir}
314 make %{?jobs:-j%jobs}
316 pushd %{_builddir}/%{name}-%{version}/build/tizen
317 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
320 pushd %{buildroot}%{_libdir}
321 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
322 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
328 ##############################
330 ##############################
334 pushd %{_builddir}/%{name}-%{version}/build/tizen
335 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
338 # If the profile is selected, the line below is repquired.
339 # !unified && (wearable || tv || ivi || mobile)
340 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
341 rm -rf %{buildroot}%{_libdir}/libdali-csharp-binder*.so*
344 # If the profile is selected, the line below is repquired.
345 # wearable || tv || ivi || mobile || unified
346 %if "%{?profile}" != "common"
347 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
348 mv dali-csharp-binder*.pc %{buildroot}%{_libdir}/pkgconfig/
352 ################################################
354 ###############################################
355 pushd %{buildroot}%{_libdir}
357 # If the profile is selected, the line below is repquired.
358 # if common ||"undefined"
359 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
360 rm -rf libdali-csharp-binder*.so
361 ln -s libdali-csharp-binder.so.0.0.0 libdali-csharp-binder.so
364 # If the profile is selected, the line below is repquired.
365 # if wearable || "undefined"
366 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
367 rm -rf libdali-csharp-binder*.so.wearable
368 ln -s libdali-csharp-binder.so.0.0.*.wearable libdali-csharp-binder.so.wearable
371 # If the profile is selected, the line below is repquired.
372 # if tv ||"undefined"
373 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
374 rm -rf libdali-csharp-binder*.so.tv
375 ln -s libdali-csharp-binder.so.0.0.*.tv libdali-csharp-binder.so.tv
378 # If the profile is selected, the line below is repquired.
379 # if ivi ||"undefined"
380 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
381 rm -rf libdali-csharp-binder*.so.ivi
382 ln -s libdali-csharp-binder.so.0.0.*.ivi libdali-csharp-binder.so.ivi
385 # If the profile is selected, the line below is repquired.
386 # if mobile || "undefined"
387 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
388 rm -rf libdali-csharp-binder*.so.mobile
389 ln -s libdali-csharp-binder.so.0.0.*.mobile libdali-csharp-binder.so.mobile
393 ##############################
395 # 1 - Pre Install new package
396 # 2 - Install new package
397 # 3 - Post install new package
398 # 4 - Pre uninstall old package
399 # 5 - Remove files not overwritten by new package
400 # 6 - Post uninstall old package
401 ##############################
406 ##############################
407 # Post Install new package
408 ##############################
413 ##############################
414 # Pre Uninstall old package
415 ##############################
419 ##############################
420 # Post Uninstall old package
421 ##############################
426 ##############################
428 # If the profile is selected, the line below is repquired.
429 # if mobile || "undefined"
430 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
433 for FILE in libdali-csharp-binder.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
438 %postun profile_mobile
443 ##############################
445 # If the profile is selected, the line below is repquired.
446 # if tv ||"undefined"
447 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
450 for FILE in libdali-csharp-binder.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
460 ##############################
462 # If the profile is selected, the line below is repquired.
463 # if wearable || "undefined"
464 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
465 %post profile_wearable
467 for FILE in libdali-csharp-binder.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
472 %postun profile_wearable
477 ##############################
479 # If the profile is selected, the line below is repquired.
480 # if ivi ||"undefined"
481 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
484 for FILE in libdali-csharp-binder.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
495 ##############################
496 # Files in Binary Packages
497 ##############################
499 %manifest dali-csharp-binder.manifest
500 %defattr(-,root,root,-)
503 # If the profile is selected, the line below is repquired.
504 # if common ||"undefined"
505 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
506 %defattr(-,root,root,-)
507 %{_libdir}/libdali-csharp-binder.so*
508 %exclude %{_libdir}/libdali-csharp-binder*.so*.mobile
509 %exclude %{_libdir}/libdali-csharp-binder*.so*.wearable
510 %exclude %{_libdir}/libdali-csharp-binder*.so*.tv
511 %exclude %{_libdir}/libdali-csharp-binder*.so*.ivi
514 # If the profile is selected, the line below is repquired.
515 # if common ||"undefined"
516 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
517 %files profile_common
518 # default .so files are housed in the main pkg.
521 # If the profile is selected, the line below is repquired.
522 # if mobile || "undefined"
523 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
524 %files profile_mobile
525 %manifest dali-csharp-binder.manifest
526 %defattr(-,root,root,-)
527 %{_libdir}/libdali-csharp-binder.so.*mobile
530 # If the profile is selected, the line below is repquired.
531 # if tv ||"undefined"
532 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
534 %manifest dali-csharp-binder.manifest
535 %defattr(-,root,root,-)
536 %{_libdir}/libdali-csharp-binder.so.*tv
539 # If the profile is selected, the line below is repquired.
540 # if wearable || "undefined"
541 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
542 %files profile_wearable
543 %manifest dali-csharp-binder.manifest
544 %defattr(-,root,root,-)
545 %{_libdir}/libdali-csharp-binder.so.*wearable
548 # If the profile is selected, the line below is repquired.
549 # if ivi ||"undefined"
550 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
552 %manifest dali-csharp-binder.manifest
553 %defattr(-,root,root,-)
554 %{_libdir}/libdali-csharp-binder.so.*ivi
558 %defattr(-,root,root,-)
559 %dir %{_includedir}/%{name}/
560 %{_includedir}/%{name}/*
561 %{_libdir}/pkgconfig/%{name}.pc