Remove profile build dependencies and deviced library 55/126555/5
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 24 Apr 2017 05:05:23 +0000 (14:05 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 7 Jun 2017 10:27:42 +0000 (19:27 +0900)
- From Tizen 4.0, profile dependent build is not allowed.
  So, removed profile macro in .spec file.
- Added backward-compatibility with some esceptions
- Feedback-plugin enabled for Unified profile build

Change-Id: I3c55879ee13ef2f0e082484a35de7f1a8c8fe124
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
build/tizen/adaptor/Makefile.am
build/tizen/plugins/Makefile.am
build/tizen/plugins/configure.ac
packaging/dali-adaptor.spec
plugins/dali-feedback.cpp
plugins/dali-feedback.h

index 95def1978e41312ab6990a8c6d60f73e2631802f..75eb325c0c0ee8cf2d053bad0ad3a625988e34fe 100644 (file)
@@ -493,7 +493,7 @@ endif
 if WEARABLE_PROFILE
 libdali_adaptor_la_CXXFLAGS += \
                       $(HAPTIC_CFLAGS) \
-                      $(EFL_ASSIST_CFLAGS)
+                      $(EFL_ASSIST_CFLAGS) \
                       $(APPCORE_WATCH_CFLAGS)
 
 libdali_adaptor_la_LIBADD += \
index 2fb8f35ba2dc25d4a21cdb9abb2ab4c0358c54b5..5944acd6427a8a3181496c5de5b0ad169332f61b 100644 (file)
@@ -56,6 +56,7 @@ libdali_feedback_plugin_la_CXXFLAGS = -DDALI_COMPILATION \
                       -I../../../adaptors/public-api \
                       -I../../../adaptors/integration-api \
                       -I../../../adaptors/public-api/adaptor-framework \
+                      -I../../../adaptors/devel-api/adaptor-framework \
                       -Werror -Wall
 
 libdali_feedback_plugin_la_LIBADD = \
@@ -65,30 +66,6 @@ libdali_feedback_plugin_la_LIBADD = \
 libdali_feedback_plugin_la_LDFLAGS = \
                       -rdynamic
 
-if MOBILE_PROFILE
-libdali_feedback_plugin_la_CXXFLAGS += \
-                      $(DEVICED_CFLAGS)
-
-libdali_feedback_plugin_la_LIBADD += \
-                      $(DEVICED_LIBS)
-endif
-
-if TV_PROFILE
-libdali_feedback_plugin_la_CXXFLAGS += \
-                      $(HAPTIC_CFLAGS)
-
-libdali_feedback_plugin_la_LIBADD += \
-                      $(HAPTIC_LIBS)
-endif
-
-if COMMON_PROFILE
-libdali_feedback_plugin_la_CXXFLAGS += \
-                      $(HAPTIC_CFLAGS)
-
-libdali_feedback_plugin_la_LIBADD += \
-                      $(HAPTIC_LIBS)
-endif
-
 libdali_feedback_plugin_la_LIBADD += \
                       $(FEEDBACK_LIBS)
 
index b8088b2ec1dfc30fa0e5f4099fae79858b1b6323..3bd8eb9a9c006166f47c90e4aa6bcd7997999a79 100644 (file)
@@ -35,18 +35,12 @@ fi # enable_videoplayer
 fi # enable_wayland
 
 if test "x$enable_feedback" = "xyes"; then
-
-if test "x$enable_profile" = "xCOMMON" || test "x$enable_profile" = "xTV"; then
-PKG_CHECK_MODULES(HAPTIC, haptic)
-fi
-
-if test "x$enable_profile" = "xMOBILE"; then
-PKG_CHECK_MODULES(DEVICED, deviced)
-fi
+if test "x$enable_profile" != "xUBUNTU"; then
 
 PKG_CHECK_MODULES(FEEDBACK, feedback)
 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
 
+fi # check UNBUNTU
 fi # enable_feedback
 
 AC_CONFIG_FILES(Makefile)
index 6233fe33cde4c9dd728a0d38a94f041480750c58..5c76fc25215a61817f1e0eecdd677fbc53501b0d 100644 (file)
@@ -9,6 +9,11 @@
 # performing a gbs build ( use gbs build -v to see it download location) E.g.
 # http://download.tizen.org/snapshots/tizen/tv/tizen-tv/repos/arm-wayland/packages/repodata/xxxx-build.conf.gz
 
+# Do not provide .so automatically for the extensions.
+# This if statement is for backward compatibility with GBM/Obsolete build systems
+%if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%global __provides_exclude_from ^.*\\.(wearable|mobile|tv|ivi|common)$
+%endif
 
 %bcond_with wayland
 
@@ -39,56 +44,15 @@ BuildRequires:  pkgconfig(libtzplatform-config)
 %define profile %{tizen_profile_name}
 %endif
 
-%if "%{profile}" == "mobile"
-%define dali_profile MOBILE
-%define dali_feedback_plugin 0
-%define dali_videoplayer_plugin 1
-%define shaderbincache_flag DISABLE
-BuildRequires:  pkgconfig(gles20)
-%define gles_requirement_setup 1
-%endif
-
-%if "%{profile}" == "tv"
-%define dali_profile TV
-%define dali_feedback_plugin 0
-%define dali_videoplayer_plugin 1
-%define shaderbincache_flag DISABLE
-BuildRequires:  pkgconfig(glesv2)
-%define gles_requirement_setup 1
-%endif
-
-%if "%{profile}" == "wearable"
-%define dali_profile WEARABLE
-%define dali_feedback_plugin 0
-%define dali_videoplayer_plugin 1
-%define shaderbincache_flag DISABLE
-BuildRequires:  pkgconfig(gles20)
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 BuildRequires:  pkgconfig(capi-appfw-watch-application)
 BuildRequires:  pkgconfig(appcore-watch)
-%define gles_requirement_setup 1
 %endif
 
-%if "%{profile}" == "ivi"
-%define dali_profile IVI
-%define dali_feedback_plugin 0
-%define dali_videoplayer_plugin 1
-%define shaderbincache_flag DISABLE
-BuildRequires:  pkgconfig(glesv2)
-%define gles_requirement_setup 1
-%endif
-
-%if "%{profile}" == "common"
-%define dali_profile COMMON
-%define dali_feedback_plugin 0
-%define dali_videoplayer_plugin 1
-%define tizen_2_2_compatibility 0
-%define shaderbincache_flag DISABLE
+BuildRequires:  pkgconfig(gles20)
 BuildRequires:  pkgconfig(glesv2)
-%define gles_requirement_setup 1
-%endif
-
-# If we have not set a BuildRequires for the gles version, default it here.
-%{!?gles_requirement_setup: BuildRequires:  pkgconfig(glesv2)}
 
 BuildRequires:  pkgconfig
 BuildRequires:  gawk
@@ -109,10 +73,8 @@ BuildRequires:  libcurl-devel
 BuildRequires:  pkgconfig(harfbuzz)
 BuildRequires:  fribidi-devel
 
-%if 0%{?tizen_2_2_compatibility} != 1
 BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(capi-system-sensor)
-%endif
 
 # Tizen currently does not have libuv as a separate libuv package
 # So we have to look into the uv headers bundled inside node-js
@@ -125,10 +87,7 @@ BuildRequires:  nodejs-devel
 BuildRequires:  pkgconfig(wayland-egl)
 BuildRequires:  pkgconfig(wayland-client)
 BuildRequires:  wayland-devel
-# Currently Tizen Common we use does not have wayland extensions like xdg-shell
-%if "%{profile}" != "common"
 BuildRequires:  wayland-extension-client-devel
-%endif
 
 # dali-adaptor-uv uses libuv mainloop and has its own wayland client (it needs wayland-client headers).
 BuildRequires:  libxkbcommon-devel
@@ -158,16 +117,100 @@ BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(capi-system-system-settings)
 
-%if 0%{?over_tizen_2_2}
-BuildRequires:  pkgconfig(capi-system-info)
+# for feedback plugin
+BuildRequires:  pkgconfig(mm-sound)
+%if 0%{?tizen_version_major} >= 3
+BuildRequires:  pkgconfig(feedback)
 %endif
 
+# for videoplayer Plugin
+BuildRequires:  pkgconfig(capi-media-player)
+
 
+# for multiprofile
+Requires:   %{name}-compat = %{version}-%{release}
+Recommends: %{name}-profile_common = %{version}-%{release}
 
 %description
 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
 platform abstraction and application shell
 
+###########################################
+# Dali adapter for profiles
+###########################################
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%package profile_mobile
+Summary:        The DALi Tizen Adaptor for mobile
+Provides:       %{name}-compat = %{version}-%{release}
+Conflicts:      %{name}-profile_tv
+Conflicts:      %{name}-profile_wearable
+Conflicts:      %{name}-profile_ivi
+Conflicts:      %{name}-profile_common
+%description profile_mobile
+The DALi Tizen Adaptor for mobile.
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%package profile_tv
+Summary:        The DALi Tizen Adaptor for tv
+Provides:       %{name}-compat = %{version}-%{release}
+Conflicts:      %{name}-profile_mobile
+Conflicts:      %{name}-profile_wearable
+Conflicts:      %{name}-profile_ivi
+Conflicts:      %{name}-profile_common
+%description profile_tv
+The DALi Tizen Adaptor for tv.
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%package profile_wearable
+Summary:        The DALi Tizen Adaptor for wearable
+Provides:       %{name}-compat = %{version}-%{release}
+Conflicts:      %{name}-profile_mobile
+Conflicts:      %{name}-profile_tv
+Conflicts:      %{name}-profile_ivi
+Conflicts:      %{name}-profile_common
+%description profile_wearable
+The DALi Tizen Adaptor for wearable.
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+%package profile_ivi
+Summary:        The DALi Tizen Adaptor for ivi
+Provides:       %{name}-compat = %{version}-%{release}
+Conflicts:      %{name}-profile_mobile
+Conflicts:      %{name}-profile_wearable
+Conflicts:      %{name}-profile_tv
+Conflicts:      %{name}-profile_common
+%description profile_ivi
+The DALi Tizen Adaptor for ivi.
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if common ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+# Currently Tizen Common we use does not have wayland extensions like xdg-shell
+%package profile_common
+%define tizen_2_2_compatibility 0
+Summary:        The DALi Tizen Adaptor for common
+Provides:       %{name}-compat = %{version}-%{release}
+Conflicts:      %{name}-profile_mobile
+Conflicts:      %{name}-profile_wearable
+Conflicts:      %{name}-profile_tv
+Conflicts:      %{name}-profile_ivi
+%description profile_common
+The DALi Tizen Adaptor for common.
+%endif
+
 ##############################
 # devel
 ##############################
@@ -197,13 +240,7 @@ Integration development package for the Adaptor - headers for integrating with a
 %package dali-feedback-plugin
 Summary:    Plugin to play haptic and audio feedback for Dali
 Group:      System/Libraries
-%if 0%{?dali_feedback_plugin}
-#Requires:       libdeviced
-BuildRequires:  pkgconfig(mm-sound)
-#BuildRequires:  pkgconfig(haptic)
-BuildRequires:  libfeedback-devel
-%endif
-
+Requires:   %{name} = %{version}-%{release}
 %description dali-feedback-plugin
 Feedback plugin to play haptic and audio feedback for Dali
 
@@ -215,10 +252,6 @@ Feedback plugin to play haptic and audio feedback for Dali
 %package dali-video-player-plugin
 Summary:    Plugin to play a video file for Dali
 Group:      System/Libraries
-%if 0%{?dali_videoplayer_plugin}
-BuildRequires:  pkgconfig(capi-media-player)
-%endif
-
 %description dali-video-player-plugin
 VideoPlayer plugin to play a video file for Dali
 %endif
@@ -248,7 +281,7 @@ VideoPlayer plugin to play a video file for Dali
 %endif
 
 %define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
-%define dali_plugin_sound_files  %{dali_data_ro_dir}/plugins/sounds/
+%define dali_plugin_sound_files  /plugins/sounds/
 %define dev_include_path %{_includedir}
 
 ##############################
@@ -295,14 +328,56 @@ TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TI
 #--enable-appfw=yes \ # affects both dali-adaptor & dali-adaptor-uv
 #--with-libuv=/usr/include/node/ \ # only affects dali-adaptor-uv
 
+
 # Set up the build via configure.
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \
-%if 0%{?dali_feedback_plugin}
+#######################################################################
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+           --enable-shaderbincache=DISABLE --enable-profile=MOBILE \
+%if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
-%if 0%{?dali_videoplayer_plugin}
            --enable-videoplayer \
+%if 0%{?tizen_2_2_compatibility}
+           --with-tizen-2-2-compatibility \
+%endif
+%if %{with wayland}
+           --enable-efl=no \
+%else
+           --enable-efl=yes \
 %endif
+%if 0%{?enable_debug}
+           --enable-debug \
+%endif
+           --enable-appfw=yes \
+           --with-libuv=/usr/include/node/ \
+           $configure_flags --libdir=%{_libdir}
+
+# Build.
+make %{?jobs:-j%jobs}
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+popd
+
+pushd %{buildroot}%{_libdir}
+for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
+popd
+
+%endif
+
+#######################################################################
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+           --enable-shaderbincache=DISABLE --enable-profile=TV \
+%if 0%{?tizen_version_major} >= 3
+           --enable-feedback \
+%endif
+           --enable-videoplayer \
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
 %endif
@@ -321,15 +396,146 @@ TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TI
 # Build.
 make %{?jobs:-j%jobs}
 
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+popd
+
+pushd %{buildroot}%{_libdir}
+for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
+popd
+
+%endif
+
+#######################################################################
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+           --enable-shaderbincache=DISABLE --enable-profile=WEARABLE \
+%if 0%{?tizen_version_major} >= 3
+           --enable-feedback \
+%endif
+           --enable-videoplayer \
+%if 0%{?tizen_2_2_compatibility}
+           --with-tizen-2-2-compatibility \
+%endif
+%if %{with wayland}
+           --enable-efl=no \
+%else
+           --enable-efl=yes \
+%endif
+%if 0%{?enable_debug}
+           --enable-debug \
+%endif
+           --enable-appfw=yes \
+           --with-libuv=/usr/include/node/ \
+           $configure_flags --libdir=%{_libdir}
+
+# Build.
+make %{?jobs:-j%jobs}
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+popd
+
+pushd %{buildroot}%{_libdir}
+for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
+popd
+
+%endif
+
+#######################################################################
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+           --enable-shaderbincache=DISABLE --enable-profile=IVI \
+%if 0%{?tizen_version_major} >= 3
+           --enable-feedback \
+%endif
+           --enable-videoplayer \
+%if 0%{?tizen_2_2_compatibility}
+           --with-tizen-2-2-compatibility \
+%endif
+%if %{with wayland}
+           --enable-efl=no \
+%else
+           --enable-efl=yes \
+%endif
+%if 0%{?enable_debug}
+           --enable-debug \
+%endif
+           --enable-appfw=yes \
+           --with-libuv=/usr/include/node/ \
+           $configure_flags --libdir=%{_libdir}
+
+# Build.
+make %{?jobs:-j%jobs}
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+popd
+
+pushd %{buildroot}%{_libdir}
+for FILE in libdali-adap*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
+popd
+
+%endif
+
+#######################################################################
+# common ( build dali_videoplayer_plugin for common uses )
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if common ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+           --enable-shaderbincache=DISABLE --enable-profile=COMMON \
+%if 0%{?tizen_version_major} >= 3
+           --enable-feedback \
+%endif
+           --enable-videoplayer \
+%if 0%{?tizen_2_2_compatibility}
+           --with-tizen-2-2-compatibility \
+%endif
+%if %{with wayland}
+           --enable-efl=no \
+%else
+           --enable-efl=yes \
+%endif
+%if 0%{?enable_debug}
+           --enable-debug \
+%endif
+           --enable-appfw=yes \
+           --with-libuv=/usr/include/node/ \
+           $configure_flags --libdir=%{_libdir}
+
+# Build.
+make %{?jobs:-j%jobs}
+%endif
+
+
 ##############################
 # Installation
 ##############################
 %install
 rm -rf %{buildroot}
-cd build/tizen
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
 
 
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# !unified && (wearable || tv || ivi || mobile)
+%if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
+rm -rf %{buildroot}%{_libdir}/libdali-adap*.so*
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# wearable || tv || ivi || mobile || unified
+%if "%{?profile}" != "common"
+for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
+%endif
+popd
+
 ##############################
 # Upgrade order:
 # 1 - Pre Install new package
@@ -350,47 +556,101 @@ exit 0
 /sbin/ldconfig
 exit 0
 
-%if 0%{?dali_feedback_plugin}
-%post dali-feedback-plugin
+##############################
+#  Pre Uninstall old package
+##############################
+%preun
+exit 0
+
+##############################
+#  Post Uninstall old package
+##############################
+%postun
 /sbin/ldconfig
 exit 0
-%endif
 
 %if %{with wayland}
-%if 0%{?dali_videoplayer_plugin}
 %post dali-video-player-plugin
 /sbin/ldconfig
 exit 0
 %endif
+
+%if %{with wayland}
+%postun dali-video-player-plugin
+/sbin/ldconfig
+exit 0
 %endif
 
+
 ##############################
-#   Pre Uninstall old package
-##############################
-%preun
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%post profile_mobile
+pushd %{_libdir}
+for FILE in libdali-adap*.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
+popd
+/sbin/ldconfig
 exit 0
 
+%postun profile_mobile
+/sbin/ldconfig
+exit 0
+%endif
+
 ##############################
-#   Post Uninstall old package
-##############################
-%postun
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%post profile_tv
+pushd %{_libdir}
+for FILE in libdali-adap*.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
+popd
 /sbin/ldconfig
 exit 0
 
-%if 0%{?dali_feedback_plugin}
-%postun dali-feedback-plugin
+%postun profile_tv
 /sbin/ldconfig
 exit 0
 %endif
 
-%if %{with wayland}
-%if 0%{?dali_videoplayer_plugin}
-%postun dali-video-player-plugin
+##############################
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%post profile_wearable
+pushd %{_libdir}
+for FILE in libdali-adap*.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
+popd
+/sbin/ldconfig
+exit 0
+
+%postun profile_wearable
 /sbin/ldconfig
 exit 0
 %endif
+
+##############################
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+%post profile_ivi
+pushd %{_libdir}
+for FILE in libdali-adap*.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
+popd
+/sbin/ldconfig
+exit 0
+
+%postun profile_ivi
+/sbin/ldconfig
+exit 0
 %endif
 
+
 ##############################
 # Files in Binary Packages
 ##############################
@@ -398,39 +658,92 @@ exit 0
 %files
 %manifest dali-adaptor.manifest
 %defattr(-,root,root,-)
-%{_libdir}/libdali-adap*.so*
 %defattr(-,app,app,-)
 %dir %{user_shader_cache_dir}
 %{_bindir}/*
 %license LICENSE
 
-%files devel
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if common ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
 %defattr(-,root,root,-)
-%{dev_include_path}/dali/dali.h
-%{dev_include_path}/dali/public-api/*
-%{dev_include_path}/dali/devel-api/*
-%{dev_include_path}/dali/doc/*
-%{_libdir}/pkgconfig/dali-adaptor.pc
-%{_libdir}/pkgconfig/dali-adaptor-uv.pc
+%{_libdir}/libdali-adap*.so*
+%exclude %{_libdir}/libdali-adap*.so*.mobile
+%exclude %{_libdir}/libdali-adap*.so*.wearable
+%exclude %{_libdir}/libdali-adap*.so*.tv
+%exclude %{_libdir}/libdali-adap*.so*.ivi
+%endif
 
-%files integration-devel
+%if %{with wayland}
+%files dali-video-player-plugin
+%manifest dali-adaptor.manifest
 %defattr(-,root,root,-)
-%{dev_include_path}/dali/integration-api/adaptors/*
-%{_libdir}/pkgconfig/dali-adaptor-integration.pc
+%{_libdir}/libdali-video-player-plugin.so*
+%license LICENSE
+%endif
 
-%if 0%{?dali_feedback_plugin}
+%if 0%{?tizen_version_major} >= 3
 %files dali-feedback-plugin
+%manifest dali-adaptor.manifest
 %defattr(-,root,root,-)
 %{_libdir}/libdali-feedback-plugin.so*
 %{dali_plugin_sound_files}/*
 %endif
 
-%if %{with wayland}
-%if 0%{?dali_videoplayer_plugin}
-%files dali-video-player-plugin
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if common ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%files profile_common
+# default .so files are housed in the main pkg.
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%files profile_mobile
 %manifest dali-adaptor.manifest
 %defattr(-,root,root,-)
-%{_libdir}/libdali-video-player-plugin.so*
-%license LICENSE
+%{_libdir}/libdali-adap*.so*.mobile
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%files profile_tv
+%manifest dali-adaptor.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libdali-adap*.so*.tv
 %endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%files profile_wearable
+%manifest dali-adaptor.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libdali-adap*.so*.wearable
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+%files profile_ivi
+%manifest dali-adaptor.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libdali-adap*.so*.ivi
 %endif
+
+
+%files devel
+%defattr(-,root,root,-)
+%{dev_include_path}/dali/dali.h
+%{dev_include_path}/dali/public-api/*
+%{dev_include_path}/dali/devel-api/*
+%{dev_include_path}/dali/doc/*
+%{_libdir}/pkgconfig/dali-adaptor.pc
+%{_libdir}/pkgconfig/dali-adaptor-uv.pc
+
+%files integration-devel
+%defattr(-,root,root,-)
+%{dev_include_path}/dali/integration-api/adaptors/*
+%{_libdir}/pkgconfig/dali-adaptor-integration.pc
index 14ae6448252c7d625d4441d3e1512936f5672678..99fb1be4d829855d6119bafde743c0a95cdf5402 100644 (file)
@@ -47,86 +47,25 @@ namespace Plugin
 {
 
 DaliFeedback::DaliFeedback()
-: mHapticInitialized( false )
 {
   feedback_initialize();
-
-  if( 0 == haptic_open( HAPTIC_DEVICE_0, &mDeviceHandle ) )
-  {
-    mHapticInitialized = true;
-  }
-  else
-  {
-    DEBUG_PRINTF( "Haptic feedback controller failed to initialize\n" );
-  }
 }
 
 DaliFeedback::~DaliFeedback()
 {
-  if( mHapticInitialized )
-  {
-    int errorCode = haptic_close( mDeviceHandle );
-    if( errorCode < 0 )
-    {
-      DEBUG_PRINTF( "device_haptic_close() failed with error code: %d\n", errorCode );
-    }
-  }
-
   feedback_deinitialize();
 }
 
 void DaliFeedback::PlayHaptic( const std::string& filePath )
 {
-  if( mHapticInitialized )
-  {
-    if ( filePath.size() == 0 )
-    {
-      DEBUG_PRINTF( "File Path can't be NULL!\n" );
-      return;
-    }
-
-    int errorCode = haptic_vibrate_file_with_detail( mDeviceHandle, filePath.c_str(), HAPTIC_ITERATION_ONCE, HAPTIC_FEEDBACK_AUTO, HAPTIC_PRIORITY_MIN, NULL );
-    if( errorCode != 0 )
-    {
-      DEBUG_PRINTF( "PlayHaptic() failed with error code: %d\n", errorCode );
-    }
-  }
-  else
-  {
-    DEBUG_PRINTF( "HapticPlayer is not Initialized\n" );
-  }
 }
 
 void DaliFeedback::PlayHapticMonotone( unsigned int duration )
 {
-  if( mHapticInitialized )
-  {
-    int errorCode = haptic_vibrate_monotone_with_detail( mDeviceHandle, duration, HAPTIC_FEEDBACK_AUTO, HAPTIC_PRIORITY_MIN, NULL );
-    if( errorCode != 0 )
-    {
-      DEBUG_PRINTF( "PlayHapticMonotone() failed with error code: %d\n", errorCode );
-    }
-  }
-  else
-  {
-    DEBUG_PRINTF( "HapticPlayer is not Initialized\n" );
-  }
 }
 
 void DaliFeedback::StopHaptic()
 {
-  if( mHapticInitialized )
-  {
-    int errorCode = haptic_stop_all_effects( mDeviceHandle );
-    if( errorCode != 0 )
-    {
-      DEBUG_PRINTF( "StopHaptic() failed with error code: %d\n", errorCode );
-    }
-  }
-  else
-  {
-    DEBUG_PRINTF( "HapticPlayer is not Initialized\n" );
-  }
 }
 
 int DaliFeedback::PlaySound( const std::string& fileName )
index c9967ec6bd768a56f7aa909b1c9f6a691d34b47a..0c598e22554c0fd46021260ecc9374f4155278fc 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#if defined(DALI_PROFILE_MOBILE)
-#include <dd-haptic.h>
-#else
-#include <haptic.h>
-#endif
-
 // INTERNAL INCLUDES
 #include <feedback-plugin.h>
 
@@ -83,12 +76,6 @@ public: // FeedbackPlugin overrides
    * @copydoc Dali::FeedbackPlugin::PlayFeedbackPattern()
    */
   void PlayFeedbackPattern( int type, int pattern );
-
-private:
-
-  haptic_device_h mDeviceHandle;
-
-  bool mHapticInitialized;
 };
 
 }  // namespace Plugin