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 Name: dali-csharp-binder
20 Summary: The DALI Csharp Binder
21 Version: 1.3.34+nui503
24 License: Apache-2.0 and BSD-3-Clause and MIT
25 Source: %{name}-%{version}.tar.xz
27 Requires(post): /sbin/ldconfig
28 Requires(postun): /sbin/ldconfig
30 #need libtzplatform-config for directory if tizen version is 3.x
32 %if 0%{?tizen_version_major} >= 3
33 %define tizen_platform_config_supported 1
34 BuildRequires: pkgconfig(libtzplatform-config)
37 %if 0%{?tizen_version_major} < 4
38 %define disable_cxx03_build 1
41 # Get the profile from tizen_profile_name if tizen version is 2.x and tizen_profile_name exists.
43 %if "%{tizen_version_major}" == "2" && 0%{?tizen_profile_name:1}
44 %define profile %{tizen_profile_name}
47 # If the profile is selected, the line below is repquired.
48 # if wearable || "undefined"
49 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
50 BuildRequires: pkgconfig(capi-appfw-watch-application)
51 BuildRequires: pkgconfig(appcore-watch)
52 BuildRequires: pkgconfig(screen_connector_provider)
55 BuildRequires: pkgconfig
56 BuildRequires: pkgconfig(dali-core)
57 BuildRequires: pkgconfig(dali-adaptor)
58 BuildRequires: pkgconfig(dali-toolkit)
59 BuildRequires: pkgconfig(widget_viewer_dali)
62 %if 0%{?tizen_version_major} >= 5
63 BuildRequires: pkgconfig(ecore-wl2)
65 BuildRequires: pkgconfig(ecore-wayland)
69 Requires: %{name}-compat = %{version}-%{release}
70 Recommends: %{name}-profile_common = %{version}-%{release}
75 ###########################################
76 # Dali csharp binder for profiles
77 ###########################################
79 # If the profile is selected, the line below is repquired.
80 # if mobile || "undefined"
81 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
82 %package profile_mobile
83 Summary: The DALi Tizen csharp binder for mobile
84 Provides: %{name}-compat = %{version}-%{release}
85 Conflicts: %{name}-profile_tv
86 Conflicts: %{name}-profile_wearable
87 Conflicts: %{name}-profile_ivi
88 Conflicts: %{name}-profile_common
89 %description profile_mobile
90 The DALi Tizen csharp binder for mobile.
93 # If the profile is selected, the line below is repquired.
95 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
97 Summary: The DALi Tizen csharp binder for tv
98 Provides: %{name}-compat = %{version}-%{release}
99 Conflicts: %{name}-profile_mobile
100 Conflicts: %{name}-profile_wearable
101 Conflicts: %{name}-profile_ivi
102 Conflicts: %{name}-profile_common
103 %description profile_tv
104 The DALi Tizen csharp binder for tv.
107 # If the profile is selected, the line below is repquired.
108 # if wearable || "undefined"
109 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
110 %package profile_wearable
111 Summary: The DALi Tizen csharp binder for wearable
112 Provides: %{name}-compat = %{version}-%{release}
113 Conflicts: %{name}-profile_mobile
114 Conflicts: %{name}-profile_tv
115 Conflicts: %{name}-profile_ivi
116 Conflicts: %{name}-profile_common
117 %description profile_wearable
118 The DALi Tizen csharp binder for wearable.
121 # If the profile is selected, the line below is repquired.
122 # if ivi ||"undefined"
123 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
125 Summary: The DALi Tizen csharp binder for ivi
126 Provides: %{name}-compat = %{version}-%{release}
127 Conflicts: %{name}-profile_mobile
128 Conflicts: %{name}-profile_wearable
129 Conflicts: %{name}-profile_tv
130 Conflicts: %{name}-profile_common
131 %description profile_ivi
132 The DALi Tizen csharp binder for ivi.
135 # If the profile is selected, the line below is repquired.
136 # if common ||"undefined"
137 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
138 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
139 %package profile_common
140 %define tizen_2_2_compatibility 0
141 Summary: The DALi Tizen csharp binder for common
142 Provides: %{name}-compat = %{version}-%{release}
143 Conflicts: %{name}-profile_mobile
144 Conflicts: %{name}-profile_wearable
145 Conflicts: %{name}-profile_tv
146 Conflicts: %{name}-profile_ivi
147 %description profile_common
148 The DALi Tizen csharp binder for common.
152 ##############################
154 ##############################
156 Summary: build dali csharp binder
157 Group: Development/Building
158 Requires: %{name} = %{version}-%{release}
161 This package includes developer files common to all packages.
163 ##############################
165 ##############################
169 #Use TZ_PATH when tizen version is 3.x or greater
171 %if 0%{?tizen_version_major} >= 3
172 %define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
173 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
175 %define dali_data_rw_dir /usr/share/dali/
176 %define dali_data_ro_dir /usr/share/dali/
180 ##############################
182 ##############################
185 CXXFLAGS+=" -Wall -g -Os -fPIC"
186 LDFLAGS+=" -Wl,--rpath=%{_libdir} "
190 CXXFLAGS+=" -DWAYLAND"
191 configure_flags="--enable-wayland"
193 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
194 %if 0%{?tizen_version_major} >= 5
195 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
196 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
197 configure_flags+=" --enable-ecore-wayland2"
203 cd %{_builddir}/%{name}-%{version}/build/tizen
206 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
207 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
208 %if 0%{?tizen_platform_config_supported}
209 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
212 # added for key grab binding only for tizen
213 # Do not merge this on tizen branch!
215 # Set up the build via configure.
216 #######################################################################
217 # If the profile is selected, the line below is repquired.
218 # if mobile || "undefined"
219 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
220 %configure --prefix=$PREFIX --enable-profile=MOBILE \
221 --enable-tizen-major-version=%{tizen_version_major} \
222 %if 0%{?enable_debug}
225 $configure_flags --libdir=%{_libdir}
228 make %{?jobs:-j%jobs}
230 pushd %{_builddir}/%{name}-%{version}/build/tizen
231 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
234 pushd %{buildroot}%{_libdir}
235 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
236 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
242 #######################################################################
243 # If the profile is selected, the line below is repquired.
244 # if tv ||"undefined"
245 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
246 %configure --prefix=$PREFIX --enable-profile=TV \
247 --enable-tizen-major-version=%{tizen_version_major} \
248 %if 0%{?enable_debug}
251 $configure_flags --libdir=%{_libdir}
254 make %{?jobs:-j%jobs}
256 pushd %{_builddir}/%{name}-%{version}/build/tizen
257 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
260 pushd %{buildroot}%{_libdir}
261 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
262 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
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 $configure_flags --libdir=%{_libdir}
280 make %{?jobs:-j%jobs}
282 pushd %{_builddir}/%{name}-%{version}/build/tizen
283 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
286 pushd %{buildroot}%{_libdir}
287 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
288 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
294 #######################################################################
295 # If the profile is selected, the line below is repquired.
296 # if ivi ||"undefined"
297 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
298 %configure --prefix=$PREFIX --enable-profile=IVI \
299 --enable-tizen-major-version=%{tizen_version_major} \
300 %if 0%{?enable_debug}
303 $configure_flags --libdir=%{_libdir}
306 make %{?jobs:-j%jobs}
308 pushd %{_builddir}/%{name}-%{version}/build/tizen
309 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
312 pushd %{buildroot}%{_libdir}
313 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
314 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
320 #######################################################################
322 # If the profile is selected, the line below is repquired.
323 # if common ||"undefined"
324 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
325 %configure --prefix=$PREFIX --enable-profile=COMMON \
326 --enable-tizen-major-version=%{tizen_version_major} \
327 %if 0%{?enable_debug}
330 $configure_flags --libdir=%{_libdir}
333 make %{?jobs:-j%jobs}
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 pushd %{buildroot}%{_libdir}
340 for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
341 mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
347 ##############################
349 ##############################
353 pushd %{_builddir}/%{name}-%{version}/build/tizen
354 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
357 # If the profile is selected, the line below is repquired.
358 # !unified && (wearable || tv || ivi || mobile)
359 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
360 rm -rf %{buildroot}%{_libdir}/libdali-csharp-binder*.so*
363 # If the profile is selected, the line below is repquired.
364 # wearable || tv || ivi || mobile || unified
365 %if "%{?profile}" != "common"
366 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
367 mv dali-csharp-binder*.pc %{buildroot}%{_libdir}/pkgconfig/
371 ################################################
373 ###############################################
374 pushd %{buildroot}%{_libdir}
376 # If the profile is selected, the line below is repquired.
377 # if common ||"undefined"
378 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
379 rm -rf libdali-csharp-binder*.so
380 ln -s libdali-csharp-binder.so.0.0.0 libdali-csharp-binder.so
383 # If the profile is selected, the line below is repquired.
384 # if wearable || "undefined"
385 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
386 rm -rf libdali-csharp-binder*.so.wearable
387 ln -s libdali-csharp-binder.so.0.0.*.wearable libdali-csharp-binder.so.wearable
390 # If the profile is selected, the line below is repquired.
391 # if tv ||"undefined"
392 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
393 rm -rf libdali-csharp-binder*.so.tv
394 ln -s libdali-csharp-binder.so.0.0.*.tv libdali-csharp-binder.so.tv
397 # If the profile is selected, the line below is repquired.
398 # if ivi ||"undefined"
399 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
400 rm -rf libdali-csharp-binder*.so.ivi
401 ln -s libdali-csharp-binder.so.0.0.*.ivi libdali-csharp-binder.so.ivi
404 # If the profile is selected, the line below is repquired.
405 # if mobile || "undefined"
406 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
407 rm -rf libdali-csharp-binder*.so.mobile
408 ln -s libdali-csharp-binder.so.0.0.*.mobile libdali-csharp-binder.so.mobile
412 ##############################
414 # 1 - Pre Install new package
415 # 2 - Install new package
416 # 3 - Post install new package
417 # 4 - Pre uninstall old package
418 # 5 - Remove files not overwritten by new package
419 # 6 - Post uninstall old package
420 ##############################
425 ##############################
426 # Post Install new package
427 ##############################
432 ##############################
433 # Pre Uninstall old package
434 ##############################
438 ##############################
439 # Post Uninstall old package
440 ##############################
445 ##############################
447 # If the profile is selected, the line below is repquired.
448 # if mobile || "undefined"
449 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
452 for FILE in libdali-csharp-binder.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
457 %postun profile_mobile
462 ##############################
464 # If the profile is selected, the line below is repquired.
465 # if tv ||"undefined"
466 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
469 for FILE in libdali-csharp-binder.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
479 ##############################
481 # If the profile is selected, the line below is repquired.
482 # if wearable || "undefined"
483 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
484 %post profile_wearable
486 for FILE in libdali-csharp-binder.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
491 %postun profile_wearable
496 ##############################
498 # If the profile is selected, the line below is repquired.
499 # if ivi ||"undefined"
500 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
503 for FILE in libdali-csharp-binder.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
514 ##############################
515 # Files in Binary Packages
516 ##############################
518 %manifest dali-csharp-binder.manifest
519 %defattr(-,root,root,-)
520 %defattr(-,app,app,-)
523 # If the profile is selected, the line below is repquired.
524 # if common ||"undefined"
525 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
526 %defattr(-,root,root,-)
527 %{_libdir}/libdali-csharp-binder.so*
528 %exclude %{_libdir}/libdali-csharp-binder*.so*.mobile
529 %exclude %{_libdir}/libdali-csharp-binder*.so*.wearable
530 %exclude %{_libdir}/libdali-csharp-binder*.so*.tv
531 %exclude %{_libdir}/libdali-csharp-binder*.so*.ivi
534 # If the profile is selected, the line below is repquired.
535 # if common ||"undefined"
536 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
537 %files profile_common
538 # default .so files are housed in the main pkg.
541 # If the profile is selected, the line below is repquired.
542 # if mobile || "undefined"
543 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
544 %files profile_mobile
545 %manifest dali-csharp-binder.manifest
546 %defattr(-,root,root,-)
547 %{_libdir}/libdali-csharp-binder.so.*mobile
550 # If the profile is selected, the line below is repquired.
551 # if tv ||"undefined"
552 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
554 %manifest dali-csharp-binder.manifest
555 %defattr(-,root,root,-)
556 %{_libdir}/libdali-csharp-binder.so.*tv
559 # If the profile is selected, the line below is repquired.
560 # if wearable || "undefined"
561 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
562 %files profile_wearable
563 %manifest dali-csharp-binder.manifest
564 %defattr(-,root,root,-)
565 %{_libdir}/libdali-csharp-binder.so.*wearable
568 # If the profile is selected, the line below is repquired.
569 # if ivi ||"undefined"
570 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
572 %manifest dali-csharp-binder.manifest
573 %defattr(-,root,root,-)
574 %{_libdir}/libdali-csharp-binder.so.*ivi
578 %defattr(-,root,root,-)
579 %dir %{_includedir}/%{name}/
580 %{_includedir}/%{name}/*
581 %{_libdir}/pkgconfig/%{name}.pc