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(widget_viewer_dali)
49 BuildRequires: pkgconfig(watch_viewer_dali)
50 BuildRequires: pkgconfig(watch-holder-base)
52 %if 0%{?tizen_version_major} >= 5
53 BuildRequires: pkgconfig(ecore-wl2)
55 BuildRequires: pkgconfig(ecore-wayland)
59 Requires: %{name}-compat = %{version}-%{release}
60 Recommends: %{name}-profile_common = %{version}-%{release}
65 ###########################################
66 # Dali csharp binder for profiles
67 ###########################################
69 # If the profile is selected, the line below is repquired.
70 # if mobile || "undefined"
71 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
72 %package profile_mobile
73 Summary: The DALi Tizen csharp binder for mobile
74 Provides: %{name}-compat = %{version}-%{release}
75 Conflicts: %{name}-profile_tv
76 Conflicts: %{name}-profile_wearable
77 Conflicts: %{name}-profile_ivi
78 Conflicts: %{name}-profile_common
79 %description profile_mobile
80 The DALi Tizen csharp binder for mobile.
83 # If the profile is selected, the line below is repquired.
85 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
87 Summary: The DALi Tizen csharp binder for tv
88 Provides: %{name}-compat = %{version}-%{release}
89 Conflicts: %{name}-profile_mobile
90 Conflicts: %{name}-profile_wearable
91 Conflicts: %{name}-profile_ivi
92 Conflicts: %{name}-profile_common
93 %description profile_tv
94 The DALi Tizen csharp binder for tv.
97 # If the profile is selected, the line below is repquired.
98 # if wearable || "undefined"
99 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
100 %package profile_wearable
101 Summary: The DALi Tizen csharp binder for wearable
102 Provides: %{name}-compat = %{version}-%{release}
103 Conflicts: %{name}-profile_mobile
104 Conflicts: %{name}-profile_tv
105 Conflicts: %{name}-profile_ivi
106 Conflicts: %{name}-profile_common
107 %description profile_wearable
108 The DALi Tizen csharp binder for wearable.
111 # If the profile is selected, the line below is repquired.
112 # if ivi ||"undefined"
113 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
115 Summary: The DALi Tizen csharp binder for ivi
116 Provides: %{name}-compat = %{version}-%{release}
117 Conflicts: %{name}-profile_mobile
118 Conflicts: %{name}-profile_wearable
119 Conflicts: %{name}-profile_tv
120 Conflicts: %{name}-profile_common
121 %description profile_ivi
122 The DALi Tizen csharp binder for ivi.
125 # If the profile is selected, the line below is repquired.
126 # if common ||"undefined"
127 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
128 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
129 %package profile_common
130 %define tizen_2_2_compatibility 0
131 Summary: The DALi Tizen csharp binder for common
132 Provides: %{name}-compat = %{version}-%{release}
133 Conflicts: %{name}-profile_mobile
134 Conflicts: %{name}-profile_wearable
135 Conflicts: %{name}-profile_tv
136 Conflicts: %{name}-profile_ivi
137 %description profile_common
138 The DALi Tizen csharp binder for common.
142 ##############################
144 ##############################
146 Summary: build dali csharp binder
147 Group: Development/Building
148 Requires: %{name} = %{version}-%{release}
151 This package includes developer files common to all packages.
153 ##############################
155 ##############################
159 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
160 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
162 ##############################
164 ##############################
167 CXXFLAGS+=" -Wall -g -Os -fPIC"
168 LDFLAGS+=" -Wl,--rpath=%{_libdir} "
172 CXXFLAGS+=" -DWAYLAND"
173 configure_flags="--enable-wayland"
175 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
176 %if 0%{?tizen_version_major} >= 5
177 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
178 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
179 configure_flags+=" --enable-ecore-wayland2"
185 cd %{_builddir}/%{name}-%{version}/build/tizen
188 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
189 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
190 %if 0%{?tizen_platform_config_supported}
191 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
194 # added for key grab binding only for tizen
195 # Do not merge this on tizen branch!
197 # Set up the build via configure.
198 #######################################################################
199 # If the profile is selected, the line below is repquired.
200 # if mobile || "undefined"
201 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
202 %configure --prefix=$PREFIX --enable-profile=MOBILE \
203 --enable-tizen-major-version=%{tizen_version_major} \
204 %if 0%{?enable_debug}
207 $configure_flags --libdir=%{_libdir}
210 make %{?jobs:-j%jobs}
212 pushd %{_builddir}/%{name}-%{version}/build/tizen
213 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
216 pushd %{buildroot}%{_libdir}
217 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
218 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
224 #######################################################################
225 # If the profile is selected, the line below is repquired.
226 # if tv ||"undefined"
227 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
228 %configure --prefix=$PREFIX --enable-profile=TV \
229 --enable-tizen-major-version=%{tizen_version_major} \
230 %if 0%{?enable_debug}
233 $configure_flags --libdir=%{_libdir}
236 make %{?jobs:-j%jobs}
238 pushd %{_builddir}/%{name}-%{version}/build/tizen
239 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
242 pushd %{buildroot}%{_libdir}
243 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
244 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
250 #######################################################################
251 # If the profile is selected, the line below is repquired.
252 # if wearable || "undefined"
253 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
254 %configure --prefix=$PREFIX --enable-profile=WEARABLE \
255 --enable-tizen-major-version=%{tizen_version_major} \
256 %if 0%{?enable_debug}
259 $configure_flags --libdir=%{_libdir}
262 make %{?jobs:-j%jobs}
264 pushd %{_builddir}/%{name}-%{version}/build/tizen
265 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
268 pushd %{buildroot}%{_libdir}
269 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
270 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
276 #######################################################################
277 # If the profile is selected, the line below is repquired.
278 # if ivi ||"undefined"
279 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
280 %configure --prefix=$PREFIX --enable-profile=IVI \
281 --enable-tizen-major-version=%{tizen_version_major} \
282 %if 0%{?enable_debug}
285 $configure_flags --libdir=%{_libdir}
288 make %{?jobs:-j%jobs}
290 pushd %{_builddir}/%{name}-%{version}/build/tizen
291 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
294 pushd %{buildroot}%{_libdir}
295 for FILE in libdali2-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
296 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
302 #######################################################################
304 # If the profile is selected, the line below is repquired.
305 # if common ||"undefined"
306 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
307 %configure --prefix=$PREFIX --enable-profile=COMMON \
308 --enable-tizen-major-version=%{tizen_version_major} \
309 %if 0%{?enable_debug}
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"; done
323 mv pkgconfig/dali2-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
329 ##############################
331 ##############################
335 pushd %{_builddir}/%{name}-%{version}/build/tizen
336 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
339 # If the profile is selected, the line below is repquired.
340 # !unified && (wearable || tv || ivi || mobile)
341 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
342 rm -rf %{buildroot}%{_libdir}/libdali2-csharp-binder*.so*
345 # If the profile is selected, the line below is repquired.
346 # wearable || tv || ivi || mobile || unified
347 %if "%{?profile}" != "common"
348 for FILE in libdali2-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
349 mv dali2-csharp-binder*.pc %{buildroot}%{_libdir}/pkgconfig/
353 ################################################
355 ###############################################
356 pushd %{buildroot}%{_libdir}
358 # If the profile is selected, the line below is repquired.
359 # if common ||"undefined"
360 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
361 rm -rf libdali2-csharp-binder*.so
362 ln -s libdali2-csharp-binder.so.0.0.0 libdali2-csharp-binder.so
365 # If the profile is selected, the line below is repquired.
366 # if wearable || "undefined"
367 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
368 rm -rf libdali2-csharp-binder*.so.wearable
369 ln -s libdali2-csharp-binder.so.0.0.*.wearable libdali2-csharp-binder.so.wearable
372 # If the profile is selected, the line below is repquired.
373 # if tv ||"undefined"
374 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
375 rm -rf libdali2-csharp-binder*.so.tv
376 ln -s libdali2-csharp-binder.so.0.0.*.tv libdali2-csharp-binder.so.tv
379 # If the profile is selected, the line below is repquired.
380 # if ivi ||"undefined"
381 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
382 rm -rf libdali2-csharp-binder*.so.ivi
383 ln -s libdali2-csharp-binder.so.0.0.*.ivi libdali2-csharp-binder.so.ivi
386 # If the profile is selected, the line below is repquired.
387 # if mobile || "undefined"
388 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
389 rm -rf libdali2-csharp-binder*.so.mobile
390 ln -s libdali2-csharp-binder.so.0.0.*.mobile libdali2-csharp-binder.so.mobile
394 ##############################
396 # 1 - Pre Install new package
397 # 2 - Install new package
398 # 3 - Post install new package
399 # 4 - Pre uninstall old package
400 # 5 - Remove files not overwritten by new package
401 # 6 - Post uninstall old package
402 ##############################
407 ##############################
408 # Post Install new package
409 ##############################
414 ##############################
415 # Pre Uninstall old package
416 ##############################
420 ##############################
421 # Post Uninstall old package
422 ##############################
427 ##############################
429 # If the profile is selected, the line below is repquired.
430 # if mobile || "undefined"
431 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
434 for FILE in libdali2-csharp-binder.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
439 %postun profile_mobile
444 ##############################
446 # If the profile is selected, the line below is repquired.
447 # if tv ||"undefined"
448 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
451 for FILE in libdali2-csharp-binder.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
461 ##############################
463 # If the profile is selected, the line below is repquired.
464 # if wearable || "undefined"
465 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
466 %post profile_wearable
468 for FILE in libdali2-csharp-binder.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
473 %postun profile_wearable
478 ##############################
480 # If the profile is selected, the line below is repquired.
481 # if ivi ||"undefined"
482 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
485 for FILE in libdali2-csharp-binder.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
496 ##############################
497 # Files in Binary Packages
498 ##############################
500 %manifest dali-csharp-binder.manifest
501 %defattr(-,root,root,-)
504 # If the profile is selected, the line below is repquired.
505 # if common ||"undefined"
506 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
507 %defattr(-,root,root,-)
508 %{_libdir}/libdali2-csharp-binder.so*
509 %exclude %{_libdir}/libdali2-csharp-binder*.so*.mobile
510 %exclude %{_libdir}/libdali2-csharp-binder*.so*.wearable
511 %exclude %{_libdir}/libdali2-csharp-binder*.so*.tv
512 %exclude %{_libdir}/libdali2-csharp-binder*.so*.ivi
515 # If the profile is selected, the line below is repquired.
516 # if common ||"undefined"
517 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
518 %files profile_common
519 # default .so files are housed in the main pkg.
522 # If the profile is selected, the line below is repquired.
523 # if mobile || "undefined"
524 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
525 %files profile_mobile
526 %manifest dali-csharp-binder.manifest
527 %defattr(-,root,root,-)
528 %{_libdir}/libdali2-csharp-binder.so.*mobile
531 # If the profile is selected, the line below is repquired.
532 # if tv ||"undefined"
533 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
535 %manifest dali-csharp-binder.manifest
536 %defattr(-,root,root,-)
537 %{_libdir}/libdali2-csharp-binder.so.*tv
540 # If the profile is selected, the line below is repquired.
541 # if wearable || "undefined"
542 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
543 %files profile_wearable
544 %manifest dali-csharp-binder.manifest
545 %defattr(-,root,root,-)
546 %{_libdir}/libdali2-csharp-binder.so.*wearable
549 # If the profile is selected, the line below is repquired.
550 # if ivi ||"undefined"
551 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
553 %manifest dali-csharp-binder.manifest
554 %defattr(-,root,root,-)
555 %{_libdir}/libdali2-csharp-binder.so.*ivi
559 %defattr(-,root,root,-)
560 %dir %{_includedir}/dali-csharp-binder/
561 %{_includedir}/dali-csharp-binder/*
562 %{_libdir}/pkgconfig/%{name}.pc