45f8c15a318701e7009776f8a76b3041a8bd6f89
[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.48
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 BuildRequires:  pkgconfig(screen_connector_provider)
52 %endif
53
54 BuildRequires:  pkgconfig(gles20)
55 BuildRequires:  pkgconfig(glesv2)
56
57 BuildRequires:  pkgconfig
58 BuildRequires:  gawk
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 # Use this conditional when Tizen version is 4.x or greater
312 %if 0%{?tizen_version_major} >= 4
313 CXXFLAGS+=" -DOVER_TIZEN_VERSION_4"
314 %endif
315
316 %if 0%{?tizen_2_2_compatibility}
317 CFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
318 CXXFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
319 %endif
320
321 libtoolize --force
322 cd %{_builddir}/%{name}-%{version}/build/tizen
323 autoreconf --install
324
325 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
326 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"  ; export DALI_DATA_RO_DIR
327 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
328 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
329 FONT_APPLICATION_PATH="%{font_application_path}"  ; export FONT_APPLICATION_PATH
330 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
331 %if 0%{?tizen_platform_config_supported}
332 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
333 %endif
334
335 # Default to GLES 2.0 if not specified.
336 %{!?target_gles_version: %define target_gles_version 20}
337
338 #--enable-efl=no \ # only affects dali-adaptor-uv
339 #--enable-appfw=yes \ # affects both dali-adaptor & dali-adaptor-uv
340 #--with-libuv=/usr/include/node/ \ # only affects dali-adaptor-uv
341
342
343 # Set up the build via configure.
344 #######################################################################
345 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
346 # if mobile || "undefined"
347 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
348 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
349            --enable-shaderbincache=DISABLE --enable-profile=MOBILE \
350            --enable-tizen-major-version=%{tizen_version_major} \
351 %if 0%{?tizen_version_major} >= 3
352            --enable-feedback \
353 %endif
354            --enable-videoplayer \
355 %if 0%{?tizen_2_2_compatibility}
356            --with-tizen-2-2-compatibility \
357 %endif
358 %if %{with wayland}
359            --enable-efl=no \
360 %else
361            --enable-efl=yes \
362 %endif
363 %if 0%{?enable_debug}
364            --enable-debug \
365 %endif
366            --enable-appfw=yes \
367            --with-libuv=/usr/include/node/ \
368            $configure_flags --libdir=%{_libdir}
369
370 # Build.
371 make %{?jobs:-j%jobs}
372
373 pushd %{_builddir}/%{name}-%{version}/build/tizen
374 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
375 popd
376
377 pushd %{buildroot}%{_libdir}
378 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
379 popd
380
381 %endif
382
383 #######################################################################
384 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
385 # if tv ||"undefined"
386 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
387 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
388            --enable-shaderbincache=DISABLE --enable-profile=TV \
389            --enable-tizen-major-version=%{tizen_version_major} \
390 %if 0%{?tizen_version_major} >= 3
391            --enable-feedback \
392 %endif
393            --enable-videoplayer \
394 %if 0%{?tizen_2_2_compatibility}
395            --with-tizen-2-2-compatibility \
396 %endif
397 %if %{with wayland}
398            --enable-efl=no \
399 %else
400            --enable-efl=yes \
401 %endif
402 %if 0%{?enable_debug}
403            --enable-debug \
404 %endif
405            --enable-appfw=yes \
406            --with-libuv=/usr/include/node/ \
407            $configure_flags --libdir=%{_libdir}
408
409 # Build.
410 make %{?jobs:-j%jobs}
411
412 pushd %{_builddir}/%{name}-%{version}/build/tizen
413 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
414 popd
415
416 pushd %{buildroot}%{_libdir}
417 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
418 popd
419
420 %endif
421
422 #######################################################################
423 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
424 # if wearable || "undefined"
425 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
426 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
427            --enable-shaderbincache=DISABLE --enable-profile=WEARABLE \
428            --enable-tizen-major-version=%{tizen_version_major} \
429 %if 0%{?tizen_version_major} >= 3
430            --enable-feedback \
431 %endif
432            --enable-videoplayer \
433 %if 0%{?tizen_2_2_compatibility}
434            --with-tizen-2-2-compatibility \
435 %endif
436 %if %{with wayland}
437            --enable-efl=no \
438 %else
439            --enable-efl=yes \
440 %endif
441 %if 0%{?enable_debug}
442            --enable-debug \
443 %endif
444            --enable-appfw=yes \
445            --with-libuv=/usr/include/node/ \
446            $configure_flags --libdir=%{_libdir}
447
448 # Build.
449 make %{?jobs:-j%jobs}
450
451 pushd %{_builddir}/%{name}-%{version}/build/tizen
452 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
453 popd
454
455 pushd %{buildroot}%{_libdir}
456 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
457 popd
458
459 %endif
460
461 #######################################################################
462 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
463 # if ivi ||"undefined"
464 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
465 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
466            --enable-shaderbincache=DISABLE --enable-profile=IVI \
467            --enable-tizen-major-version=%{tizen_version_major} \
468 %if 0%{?tizen_version_major} >= 3
469            --enable-feedback \
470 %endif
471            --enable-videoplayer \
472 %if 0%{?tizen_2_2_compatibility}
473            --with-tizen-2-2-compatibility \
474 %endif
475 %if %{with wayland}
476            --enable-efl=no \
477 %else
478            --enable-efl=yes \
479 %endif
480 %if 0%{?enable_debug}
481            --enable-debug \
482 %endif
483            --enable-appfw=yes \
484            --with-libuv=/usr/include/node/ \
485            $configure_flags --libdir=%{_libdir}
486
487 # Build.
488 make %{?jobs:-j%jobs}
489
490 pushd %{_builddir}/%{name}-%{version}/build/tizen
491 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
492 popd
493
494 pushd %{buildroot}%{_libdir}
495 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
496 popd
497
498 %endif
499
500 #######################################################################
501 # common ( build dali_videoplayer_plugin for common uses )
502 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
503 # if common ||"undefined"
504 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
505 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
506            --enable-shaderbincache=DISABLE --enable-profile=COMMON \
507            --enable-tizen-major-version=%{tizen_version_major} \
508 %if 0%{?tizen_version_major} >= 3
509            --enable-feedback \
510 %endif
511            --enable-videoplayer \
512 %if 0%{?tizen_2_2_compatibility}
513            --with-tizen-2-2-compatibility \
514 %endif
515 %if %{with wayland}
516            --enable-efl=no \
517 %else
518            --enable-efl=yes \
519 %endif
520 %if 0%{?enable_debug}
521            --enable-debug \
522 %endif
523            --enable-appfw=yes \
524            --with-libuv=/usr/include/node/ \
525            $configure_flags --libdir=%{_libdir}
526
527 # Build.
528 make %{?jobs:-j%jobs}
529 %endif
530
531
532 ##############################
533 # Installation
534 ##############################
535 %install
536 rm -rf %{buildroot}
537
538 pushd %{_builddir}/%{name}-%{version}/build/tizen
539 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
540
541
542 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
543 # !unified && (wearable || tv || ivi || mobile)
544 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
545 rm -rf %{buildroot}%{_libdir}/libdali-adap*.so*
546 %endif
547
548 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
549 # wearable || tv || ivi || mobile || unified
550 %if "%{?profile}" != "common"
551 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
552 %endif
553 popd
554
555 ##############################
556 # Upgrade order:
557 # 1 - Pre Install new package
558 # 2 - Install new package
559 # 3 - Post install new package
560 # 4 - Pre uninstall old package
561 # 5 - Remove files not overwritten by new package
562 # 6 - Post uninstall old package
563 ##############################
564
565 %pre
566 exit 0
567
568 ##############################
569 #  Post Install new package
570 ##############################
571 %post
572 /sbin/ldconfig
573 exit 0
574
575 ##############################
576 #  Pre Uninstall old package
577 ##############################
578 %preun
579 exit 0
580
581 ##############################
582 #  Post Uninstall old package
583 ##############################
584 %postun
585 /sbin/ldconfig
586 exit 0
587
588 %if %{with wayland}
589 %post dali-video-player-plugin
590 /sbin/ldconfig
591 exit 0
592 %endif
593
594 %if %{with wayland}
595 %postun dali-video-player-plugin
596 /sbin/ldconfig
597 exit 0
598 %endif
599
600
601 ##############################
602
603 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
604 # if mobile || "undefined"
605 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
606 %post profile_mobile
607 pushd %{_libdir}
608 for FILE in libdali-adap*.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
609 popd
610 /sbin/ldconfig
611 exit 0
612
613 %postun profile_mobile
614 /sbin/ldconfig
615 exit 0
616 %endif
617
618 ##############################
619
620 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
621 # if tv ||"undefined"
622 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
623 %post profile_tv
624 pushd %{_libdir}
625 for FILE in libdali-adap*.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
626 popd
627 /sbin/ldconfig
628 exit 0
629
630 %postun profile_tv
631 /sbin/ldconfig
632 exit 0
633 %endif
634
635 ##############################
636
637 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
638 # if wearable || "undefined"
639 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
640 %post profile_wearable
641 pushd %{_libdir}
642 for FILE in libdali-adap*.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
643 popd
644 /sbin/ldconfig
645 exit 0
646
647 %postun profile_wearable
648 /sbin/ldconfig
649 exit 0
650 %endif
651
652 ##############################
653
654 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
655 # if ivi ||"undefined"
656 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
657 %post profile_ivi
658 pushd %{_libdir}
659 for FILE in libdali-adap*.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
660 popd
661 /sbin/ldconfig
662 exit 0
663
664 %postun profile_ivi
665 /sbin/ldconfig
666 exit 0
667 %endif
668
669
670 ##############################
671 # Files in Binary Packages
672 ##############################
673
674 %files
675 %manifest dali-adaptor.manifest
676 %defattr(-,root,root,-)
677 %defattr(-,app,app,-)
678 %dir %{user_shader_cache_dir}
679 %{_bindir}/*
680 %license LICENSE
681
682 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
683 # if common ||"undefined"
684 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
685 %defattr(-,root,root,-)
686 %{_libdir}/libdali-adap*.so*
687 %exclude %{_libdir}/libdali-adap*.so*.mobile
688 %exclude %{_libdir}/libdali-adap*.so*.wearable
689 %exclude %{_libdir}/libdali-adap*.so*.tv
690 %exclude %{_libdir}/libdali-adap*.so*.ivi
691 %endif
692
693 %if %{with wayland}
694 %files dali-video-player-plugin
695 %manifest dali-adaptor.manifest
696 %defattr(-,root,root,-)
697 %{_libdir}/libdali-video-player-plugin.so*
698 %license LICENSE
699 %endif
700
701 %if 0%{?tizen_version_major} >= 3
702 %files dali-feedback-plugin
703 %manifest dali-adaptor.manifest
704 %defattr(-,root,root,-)
705 %{_libdir}/libdali-feedback-plugin.so*
706 %{dali_plugin_sound_files}/*
707 %endif
708
709 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
710 # if common ||"undefined"
711 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
712 %files profile_common
713 # default .so files are housed in the main pkg.
714 %endif
715
716 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
717 # if mobile || "undefined"
718 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
719 %files profile_mobile
720 %manifest dali-adaptor.manifest
721 %defattr(-,root,root,-)
722 %{_libdir}/libdali-adap*.so*.mobile
723 %endif
724
725 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
726 # if tv ||"undefined"
727 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
728 %files profile_tv
729 %manifest dali-adaptor.manifest
730 %defattr(-,root,root,-)
731 %{_libdir}/libdali-adap*.so*.tv
732 %endif
733
734 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
735 # if wearable || "undefined"
736 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
737 %files profile_wearable
738 %manifest dali-adaptor.manifest
739 %defattr(-,root,root,-)
740 %{_libdir}/libdali-adap*.so*.wearable
741 %endif
742
743 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
744 # if ivi ||"undefined"
745 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
746 %files profile_ivi
747 %manifest dali-adaptor.manifest
748 %defattr(-,root,root,-)
749 %{_libdir}/libdali-adap*.so*.ivi
750 %endif
751
752
753 %files devel
754 %defattr(-,root,root,-)
755 %{dev_include_path}/dali/dali.h
756 %{dev_include_path}/dali/public-api/*
757 %{dev_include_path}/dali/devel-api/*
758 %{dev_include_path}/dali/doc/*
759 %{_libdir}/pkgconfig/dali-adaptor.pc
760 %{_libdir}/pkgconfig/dali-adaptor-uv.pc
761
762 %files integration-devel
763 %defattr(-,root,root,-)
764 %{dev_include_path}/dali/integration-api/adaptors/*
765 %{_libdir}/pkgconfig/dali-adaptor-integration.pc