[Tizen] Replace aul_rsm with screen_connector_provider and enable for only wearable...
[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.44
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(deviced)
122 BuildRequires:  libfeedback-devel
123
124 # for videoplayer Plugin
125 BuildRequires:  pkgconfig(capi-media-player)
126
127
128 # for multiprofile
129 Requires:   %{name}-compat = %{version}-%{release}
130 Recommends: %{name}-profile_common = %{version}-%{release}
131
132 %description
133 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
134 platform abstraction and application shell
135
136 ###########################################
137 # Dali adapter for profiles
138 ###########################################
139
140 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
141 # if mobile || "undefined"
142 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
143 %package profile_mobile
144 %define dali_feedback_plugin_mobile 0
145 Summary:        The DALi Tizen Adaptor for mobile
146 Provides:       %{name}-compat = %{version}-%{release}
147 Conflicts:      %{name}-profile_tv
148 Conflicts:      %{name}-profile_wearable
149 Conflicts:      %{name}-profile_ivi
150 Conflicts:      %{name}-profile_common
151 %description profile_mobile
152 The DALi Tizen Adaptor for mobile.
153 %endif
154
155 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
156 # if tv ||"undefined"
157 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
158 %package profile_tv
159 %define dali_feedback_plugin_tv 0
160 Summary:        The DALi Tizen Adaptor for tv
161 Provides:       %{name}-compat = %{version}-%{release}
162 Conflicts:      %{name}-profile_mobile
163 Conflicts:      %{name}-profile_wearable
164 Conflicts:      %{name}-profile_ivi
165 Conflicts:      %{name}-profile_common
166 %description profile_tv
167 The DALi Tizen Adaptor for tv.
168 %endif
169
170 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
171 # if wearable || "undefined"
172 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
173 %package profile_wearable
174 %define dali_feedback_plugin_wearable 0
175 Summary:        The DALi Tizen Adaptor for wearable
176 Provides:       %{name}-compat = %{version}-%{release}
177 Conflicts:      %{name}-profile_mobile
178 Conflicts:      %{name}-profile_tv
179 Conflicts:      %{name}-profile_ivi
180 Conflicts:      %{name}-profile_common
181 %description profile_wearable
182 The DALi Tizen Adaptor for wearable.
183 %endif
184
185 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
186 # if ivi ||"undefined"
187 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
188 %package profile_ivi
189 %define dali_feedback_plugin_ivi 0
190 Summary:        The DALi Tizen Adaptor for ivi
191 Provides:       %{name}-compat = %{version}-%{release}
192 Conflicts:      %{name}-profile_mobile
193 Conflicts:      %{name}-profile_wearable
194 Conflicts:      %{name}-profile_tv
195 Conflicts:      %{name}-profile_common
196 %description profile_ivi
197 The DALi Tizen Adaptor for ivi.
198 %endif
199
200 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
201 # if common ||"undefined"
202 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
203 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
204 %package profile_common
205 %define dali_feedback_plugin_common 0
206 %define tizen_2_2_compatibility 0
207 Summary:  The DALi Tizen Adaptor for common
208 Provides:       %{name}-compat = %{version}-%{release}
209 Conflicts:      %{name}-profile_mobile
210 Conflicts:      %{name}-profile_wearable
211 Conflicts:      %{name}-profile_tv
212 Conflicts:      %{name}-profile_ivi
213 %description profile_common
214 The DALi Tizen Adaptor for common.
215 %endif
216
217 ##############################
218 # devel
219 ##############################
220 %package devel
221 Summary:    Development components for the DALi Tizen Adaptor
222 Group:      Development/Building
223 Requires:   %{name} = %{version}-%{release}
224 Requires:   %{name}-integration-devel = %{version}-%{release}
225
226 %description devel
227 Development components for the DALi Tizen Adaptor - public headers and package configs
228
229 ##############################
230 # integration-devel
231 ##############################
232 %package integration-devel
233 Summary:    Integration development package for the Adaptor
234 Group:      Development/Building
235 Requires:   %{name} = %{version}-%{release}
236
237 %description integration-devel
238 Integration development package for the Adaptor - headers for integrating with an adaptor library.
239
240 ##############################
241 # Dali Feedback Plugin
242 ##############################
243
244 %package dali-feedback-plugin
245 Summary:    Plugin to play haptic and audio feedback for Dali
246 Group:      System/Libraries
247 Requires:   %{name} = %{version}-%{release}
248 Requires:   %{name}-dali-feedback-plugin-compat = %{version}-%{release}
249 Recommends: %{name}-dali-feedback-plugin-profile_common = %{version}-%{release}
250 %description dali-feedback-plugin
251 eedback plugin to play haptic and audio feedback for Dali
252
253 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
254 # if mobile || "undefined"
255 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
256 %package dali-feedback-plugin-profile_mobile
257 Summary:    Plugin to play haptic and audio feedback for Dali profile mobile.
258 Group:      System/Libraries
259 %if 0%{?dali_feedback_plugin_mobile}
260 Provides:       %{name}-dali-feedback-plugin-compat = %{version}-%{release}
261 Conflicts:      %{name}-dali-feedback-plugin-profile_ivi
262 Conflicts:      %{name}-dali-feedback-plugin-profile_wearable
263 Conflicts:      %{name}-dali-feedback-plugin-profile_tv
264 Conflicts:      %{name}-dali-feedback-plugin-profile_common
265 %endif
266 %description dali-feedback-plugin-profile_mobile
267 Feedback plugin to play haptic and audio feedback for Dali profile mobile.
268 %endif
269
270 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
271 # if tv ||"undefined"
272 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
273 %package dali-feedback-plugin-profile_tv
274 Summary:    Plugin to play haptic and audio feedback for Dali profile tv.
275 Group:      System/Libraries
276 %if 0%{?dali_feedback_plugin_tv}
277 Provides:       %{name}-dali-feedback-plugin-compat = %{version}-%{release}
278 Conflicts:      %{name}-dali-feedback-plugin-profile_ivi
279 Conflicts:      %{name}-dali-feedback-plugin-profile_wearable
280 Conflicts:      %{name}-dali-feedback-plugin-profile_mobile
281 Conflicts:      %{name}-dali-feedback-plugin-profile_common
282 %endif
283 %description dali-feedback-plugin-profile_tv
284 Feedback plugin to play haptic and audio feedback for Dali profile tv.
285 %endif
286
287 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
288 # if wearable || "undefined"
289 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
290 %package dali-feedback-plugin-profile_wearable
291 Summary:    Plugin to play haptic and audio feedback for Dali profile wearable.
292 Group:      System/Libraries
293 %if 0%{?dali_feedback_plugin_wearable}
294 Provides:       %{name}-dali-feedback-plugin-compat = %{version}-%{release}
295 Conflicts:      %{name}-dali-feedback-plugin-profile_ivi
296 Conflicts:      %{name}-dali-feedback-plugin-profile_tv
297 Conflicts:      %{name}-dali-feedback-plugin-profile_mobile
298 Conflicts:      %{name}-dali-feedback-plugin-profile_common
299 %endif
300 %description dali-feedback-plugin-profile_wearable
301 Feedback plugin to play haptic and audio feedback for Dali profile wearable.
302 %endif
303
304 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
305 # if ivi ||"undefined"
306 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
307 %package dali-feedback-plugin-profile_ivi
308 Summary:    Plugin to play haptic and audio feedback for Dali profile ivi.
309 Group:      System/Libraries
310 %if 0%{?dali_feedback_plugin_ivi}
311 Provides:       %{name}-dali-feedback-plugin-compat = %{version}-%{release}
312 Conflicts:      %{name}-dali-feedback-plugin-profile_wearable
313 Conflicts:      %{name}-dali-feedback-plugin-profile_tv
314 Conflicts:      %{name}-dali-feedback-plugin-profile_mobile
315 Conflicts:      %{name}-dali-feedback-plugin-profile_common
316 %endif
317 %description dali-feedback-plugin-profile_ivi
318 Feedback plugin to play haptic and audio feedback for Dali profile ivi.
319 %endif
320
321 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
322 # if common ||"undefined"
323 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
324 %package dali-feedback-plugin-profile_common
325 Summary:    Plugin to play haptic and audio feedback for Dali profile common.
326 Group:      System/Libraries
327 %if 0%{?dali_feedback_plugin_common}
328 Provides:       %{name}-dali-feedback-plugin-compat = %{version}-%{release}
329 Conflicts:      %{name}-dali-feedback-plugin-profile_wearable
330 Conflicts:      %{name}-dali-feedback-plugin-profile_tv
331 Conflicts:      %{name}-dali-feedback-plugin-profile_mobile
332 Conflicts:      %{name}-dali-feedback-plugin-profile_ivi
333 %endif
334 %description dali-feedback-plugin-profile_common
335 Feedback plugin to play haptic and audio feedback for Dali profile common.
336 %endif
337
338 ##############################
339 # Dali VideoPlayer Plugin
340 ##############################
341 %if %{with wayland}
342
343 %package dali-video-player-plugin
344 Summary:    Plugin to play a video file for Dali
345 Group:      System/Libraries
346 %description dali-video-player-plugin
347 VideoPlayer plugin to play a video file for Dali
348 %endif
349
350 ##############################
351 # Preparation
352 ##############################
353 %prep
354 %setup -q
355
356 #Use TZ_PATH when tizen version is 3.x or greater
357
358 %if 0%{?tizen_version_major} >= 3
359 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
360 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
361 %define font_preloaded_path      %TZ_SYS_RO_SHARE/fonts/
362 %define font_downloaded_path     %TZ_SYS_SHARE/fonts/
363 %define font_application_path    %TZ_SYS_RO_SHARE/app_fonts/
364 %define font_configuration_file  %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf
365 %else
366 %define dali_data_rw_dir         /usr/share/dali/
367 %define dali_data_ro_dir         /usr/share/dali/
368 %define font_preloaded_path      /usr/share/fonts/
369 %define font_downloaded_path     /opt/share/fonts/
370 %define font_application_path    /usr/share/app_fonts/
371 %define font_configuration_file  /opt/etc/fonts/conf.avail/99-slp.conf
372 %endif
373
374 %define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
375 %define dali_plugin_sound_files  %{dali_data_ro_dir}/plugins/sounds/
376 %define dev_include_path %{_includedir}
377
378 ##############################
379 # Build
380 ##############################
381 %build
382 PREFIX+="/usr"
383 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
384 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
385
386 %ifarch %{arm}
387 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
388 %endif
389
390 %if %{with wayland}
391 CFLAGS+=" -DWAYLAND"
392 CXXFLAGS+=" -DWAYLAND"
393 configure_flags="--enable-wayland"
394 %endif
395
396 %if 0%{?tizen_2_2_compatibility}
397 CFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
398 CXXFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
399 %endif
400
401 libtoolize --force
402 cd %{_builddir}/%{name}-%{version}/build/tizen
403 autoreconf --install
404
405 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
406 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"  ; export DALI_DATA_RO_DIR
407 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
408 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
409 FONT_APPLICATION_PATH="%{font_application_path}"  ; export FONT_APPLICATION_PATH
410 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
411 %if 0%{?tizen_platform_config_supported}
412 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
413 %endif
414
415 # Default to GLES 2.0 if not specified.
416 %{!?target_gles_version: %define target_gles_version 20}
417
418 #--enable-efl=no \ # only affects dali-adaptor-uv
419 #--enable-appfw=yes \ # affects both dali-adaptor & dali-adaptor-uv
420 #--with-libuv=/usr/include/node/ \ # only affects dali-adaptor-uv
421
422 # Set up the build via configure.
423 #######################################################################
424 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
425 # if mobile || "undefined"
426 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
427 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
428            --enable-shaderbincache=DISABLE --enable-profile=MOBILE \
429 %if 0%{?dali_feedback_plugin_mobile}
430            --enable-feedback \
431 %endif
432 %if 0%{?tizen_2_2_compatibility}
433            --with-tizen-2-2-compatibility \
434 %endif
435            --enable-videoplayer \
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.mobile"; done
457 %if 0%{?dali_feedback_plugin_mobile}
458 for FILE in libdali-feedback-plugin.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
459 %endif
460 popd
461
462 %endif
463
464 #######################################################################
465 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
466 # if tv ||"undefined"
467 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
468 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
469            --enable-shaderbincache=ENABLE --enable-profile=TV \
470 %if 0%{?dali_feedback_plugin_tv}
471            --enable-feedback \
472 %endif
473 %if 0%{?tizen_2_2_compatibility}
474            --with-tizen-2-2-compatibility \
475 %endif
476            --enable-videoplayer \
477 %if %{with wayland}
478            --enable-efl=no \
479 %else
480            --enable-efl=yes \
481 %endif
482 %if 0%{?enable_debug}
483            --enable-debug \
484 %endif
485            --enable-appfw=yes \
486            --with-libuv=/usr/include/node/ \
487            $configure_flags --libdir=%{_libdir}
488
489 # Build.
490 make %{?jobs:-j%jobs}
491
492 pushd %{_builddir}/%{name}-%{version}/build/tizen
493 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
494 popd
495
496 pushd %{buildroot}%{_libdir}
497 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
498 %if 0%{?dali_feedback_plugin_tv}
499 for FILE in libdali-feedback-plugin.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
500 %endif
501 popd
502
503 %endif
504
505 #######################################################################
506 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
507 # if wearable || "undefined"
508 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
509 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
510            --enable-shaderbincache=DISABLE --enable-profile=WEARABLE \
511 %if 0%{?dali_feedback_plugin_wearable}
512            --enable-feedback \
513 %endif
514            --enable-videoplayer \
515 %if 0%{?tizen_2_2_compatibility}
516            --with-tizen-2-2-compatibility \
517 %endif
518 %if %{with wayland}
519            --enable-efl=no \
520 %else
521            --enable-efl=yes \
522 %endif
523 %if 0%{?enable_debug}
524            --enable-debug \
525 %endif
526            --enable-appfw=yes \
527            --with-libuv=/usr/include/node/ \
528            $configure_flags --libdir=%{_libdir}
529
530 # Build.
531 make %{?jobs:-j%jobs}
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 popd
536
537 pushd %{buildroot}%{_libdir}
538 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
539 %if 0%{?dali_feedback_plugin_wearable}
540 for FILE in libdali-feedback-plugin.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
541 %endif
542 popd
543
544 %endif
545
546 #######################################################################
547 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
548 # if ivi ||"undefined"
549 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
550 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
551            --enable-shaderbincache=DISABLE --enable-profile=IVI \
552 %if 0%{?dali_feedback_plugin_ivi}
553            --enable-feedback \
554 %endif
555 %if 0%{?tizen_2_2_compatibility}
556            --with-tizen-2-2-compatibility \
557 %endif
558            --enable-videoplayer \
559 %if %{with wayland}
560            --enable-efl=no \
561 %else
562            --enable-efl=yes \
563 %endif
564 %if 0%{?enable_debug}
565            --enable-debug \
566 %endif
567            --enable-appfw=yes \
568            --with-libuv=/usr/include/node/ \
569            $configure_flags --libdir=%{_libdir}
570
571 # Build.
572 make %{?jobs:-j%jobs}
573
574 pushd %{_builddir}/%{name}-%{version}/build/tizen
575 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
576 popd
577
578 pushd %{buildroot}%{_libdir}
579 for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
580 %if 0%{?dali_feedback_plugin_ivi}
581 for FILE in libdali-feedback-plugin.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
582 %endif
583 popd
584
585 %endif
586
587 #######################################################################
588 # common ( build dali_videoplayer_plugin for common uses )
589 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
590 # if common ||"undefined"
591 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
592 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
593            --enable-shaderbincache=DISABLE --enable-profile=COMMON \
594 %if 0%{?dali_feedback_plugin_common}
595            --enable-feedback \
596 %endif
597            --enable-videoplayer \
598 %if 0%{?tizen_2_2_compatibility}
599            --with-tizen-2-2-compatibility \
600 %endif
601 %if %{with wayland}
602            --enable-efl=no \
603 %else
604            --enable-efl=yes \
605 %endif
606 %if 0%{?enable_debug}
607            --enable-debug \
608 %endif
609            --enable-appfw=yes \
610            --with-libuv=/usr/include/node/ \
611            $configure_flags --libdir=%{_libdir}
612
613 # Build.
614 make %{?jobs:-j%jobs}
615 %endif
616
617
618 ##############################
619 # Installation
620 ##############################
621 %install
622 rm -rf %{buildroot}
623
624 pushd %{_builddir}/%{name}-%{version}/build/tizen
625 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
626
627 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
628 # !unified && (wearable || tv || ivi || mobile)
629 %if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
630 rm -rf %{buildroot}%{_libdir}/libdali-adap*.so*
631 rm -rf %{buildroot}%{_libdir}/libdali-feedback-plugin.so*
632 %endif
633
634 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
635 # wearable || tv || ivi || mobile || unified
636 %if "%{?profile}" != "common"
637 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
638 %endif
639 popd
640
641 mkdir -p %{buildroot}/usr/share/license
642 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
643
644 ##############################
645 # Upgrade order:
646 # 1 - Pre Install new package
647 # 2 - Install new package
648 # 3 - Post install new package
649 # 4 - Pre uninstall old package
650 # 5 - Remove files not overwritten by new package
651 # 6 - Post uninstall old package
652 ##############################
653
654 %pre
655 exit 0
656
657 ##############################
658 #  Post, Preun, Postun Install new package
659 ##############################
660 %post
661 /sbin/ldconfig
662 exit 0
663
664 %preun
665 exit 0
666
667 %postun
668 /sbin/ldconfig
669 exit 0
670
671 %if %{with wayland}
672 %post dali-video-player-plugin
673 /sbin/ldconfig
674 exit 0
675 %endif
676
677 %if %{with wayland}
678 %postun dali-video-player-plugin
679 /sbin/ldconfig
680 exit 0
681 %endif
682
683 ##############################
684
685 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
686 # if mobile || "undefined"
687 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
688 %post profile_mobile
689 pushd %{_libdir}
690 for FILE in libdali-adap*.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
691 popd
692 /sbin/ldconfig
693 exit 0
694
695 %postun profile_mobile
696 /sbin/ldconfig
697 exit 0
698
699 %if 0%{?dali_feedback_plugin_mobile}
700 %post dali-feedback-plugin-profile_mobile
701 pushd %{_libdir}
702 for FILE in libdali-feedback-plugin.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
703 popd
704 /sbin/ldconfig
705 exit 0
706 %endif
707
708 %if 0%{?dali_feedback_plugin_mobile}
709 %postun dali-feedback-plugin-profile_mobile
710 /sbin/ldconfig
711 exit 0
712 %endif
713 %endif
714
715 ##############################
716
717 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
718 # if tv ||"undefined"
719 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
720 %post profile_tv
721 pushd %{_libdir}
722 for FILE in libdali-adap*.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
723 popd
724 /sbin/ldconfig
725 exit 0
726
727 %postun profile_tv
728 /sbin/ldconfig
729 exit 0
730
731 %if 0%{?dali_feedback_plugin_tv}
732 %post dali-feedback-plugin-profile_tv
733 pushd %{_libdir}
734 for FILE in libdali-feedback-plugin.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
735 popd
736 /sbin/ldconfig
737 exit 0
738 %endif
739
740 %if 0%{?dali_feedback_plugin_tv}
741 %postun dali-feedback-plugin-profile_tv
742 /sbin/ldconfig
743 exit 0
744 %endif
745 %endif
746
747 ##############################
748
749 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
750 # if wearable || "undefined"
751 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
752 %post profile_wearable
753 pushd %{_libdir}
754 for FILE in libdali-adap*.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
755 popd
756 /sbin/ldconfig
757 exit 0
758
759 %postun profile_wearable
760 /sbin/ldconfig
761 exit 0
762
763 %if 0%{?dali_feedback_plugin_wearable}
764 %post dali-feedback-plugin-profile_wearable
765 pushd %{_libdir}
766 for FILE in libdali-feedback-plugin.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
767 popd
768 /sbin/ldconfig
769 exit 0
770 %endif
771
772 %if 0%{?dali_feedback_plugin_wearable}
773 %postun dali-feedback-plugin-profile_wearable
774 /sbin/ldconfig
775 exit 0
776 %endif
777 %endif
778
779 ##############################
780
781 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
782 # if ivi ||"undefined"
783 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
784 %post profile_ivi
785 pushd %{_libdir}
786 for FILE in libdali-adap*.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
787 popd
788 /sbin/ldconfig
789 exit 0
790
791 %postun profile_ivi
792 /sbin/ldconfig
793 exit 0
794
795 %if 0%{?dali_feedback_plugin_ivi}
796 %post dali-feedback-plugin-profile_ivi
797 pushd %{_libdir}
798 for FILE in libdali-feedback-plugin.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
799 popd
800 /sbin/ldconfig
801 exit 0
802 %endif
803
804 %if 0%{?dali_feedback_plugin_ivi}
805 %postun dali-feedback-plugin-profile_ivi
806 /sbin/ldconfig
807 exit 0
808 %endif
809 %endif
810
811
812 ##############################
813 # Files in Binary Packages
814 ##############################
815
816 %files
817 %manifest dali-adaptor.manifest
818 %defattr(-,root,root,-)
819 %defattr(-,app,app,-)
820 %dir %{user_shader_cache_dir}
821 %{_bindir}/*
822 %{_datadir}/license/%{name}
823 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
824 # if common ||"undefined"
825 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
826 %defattr(-,root,root,-)
827 %{_libdir}/libdali-adap*.so*
828 %exclude %{_libdir}/libdali-adap*.so*.mobile
829 %exclude %{_libdir}/libdali-adap*.so*.wearable
830 %exclude %{_libdir}/libdali-adap*.so*.tv
831 %exclude %{_libdir}/libdali-adap*.so*.ivi
832 %endif
833
834 %if %{with wayland}
835 %files dali-video-player-plugin
836 %manifest dali-adaptor.manifest
837 %defattr(-,root,root,-)
838 %{_libdir}/libdali-video-player-plugin.so*
839 %endif
840
841 %files dali-feedback-plugin
842 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
843 # if common ||"undefined"
844 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
845 %if 0%{?dali_feedback_plugin_common}
846 %manifest dali-adaptor.manifest
847 %defattr(-,root,root,-)
848 %{_libdir}/libdali-feedback-plugin.so*
849 %exclude %{_libdir}/libdali-feedback-plugin.so*.mobile
850 %exclude %{_libdir}/libdali-feedback-plugin.so*.wearable
851 %exclude %{_libdir}/libdali-feedback-plugin.so*.tv
852 %exclude %{_libdir}/libdali-feedback-plugin.so*.ivi
853 %endif
854 %endif
855
856 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
857 # if common ||"undefined"
858 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
859 %files profile_common
860 # default .so files are housed in the main pkg.
861
862 %if 0%{?dali_feedback_plugin_common}
863 %files dali-feedback-plugin-profile_common
864 # default .so files are housed in the main pkg.
865 %manifest dali-adaptor.manifest
866 %defattr(-,root,root,-)
867 %{dali_plugin_sound_files}/*
868 %endif
869 %endif
870
871 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
872 # if mobile || "undefined"
873 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
874 %files profile_mobile
875 %manifest dali-adaptor.manifest
876 %defattr(-,root,root,-)
877 %{_libdir}/libdali-adap*.so*.mobile
878
879 %if 0%{?dali_feedback_plugin_mobile}
880 %files dali-feedback-plugin-profile_mobile
881 %manifest dali-adaptor.manifest
882 %defattr(-,root,root,-)
883 %{_libdir}/libdali-feedback-plugin.so*.mobile
884 %{dali_plugin_sound_files}/*
885 %endif
886 %endif
887
888 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
889 # if tv ||"undefined"
890 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
891 %files profile_tv
892 %manifest dali-adaptor.manifest
893 %defattr(-,root,root,-)
894 %{_libdir}/libdali-adap*.so*.tv
895
896 %if 0%{?dali_feedback_plugin_tv}
897 %files dali-feedback-plugin-profile_tv
898 %manifest dali-adaptor.manifest
899 %defattr(-,root,root,-)
900 %{_libdir}/libdali-feedback-plugin.so*.tv
901 %{dali_plugin_sound_files}/*
902 %endif
903 %endif
904
905 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
906 # if wearable || "undefined"
907 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
908 %files profile_wearable
909 %manifest dali-adaptor.manifest
910 %defattr(-,root,root,-)
911 %{_libdir}/libdali-adap*.so*.wearable
912
913 %if 0%{?dali_feedback_plugin_wearable}
914 %files dali-feedback-plugin-profile_wearable
915 %manifest dali-adaptor.manifest
916 %defattr(-,root,root,-)
917 %{_libdir}/libdali-feedback-plugin.so*.wearable
918 %{dali_plugin_sound_files}/*
919 %endif
920 %endif
921
922 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
923 # if ivi ||"undefined"
924 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
925 %files profile_ivi
926 %manifest dali-adaptor.manifest
927 %defattr(-,root,root,-)
928 %{_libdir}/libdali-adap*.so*.ivi
929
930 %if 0%{?dali_feedback_plugin_ivi}
931 %files dali-feedback-plugin-profile_ivi
932 %manifest dali-adaptor.manifest
933 %defattr(-,root,root,-)
934 %{_libdir}/libdali-feedback-plugin.so*.ivi
935 %{dali_plugin_sound_files}/*
936 %endif
937 %endif
938
939
940 %files devel
941 %defattr(-,root,root,-)
942 %{dev_include_path}/dali/dali.h
943 %{dev_include_path}/dali/public-api/*
944 %{dev_include_path}/dali/devel-api/*
945 %{dev_include_path}/dali/doc/*
946 %{_libdir}/pkgconfig/dali-adaptor.pc
947 %{_libdir}/pkgconfig/dali-adaptor-uv.pc
948
949 %files integration-devel
950 %defattr(-,root,root,-)
951 %{dev_include_path}/dali/integration-api/adaptors/*
952 %{_libdir}/pkgconfig/dali-adaptor-integration.pc