ad8a7ee42beb97579f2010188dbb036103114b1e
[platform/core/uifw/dali-adaptor.git] / packaging / dali-adaptor.spec
1 # NOTES
2 # This spec file is used to build DALi Adaptor for different Tizen Profiles
3 # Current profiles are:  Mobile, TV, Wearable, Common
4 #
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
7 #
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
11
12 # Do not provide .so automatically for the extensions.
13 # This if statement is for backward compatibility with GBM/Obsolete build systems
14 %if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
15 %global __provides_exclude_from ^.*\\.(wearable|mobile|tv|ivi|common)$
16 %endif
17
18 Name:       dali-adaptor
19 Summary:    The DALi Tizen Adaptor
20 Version:    1.4.37
21 Release:    1
22 Group:      System/Libraries
23 License:    Apache-2.0 and BSD-3-Clause and MIT
24 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
25 Source0:    %{name}-%{version}.tar.gz
26
27 Requires(post): /sbin/ldconfig
28 Requires(postun): /sbin/ldconfig
29 Requires:       giflib
30
31 %define tizen_platform_config_supported 1
32 BuildRequires:  pkgconfig(libtzplatform-config)
33
34 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
35 # if wearable || "undefined"
36 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
37 BuildRequires:  pkgconfig(capi-appfw-watch-application)
38 BuildRequires:  pkgconfig(appcore-watch)
39 BuildRequires:  pkgconfig(screen_connector_provider)
40 %endif
41
42 BuildRequires:  pkgconfig(gles20)
43 BuildRequires:  pkgconfig(glesv2)
44 BuildRequires:  pkgconfig(ttrace)
45
46 BuildRequires:  dali-devel
47 BuildRequires:  dali-integration-devel
48
49 BuildRequires:  pkgconfig
50 BuildRequires:  gawk
51 BuildRequires:  giflib-devel
52 BuildRequires:  pkgconfig(fontconfig)
53 BuildRequires:  libjpeg-turbo-devel
54 BuildRequires:  pkgconfig(vconf)
55 BuildRequires:  tts-devel
56 BuildRequires:  pkgconfig(dlog)
57 BuildRequires:  libdrm-devel
58 BuildRequires:  pkgconfig(libexif)
59 BuildRequires:  pkgconfig(libpng)
60 BuildRequires:  pkgconfig(egl)
61 BuildRequires:  libcurl-devel
62 BuildRequires:  pkgconfig(harfbuzz)
63 BuildRequires:  fribidi-devel
64
65 BuildRequires:  pkgconfig(capi-system-info)
66 BuildRequires:  pkgconfig(capi-system-sensor)
67
68 BuildRequires:  pkgconfig(libcrypto)
69 BuildRequires:  pkgconfig(cairo)
70
71 BuildRequires:  pkgconfig(wayland-egl)
72 BuildRequires:  pkgconfig(wayland-client)
73 BuildRequires:  wayland-devel
74 BuildRequires:  wayland-extension-client-devel
75
76 # dali-adaptor uses ecore mainloop
77 %if 0%{?tizen_version_major} >= 5
78 BuildRequires:  pkgconfig(ecore-wl2)
79 BuildRequires:  pkgconfig(wayland-egl-tizen)
80 %else
81 BuildRequires:  pkgconfig(ecore-wayland)
82 %endif
83
84 # dali-adaptor needs tbm_surface in tizen 3.0 wayland
85 BuildRequires:  pkgconfig(libtbm)
86
87 BuildRequires:  pkgconfig(tpkp-curl)
88
89 # for dali-adaptor
90 BuildRequires:  pkgconfig(appcore-ui)
91 BuildRequires:  pkgconfig(appcore-widget-base)
92 BuildRequires:  pkgconfig(bundle)
93 BuildRequires:  pkgconfig(capi-appfw-app-common)
94 BuildRequires:  pkgconfig(capi-appfw-app-control)
95 BuildRequires:  pkgconfig(ecore-imf)
96
97 BuildRequires:  pkgconfig(capi-system-system-settings)
98
99 # for autofill
100 %if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5
101 BuildRequires:  pkgconfig(capi-ui-autofill)
102 # for ATSPI (Accessibility) support
103 BuildRequires:  pkgconfig(eldbus)
104 %endif
105
106 # for feedback plugin
107 BuildRequires:  pkgconfig(mm-sound)
108 BuildRequires:  pkgconfig(feedback)
109
110 # for multiprofile
111 Requires:   %{name}-compat = %{version}-%{release}
112 Recommends: %{name}-profile_common = %{version}-%{release}
113
114 %description
115 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
116 platform abstraction and application shell
117
118 ###########################################
119 # Dali adapter for profiles
120 ###########################################
121
122 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
123 # if mobile || "undefined"
124 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
125 %package profile_mobile
126 Summary:        The DALi Tizen Adaptor for mobile
127 Provides:       %{name}-compat = %{version}-%{release}
128 Conflicts:      %{name}-profile_tv
129 Conflicts:      %{name}-profile_wearable
130 Conflicts:      %{name}-profile_ivi
131 Conflicts:      %{name}-profile_common
132 %description profile_mobile
133 The DALi Tizen Adaptor for mobile.
134 %endif
135
136 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
137 # if tv ||"undefined"
138 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
139 %package profile_tv
140 Summary:        The DALi Tizen Adaptor for tv
141 Provides:       %{name}-compat = %{version}-%{release}
142 Conflicts:      %{name}-profile_mobile
143 Conflicts:      %{name}-profile_wearable
144 Conflicts:      %{name}-profile_ivi
145 Conflicts:      %{name}-profile_common
146 %description profile_tv
147 The DALi Tizen Adaptor for tv.
148 %endif
149
150 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
151 # if wearable || "undefined"
152 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
153 %package profile_wearable
154 Summary:        The DALi Tizen Adaptor for wearable
155 Provides:       %{name}-compat = %{version}-%{release}
156 Conflicts:      %{name}-profile_mobile
157 Conflicts:      %{name}-profile_tv
158 Conflicts:      %{name}-profile_ivi
159 Conflicts:      %{name}-profile_common
160 %description profile_wearable
161 The DALi Tizen Adaptor for wearable.
162 %endif
163
164 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
165 # if ivi ||"undefined"
166 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
167 %package profile_ivi
168 Summary:        The DALi Tizen Adaptor for ivi
169 Provides:       %{name}-compat = %{version}-%{release}
170 Conflicts:      %{name}-profile_mobile
171 Conflicts:      %{name}-profile_wearable
172 Conflicts:      %{name}-profile_tv
173 Conflicts:      %{name}-profile_common
174 %description profile_ivi
175 The DALi Tizen Adaptor for ivi.
176 %endif
177
178 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
179 # if common ||"undefined"
180 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
181 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
182 %package profile_common
183 Summary:        The DALi Tizen Adaptor for common
184 Provides:       %{name}-compat = %{version}-%{release}
185 Conflicts:      %{name}-profile_mobile
186 Conflicts:      %{name}-profile_wearable
187 Conflicts:      %{name}-profile_tv
188 Conflicts:      %{name}-profile_ivi
189 %description profile_common
190 The DALi Tizen Adaptor for common.
191 %endif
192
193 ##############################
194 # devel
195 ##############################
196 %package devel
197 Summary:    Development components for the DALi Tizen Adaptor
198 Group:      Development/Building
199 Requires:   %{name} = %{version}-%{release}
200 Requires:   %{name}-integration-devel = %{version}-%{release}
201
202 %description devel
203 Development components for the DALi Tizen Adaptor - public headers and package configs
204
205 ##############################
206 # integration-devel
207 ##############################
208 %package integration-devel
209 Summary:    Integration development package for the Adaptor
210 Group:      Development/Building
211 Requires:   %{name} = %{version}-%{release}
212
213 %description integration-devel
214 Integration development package for the Adaptor - headers for integrating with an adaptor library.
215
216 ##############################
217 # Dali Feedback Plugin
218 ##############################
219 %package dali-feedback-plugin
220 Summary:    Plugin to play haptic and audio feedback for Dali
221 Group:      System/Libraries
222 Requires:   %{name} = %{version}-%{release}
223 %description dali-feedback-plugin
224 Feedback plugin to play haptic and audio feedback for Dali
225
226 ##############################
227 # Preparation
228 ##############################
229 %prep
230 %setup -q
231
232 #Use TZ_PATH when tizen version is 3.x or greater
233
234 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
235 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
236 %define font_preloaded_path      %TZ_SYS_RO_SHARE/fonts/
237 %define font_downloaded_path     %TZ_SYS_SHARE/fonts/
238 %define font_application_path    %TZ_SYS_RO_SHARE/app_fonts/
239 %define font_configuration_file  %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
240
241 %define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
242 %define dali_plugin_sound_files  /plugins/sounds/
243 %define dev_include_path %{_includedir}
244
245 ##############################
246 # Build
247 ##############################
248 %build
249 PREFIX+="/usr"
250 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
251 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -lttrace -Wl,-Bsymbolic-functions "
252
253 %ifarch %{arm}
254 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
255 %endif
256
257 CFLAGS+=" -DWAYLAND"
258 CXXFLAGS+=" -DWAYLAND"
259 configure_flags="--enable-wayland"
260
261 # Use this conditional when Tizen version is 5.x or greater
262 %if 0%{?tizen_version_major} >= 5
263 CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
264
265 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
266 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
267 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
268 configure_flags+=" --enable-ecore-wayland2"
269 %endif
270
271 libtoolize --force
272 cd %{_builddir}/%{name}-%{version}/build/tizen
273 autoreconf --install
274
275 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
276 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"  ; export DALI_DATA_RO_DIR
277 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
278 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
279 FONT_APPLICATION_PATH="%{font_application_path}"  ; export FONT_APPLICATION_PATH
280 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
281 %if 0%{?tizen_platform_config_supported}
282 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
283 %endif
284
285 # Set up the build via configure.
286 #######################################################################
287 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
288 # if mobile || "undefined"
289 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
290 %configure --prefix=$PREFIX --with-jpeg-turbo \
291            --enable-shaderbincache=DISABLE --enable-profile=MOBILE \
292            --enable-tizen-major-version=%{tizen_version_major} \
293            --enable-tizen-minor-version=%{tizen_version_minor} \
294            --enable-feedback \
295            --enable-efl=no \
296 %if 0%{?enable_debug}
297            --enable-debug \
298 %endif
299 %if 0%{?enable_trace}
300            --enable-trace \
301 %endif
302            --enable-appfw=yes \
303            $configure_flags --libdir=%{_libdir} \
304            --enable-rename-so=no
305
306 # Build.
307 make %{?jobs:-j%jobs}
308
309 pushd %{_builddir}/%{name}-%{version}/build/tizen
310 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
311 popd
312
313 pushd %{buildroot}%{_libdir}
314 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
315 for FILE in libdali-*plugin*-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
316 mv pkgconfig/dali-adaptor*pc %{_builddir}/%{name}-%{version}/build/tizen/
317 popd
318
319 make clean
320
321 %endif
322
323 #######################################################################
324 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
325 # if tv ||"undefined"
326 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
327 %configure --prefix=$PREFIX --with-jpeg-turbo \
328            --enable-shaderbincache=DISABLE --enable-profile=TV \
329            --enable-tizen-major-version=%{tizen_version_major} \
330            --enable-tizen-minor-version=%{tizen_version_minor} \
331            --enable-feedback \
332            --enable-efl=no \
333 %if 0%{?enable_debug}
334            --enable-debug \
335 %endif
336 %if 0%{?enable_trace}
337            --enable-trace \
338 %endif
339            --enable-appfw=yes \
340            $configure_flags --libdir=%{_libdir} \
341            --enable-rename-so=no
342
343 # Build.
344 make %{?jobs:-j%jobs}
345
346 pushd %{_builddir}/%{name}-%{version}/build/tizen
347 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
348 popd
349
350 pushd %{buildroot}%{_libdir}
351 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
352 for FILE in libdali-*plugin*-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
353 mv pkgconfig/dali-adaptor*pc %{_builddir}/%{name}-%{version}/build/tizen/
354 popd
355
356 make clean
357 %endif
358
359 #######################################################################
360 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
361 # if wearable || "undefined"
362 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
363 %configure --prefix=$PREFIX --with-jpeg-turbo \
364            --enable-shaderbincache=DISABLE --enable-profile=WEARABLE \
365            --enable-tizen-major-version=%{tizen_version_major} \
366            --enable-tizen-minor-version=%{tizen_version_minor} \
367            --enable-feedback \
368            --enable-efl=no \
369 %if 0%{?enable_debug}
370            --enable-debug \
371 %endif
372 %if 0%{?enable_trace}
373            --enable-trace \
374 %endif
375            --enable-appfw=yes \
376            $configure_flags --libdir=%{_libdir} \
377            --enable-rename-so=no
378
379 # Build.
380 make %{?jobs:-j%jobs}
381
382 pushd %{_builddir}/%{name}-%{version}/build/tizen
383 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
384 popd
385
386 pushd %{buildroot}%{_libdir}
387 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
388 for FILE in libdali-*plugin*-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
389 mv pkgconfig/dali-adaptor*pc %{_builddir}/%{name}-%{version}/build/tizen/
390 popd
391
392 make clean
393 %endif
394
395 #######################################################################
396 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
397 # if ivi ||"undefined"
398 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
399 %configure --prefix=$PREFIX --with-jpeg-turbo \
400            --enable-shaderbincache=DISABLE --enable-profile=IVI \
401            --enable-tizen-major-version=%{tizen_version_major} \
402            --enable-tizen-minor-version=%{tizen_version_minor} \
403            --enable-feedback \
404            --enable-efl=no \
405 %if 0%{?enable_debug}
406            --enable-debug \
407 %endif
408 %if 0%{?enable_trace}
409            --enable-trace \
410 %endif
411            --enable-appfw=yes \
412            $configure_flags --libdir=%{_libdir} \
413            --enable-rename-so=no
414
415 # Build.
416 make %{?jobs:-j%jobs}
417
418 pushd %{_builddir}/%{name}-%{version}/build/tizen
419 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
420 popd
421
422 pushd %{buildroot}%{_libdir}
423 for FILE in libdali-adaptor*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
424 for FILE in libdali-*plugin*-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
425
426 mv pkgconfig/dali-adaptor*pc %{_builddir}/%{name}-%{version}/build/tizen/
427 popd
428
429 make clean
430 %endif
431
432 #######################################################################
433 # common
434 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
435 # if common ||"undefined"
436 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
437 %configure --prefix=$PREFIX --with-jpeg-turbo \
438            --enable-shaderbincache=DISABLE --enable-profile=COMMON \
439            --enable-tizen-major-version=%{tizen_version_major} \
440            --enable-tizen-minor-version=%{tizen_version_minor} \
441            --enable-feedback \
442            --enable-efl=no \
443 %if 0%{?enable_debug}
444            --enable-debug \
445 %endif
446 %if 0%{?enable_trace}
447            --enable-trace \
448 %endif
449            --enable-appfw=yes \
450            $configure_flags --libdir=%{_libdir} \
451            --enable-rename-so=no
452
453 # Build.
454 make %{?jobs:-j%jobs}
455
456 pushd %{_builddir}/%{name}-%{version}/build/tizen
457 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
458 popd
459
460 pushd %{buildroot}%{_libdir}
461 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
462 for FILE in libdali-*plugin*-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
463
464 mv pkgconfig/dali-adaptor*pc %{_builddir}/%{name}-%{version}/build/tizen/
465 popd
466
467 make clean
468
469 %endif
470
471 ##############################
472 # Installation
473 ##############################
474 %install
475 rm -rf %{buildroot}
476
477 pushd %{_builddir}/%{name}-%{version}/build/tizen
478 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
479
480
481 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
482 # !unified && (wearable || tv || ivi || mobile)
483 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
484 rm -rf %{buildroot}%{_libdir}/libdali-adap*.so*
485 %endif
486
487 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
488 # wearable || tv || ivi || mobile || unified
489 %if "%{?profile}" != "common"
490 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
491 mv dali-adaptor*.pc %{buildroot}%{_libdir}/pkgconfig/
492 %endif
493 popd
494
495 ################################################
496 #rename
497 ###############################################
498 pushd %{buildroot}%{_libdir}
499
500 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
501 # if common ||"undefined"
502 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
503 rm -rf libdali-adaptor*.so
504 ln -s libdali-adaptor-cxx11.so.0.0.0 libdali-adaptor.so
505 #%endif
506
507 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
508 # if wearable || "undefined"
509 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
510 rm -rf libdali-adaptor*.so.wearable
511 ln -s libdali-adaptor-cxx11.so.0.0.*.wearable libdali-adaptor.so.wearable
512 %endif
513
514 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
515 # if tv ||"undefined"
516 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
517 rm -rf libdali-adaptor*.so.tv
518 ln -s libdali-adaptor-cxx11.so.0.0.*.tv libdali-adaptor.so.tv
519 %endif
520
521 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
522 # if ivi ||"undefined"
523 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
524 rm -rf libdali-adaptor*.so.ivi
525 ln -s libdali-adaptor-cxx11.so.0.0.*.ivi libdali-adaptor.so.ivi
526 %endif
527
528 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
529 # if mobile || "undefined"
530 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
531 rm -rf libdali-adaptor*.so.mobile
532 ln -s libdali-adaptor-cxx11.so.0.0.*.mobile libdali-adaptor.so.mobile
533 %endif
534 popd
535
536 ##############################
537 # Upgrade order:
538 # 1 - Pre Install new package
539 # 2 - Install new package
540 # 3 - Post install new package
541 # 4 - Pre uninstall old package
542 # 5 - Remove files not overwritten by new package
543 # 6 - Post uninstall old package
544 ##############################
545
546 %pre
547 exit 0
548
549 ##############################
550 #  Post Install new package
551 ##############################
552 %post
553 /sbin/ldconfig
554 exit 0
555
556 ##############################
557 #  Pre Uninstall old package
558 ##############################
559 %preun
560 exit 0
561
562 ##############################
563 #  Post Uninstall old package
564 ##############################
565 %postun
566 /sbin/ldconfig
567 exit 0
568
569 ##############################
570
571 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
572 # if mobile || "undefined"
573 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
574 %post profile_mobile
575 pushd %{_libdir}
576 for FILE in libdali-adaptor-cxx11.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
577 popd
578 /sbin/ldconfig
579 exit 0
580
581 %postun profile_mobile
582 /sbin/ldconfig
583 exit 0
584 %endif
585
586 ##############################
587
588 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
589 # if tv ||"undefined"
590 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
591 %post profile_tv
592 pushd %{_libdir}
593 for FILE in libdali-adaptor-cxx11.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
594 popd
595 /sbin/ldconfig
596 exit 0
597
598 %postun profile_tv
599 /sbin/ldconfig
600 exit 0
601 %endif
602
603 ##############################
604
605 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
606 # if wearable || "undefined"
607 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
608 %post profile_wearable
609 pushd %{_libdir}
610 for FILE in libdali-adaptor-cxx11.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
611 popd
612 /sbin/ldconfig
613 exit 0
614
615 %postun profile_wearable
616 /sbin/ldconfig
617 exit 0
618 %endif
619
620 ##############################
621
622 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
623 # if ivi ||"undefined"
624 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
625 %post profile_ivi
626 pushd %{_libdir}
627 for FILE in libdali-adaptor-cxx11.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
628 popd
629 /sbin/ldconfig
630 exit 0
631
632 %postun profile_ivi
633 /sbin/ldconfig
634 exit 0
635 %endif
636
637 ##############################
638 # Files in Binary Packages
639 ##############################
640
641 %files
642 %manifest dali-adaptor.manifest
643 %defattr(-,root,root,-)
644 %dir %{user_shader_cache_dir}
645 %{_bindir}/*
646 %license LICENSE
647
648 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
649 # if common ||"undefined"
650 #%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
651 %defattr(-,root,root,-)
652 %{_libdir}/libdali-adaptor-cxx11.so.0*
653 %{_libdir}/libdali-adaptor.so
654 %exclude %{_libdir}/libdali-adap*.so*.mobile
655 %exclude %{_libdir}/libdali-adap*.so*.wearable
656 %exclude %{_libdir}/libdali-adap*.so*.tv
657 %exclude %{_libdir}/libdali-adap*.so*.ivi
658 #%endif
659
660 #################################################
661
662 %files dali-feedback-plugin
663 %manifest dali-adaptor.manifest
664 %defattr(-,root,root,-)
665 %{_libdir}/libdali-feedback-plugin-cxx11.so*
666 %{dali_plugin_sound_files}/*
667
668 #################################################
669
670 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
671 # if common ||"undefined"
672 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
673 %files profile_common
674 # default .so files are housed in the main pkg.
675 %endif
676
677 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
678 # if mobile || "undefined"
679 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
680 %files profile_mobile
681 %manifest dali-adaptor.manifest
682 %defattr(-,root,root,-)
683 %{_libdir}/libdali-adaptor.so.mobile
684 %{_libdir}/libdali-adaptor-cxx11.so.0*.mobile
685 %endif
686
687 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
688 # if tv ||"undefined"
689 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
690 %files profile_tv
691 %manifest dali-adaptor.manifest
692 %defattr(-,root,root,-)
693 %{_libdir}/libdali-adaptor.so.tv
694 %{_libdir}/libdali-adaptor-cxx11.so.0*.tv
695 %endif
696
697 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
698 # if wearable || "undefined"
699 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
700 %files profile_wearable
701 %manifest dali-adaptor.manifest
702 %defattr(-,root,root,-)
703 %{_libdir}/libdali-adaptor.so.wearable
704 %{_libdir}/libdali-adaptor-cxx11.so.0*.wearable
705 %endif
706
707 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
708 # if ivi ||"undefined"
709 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
710 %files profile_ivi
711 %manifest dali-adaptor.manifest
712 %defattr(-,root,root,-)
713 %{_libdir}/libdali-adaptor.so.ivi
714 %{_libdir}/libdali-adaptor-cxx11.so.0*.ivi
715 %endif
716
717
718 %files devel
719 %defattr(-,root,root,-)
720 %{dev_include_path}/dali/dali.h
721 %{dev_include_path}/dali/public-api/*
722 %{dev_include_path}/dali/devel-api/*
723 %{dev_include_path}/dali/doc/*
724 %{_libdir}/pkgconfig/dali-adaptor.pc
725
726 %files integration-devel
727 %defattr(-,root,root,-)
728 %{dev_include_path}/dali/integration-api/adaptors/*
729 %{_libdir}/pkgconfig/dali-adaptor-integration.pc
730