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 nui504
22 Name: dali-csharp-binder
23 Summary: The DALI Csharp Binder
24 Version: 1.3.41+%{nui_internal_version}
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 #need libtzplatform-config for directory if tizen version is 3.x
35 %if 0%{?tizen_version_major} >= 3
36 %define tizen_platform_config_supported 1
37 BuildRequires: pkgconfig(libtzplatform-config)
40 %if 0%{?tizen_version_major} < 4
41 %define disable_cxx03_build 1
44 # Get the profile from tizen_profile_name if tizen version is 2.x and tizen_profile_name exists.
46 %if "%{tizen_version_major}" == "2" && 0%{?tizen_profile_name:1}
47 %define profile %{tizen_profile_name}
50 # If the profile is selected, the line below is repquired.
51 # if wearable || "undefined"
52 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
53 BuildRequires: pkgconfig(capi-appfw-watch-application)
54 BuildRequires: pkgconfig(appcore-watch)
55 BuildRequires: pkgconfig(screen_connector_provider)
58 BuildRequires: pkgconfig
59 BuildRequires: pkgconfig(dali-core)
60 BuildRequires: pkgconfig(dali-adaptor)
61 BuildRequires: pkgconfig(dali-toolkit)
62 BuildRequires: pkgconfig(widget_viewer_dali)
65 %if 0%{?tizen_version_major} >= 5
66 BuildRequires: pkgconfig(ecore-wl2)
68 BuildRequires: pkgconfig(ecore-wayland)
72 Requires: %{name}-compat = %{version}-%{release}
73 Recommends: %{name}-profile_common = %{version}-%{release}
78 ###########################################
79 # Dali csharp binder for profiles
80 ###########################################
82 # If the profile is selected, the line below is repquired.
83 # if mobile || "undefined"
84 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
85 %package profile_mobile
86 Summary: The DALi Tizen csharp binder for mobile
87 Provides: %{name}-compat = %{version}-%{release}
88 Conflicts: %{name}-profile_tv
89 Conflicts: %{name}-profile_wearable
90 Conflicts: %{name}-profile_ivi
91 Conflicts: %{name}-profile_common
92 %description profile_mobile
93 The DALi Tizen csharp binder for mobile.
96 # If the profile is selected, the line below is repquired.
98 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
100 Summary: The DALi Tizen csharp binder for tv
101 Provides: %{name}-compat = %{version}-%{release}
102 Conflicts: %{name}-profile_mobile
103 Conflicts: %{name}-profile_wearable
104 Conflicts: %{name}-profile_ivi
105 Conflicts: %{name}-profile_common
106 %description profile_tv
107 The DALi Tizen csharp binder for tv.
110 # If the profile is selected, the line below is repquired.
111 # if wearable || "undefined"
112 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
113 %package profile_wearable
114 Summary: The DALi Tizen csharp binder for wearable
115 Provides: %{name}-compat = %{version}-%{release}
116 Conflicts: %{name}-profile_mobile
117 Conflicts: %{name}-profile_tv
118 Conflicts: %{name}-profile_ivi
119 Conflicts: %{name}-profile_common
120 %description profile_wearable
121 The DALi Tizen csharp binder for wearable.
124 # If the profile is selected, the line below is repquired.
125 # if ivi ||"undefined"
126 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
128 Summary: The DALi Tizen csharp binder for ivi
129 Provides: %{name}-compat = %{version}-%{release}
130 Conflicts: %{name}-profile_mobile
131 Conflicts: %{name}-profile_wearable
132 Conflicts: %{name}-profile_tv
133 Conflicts: %{name}-profile_common
134 %description profile_ivi
135 The DALi Tizen csharp binder for ivi.
138 # If the profile is selected, the line below is repquired.
139 # if common ||"undefined"
140 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
141 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
142 %package profile_common
143 %define tizen_2_2_compatibility 0
144 Summary: The DALi Tizen csharp binder for common
145 Provides: %{name}-compat = %{version}-%{release}
146 Conflicts: %{name}-profile_mobile
147 Conflicts: %{name}-profile_wearable
148 Conflicts: %{name}-profile_tv
149 Conflicts: %{name}-profile_ivi
150 %description profile_common
151 The DALi Tizen csharp binder for common.
155 ##############################
157 ##############################
159 Summary: build dali csharp binder
160 Group: Development/Building
161 Requires: %{name} = %{version}-%{release}
164 This package includes developer files common to all packages.
166 ##############################
168 ##############################
172 #Use TZ_PATH when tizen version is 3.x or greater
174 %if 0%{?tizen_version_major} >= 3
175 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
176 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
178 %define dali_data_rw_dir /usr/share/dali/
179 %define dali_data_ro_dir /usr/share/dali/
183 ##############################
185 ##############################
188 CXXFLAGS+=" -Wall -g -Os -fPIC"
189 LDFLAGS+=" -Wl,--rpath=%{_libdir} "
193 CXXFLAGS+=" -DWAYLAND"
194 configure_flags="--enable-wayland"
196 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
197 %if 0%{?tizen_version_major} >= 5
198 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
199 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
200 configure_flags+=" --enable-ecore-wayland2"
206 cd %{_builddir}/%{name}-%{version}/build/tizen
209 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
210 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
211 %if 0%{?tizen_platform_config_supported}
212 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
215 # added for key grab binding only for tizen
216 # Do not merge this on tizen branch!
218 # Set up the build via configure.
219 #######################################################################
220 # If the profile is selected, the line below is repquired.
221 # if mobile || "undefined"
222 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
223 %configure --prefix=$PREFIX --enable-profile=MOBILE \
224 --enable-tizen-major-version=%{tizen_version_major} \
225 %if 0%{?enable_debug}
228 $configure_flags --libdir=%{_libdir}
231 make %{?jobs:-j%jobs}
233 pushd %{_builddir}/%{name}-%{version}/build/tizen
234 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
237 pushd %{buildroot}%{_libdir}
238 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
239 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
245 #######################################################################
246 # If the profile is selected, the line below is repquired.
247 # if tv ||"undefined"
248 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
249 %configure --prefix=$PREFIX --enable-profile=TV \
250 --enable-tizen-major-version=%{tizen_version_major} \
251 %if 0%{?enable_debug}
254 $configure_flags --libdir=%{_libdir}
257 make %{?jobs:-j%jobs}
259 pushd %{_builddir}/%{name}-%{version}/build/tizen
260 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
263 pushd %{buildroot}%{_libdir}
264 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
265 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
271 #######################################################################
272 # If the profile is selected, the line below is repquired.
273 # if wearable || "undefined"
274 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
275 %configure --prefix=$PREFIX --enable-profile=WEARABLE \
276 --enable-tizen-major-version=%{tizen_version_major} \
277 %if 0%{?enable_debug}
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 libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
291 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
297 #######################################################################
298 # If the profile is selected, the line below is repquired.
299 # if ivi ||"undefined"
300 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
301 %configure --prefix=$PREFIX --enable-profile=IVI \
302 --enable-tizen-major-version=%{tizen_version_major} \
303 %if 0%{?enable_debug}
306 $configure_flags --libdir=%{_libdir}
309 make %{?jobs:-j%jobs}
311 pushd %{_builddir}/%{name}-%{version}/build/tizen
312 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
315 pushd %{buildroot}%{_libdir}
316 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
317 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
323 #######################################################################
325 # If the profile is selected, the line below is repquired.
326 # if common ||"undefined"
327 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
328 %configure --prefix=$PREFIX --enable-profile=COMMON \
329 --enable-tizen-major-version=%{tizen_version_major} \
330 %if 0%{?enable_debug}
333 $configure_flags --libdir=%{_libdir}
336 make %{?jobs:-j%jobs}
338 pushd %{_builddir}/%{name}-%{version}/build/tizen
339 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
342 pushd %{buildroot}%{_libdir}
343 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
344 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
350 ##############################
352 ##############################
356 pushd %{_builddir}/%{name}-%{version}/build/tizen
357 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
360 # If the profile is selected, the line below is repquired.
361 # !unified && (wearable || tv || ivi || mobile)
362 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
363 rm -rf %{buildroot}%{_libdir}/libdali-csharp-binder*.so*
366 # If the profile is selected, the line below is repquired.
367 # wearable || tv || ivi || mobile || unified
368 %if "%{?profile}" != "common"
369 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
370 mv dali-csharp-binder*.pc %{buildroot}%{_libdir}/pkgconfig/
374 ################################################
376 ###############################################
377 pushd %{buildroot}%{_libdir}
379 # If the profile is selected, the line below is repquired.
380 # if common ||"undefined"
381 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
382 rm -rf libdali-csharp-binder*.so
383 ln -s libdali-csharp-binder.so.0.0.0 libdali-csharp-binder.so
386 # If the profile is selected, the line below is repquired.
387 # if wearable || "undefined"
388 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
389 rm -rf libdali-csharp-binder*.so.wearable
390 ln -s libdali-csharp-binder.so.0.0.*.wearable libdali-csharp-binder.so.wearable
393 # If the profile is selected, the line below is repquired.
394 # if tv ||"undefined"
395 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
396 rm -rf libdali-csharp-binder*.so.tv
397 ln -s libdali-csharp-binder.so.0.0.*.tv libdali-csharp-binder.so.tv
400 # If the profile is selected, the line below is repquired.
401 # if ivi ||"undefined"
402 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
403 rm -rf libdali-csharp-binder*.so.ivi
404 ln -s libdali-csharp-binder.so.0.0.*.ivi libdali-csharp-binder.so.ivi
407 # If the profile is selected, the line below is repquired.
408 # if mobile || "undefined"
409 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
410 rm -rf libdali-csharp-binder*.so.mobile
411 ln -s libdali-csharp-binder.so.0.0.*.mobile libdali-csharp-binder.so.mobile
415 ##############################
417 # 1 - Pre Install new package
418 # 2 - Install new package
419 # 3 - Post install new package
420 # 4 - Pre uninstall old package
421 # 5 - Remove files not overwritten by new package
422 # 6 - Post uninstall old package
423 ##############################
428 ##############################
429 # Post Install new package
430 ##############################
435 ##############################
436 # Pre Uninstall old package
437 ##############################
441 ##############################
442 # Post Uninstall old package
443 ##############################
448 ##############################
450 # If the profile is selected, the line below is repquired.
451 # if mobile || "undefined"
452 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
455 for FILE in libdali-csharp-binder.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
460 %postun profile_mobile
465 ##############################
467 # If the profile is selected, the line below is repquired.
468 # if tv ||"undefined"
469 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
472 for FILE in libdali-csharp-binder.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
482 ##############################
484 # If the profile is selected, the line below is repquired.
485 # if wearable || "undefined"
486 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
487 %post profile_wearable
489 for FILE in libdali-csharp-binder.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
494 %postun profile_wearable
499 ##############################
501 # If the profile is selected, the line below is repquired.
502 # if ivi ||"undefined"
503 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
506 for FILE in libdali-csharp-binder.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
517 ##############################
518 # Files in Binary Packages
519 ##############################
521 %manifest dali-csharp-binder.manifest
522 %defattr(-,root,root,-)
525 # If the profile is selected, the line below is repquired.
526 # if common ||"undefined"
527 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
528 %defattr(-,root,root,-)
529 %{_libdir}/libdali-csharp-binder.so*
530 %exclude %{_libdir}/libdali-csharp-binder*.so*.mobile
531 %exclude %{_libdir}/libdali-csharp-binder*.so*.wearable
532 %exclude %{_libdir}/libdali-csharp-binder*.so*.tv
533 %exclude %{_libdir}/libdali-csharp-binder*.so*.ivi
536 # If the profile is selected, the line below is repquired.
537 # if common ||"undefined"
538 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
539 %files profile_common
540 # default .so files are housed in the main pkg.
543 # If the profile is selected, the line below is repquired.
544 # if mobile || "undefined"
545 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
546 %files profile_mobile
547 %manifest dali-csharp-binder.manifest
548 %defattr(-,root,root,-)
549 %{_libdir}/libdali-csharp-binder.so.*mobile
552 # If the profile is selected, the line below is repquired.
553 # if tv ||"undefined"
554 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
556 %manifest dali-csharp-binder.manifest
557 %defattr(-,root,root,-)
558 %{_libdir}/libdali-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 %{_libdir}/libdali-csharp-binder.so.*wearable
570 # If the profile is selected, the line below is repquired.
571 # if ivi ||"undefined"
572 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
574 %manifest dali-csharp-binder.manifest
575 %defattr(-,root,root,-)
576 %{_libdir}/libdali-csharp-binder.so.*ivi
580 %defattr(-,root,root,-)
581 %dir %{_includedir}/%{name}/
582 %{_includedir}/%{name}/*
583 %{_libdir}/pkgconfig/%{name}.pc