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