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