Revert "[Tizen] Remove profile build dependencies" 29/125429/1
authorJinho, Lee <jeano.lee@samsung.com>
Mon, 17 Apr 2017 02:24:58 +0000 (11:24 +0900)
committerJinho, Lee <jeano.lee@samsung.com>
Mon, 17 Apr 2017 02:25:02 +0000 (11:25 +0900)
This reverts commit 5bf94fd5ba42d49860aad404701af236cb563f1c.

Change-Id: I13dad867a3ccd6bfb30625af7a567a7c8eda0fde

packaging/dali-adaptor.spec

index 4d67380..578b23b 100644 (file)
@@ -9,11 +9,6 @@
 # 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
 
@@ -44,15 +39,56 @@ BuildRequires:  pkgconfig(libtzplatform-config)
 %define profile %{tizen_profile_name}
 %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"
+%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)
 BuildRequires:  pkgconfig(capi-appfw-watch-application)
 BuildRequires:  pkgconfig(appcore-watch)
+%define gles_requirement_setup 1
 %endif
 
-BuildRequires:  pkgconfig(gles20)
+%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(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
@@ -72,8 +108,11 @@ BuildRequires:  pkgconfig(egl)
 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
@@ -86,7 +125,10 @@ 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
@@ -116,104 +158,16 @@ BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(capi-system-system-settings)
 
-# for feedback plugin
-BuildRequires:  pkgconfig(mm-sound)
-BuildRequires:  pkgconfig(deviced)
-BuildRequires:  libfeedback-devel
-
-# for videoplayer Plugin
-BuildRequires:  pkgconfig(capi-media-player)
+%if 0%{?over_tizen_2_2}
+BuildRequires:  pkgconfig(capi-system-info)
+%endif
 
 
-# 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
-%define dali_feedback_plugin_mobile 0
-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
-%define dali_feedback_plugin_tv 0
-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
-%define dali_feedback_plugin_wearable 0
-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
-%define dali_feedback_plugin_ivi 0
-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 dali_feedback_plugin_common 0
-%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
 ##############################
@@ -240,101 +194,19 @@ Integration development package for the Adaptor - headers for integrating with a
 ##############################
 # Dali Feedback Plugin
 ##############################
-
 %package dali-feedback-plugin
 Summary:    Plugin to play haptic and audio feedback for Dali
 Group:      System/Libraries
-Requires:   %{name} = %{version}-%{release}
-Requires:   %{name}-dali-feedback-plugin-compat = %{version}-%{release}
-Recommends: %{name}-dali-feedback-plugin-profile_common = %{version}-%{release}
-%description dali-feedback-plugin
-eedback plugin to play haptic and audio feedback for Dali
-
-# 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 dali-feedback-plugin-profile_mobile
-Summary:    Plugin to play haptic and audio feedback for Dali profile mobile.
-Group:      System/Libraries
-%if 0%{?dali_feedback_plugin_mobile}
-Provides:      %{name}-dali-feedback-plugin-compat = %{version}-%{release}
-Conflicts:     %{name}-dali-feedback-plugin-profile_ivi
-Conflicts:     %{name}-dali-feedback-plugin-profile_wearable
-Conflicts:     %{name}-dali-feedback-plugin-profile_tv
-Conflicts:     %{name}-dali-feedback-plugin-profile_common
-%endif
-%description dali-feedback-plugin-profile_mobile
-Feedback plugin to play haptic and audio feedback for Dali profile 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 dali-feedback-plugin-profile_tv
-Summary:    Plugin to play haptic and audio feedback for Dali profile tv.
-Group:      System/Libraries
-%if 0%{?dali_feedback_plugin_tv}
-Provides:      %{name}-dali-feedback-plugin-compat = %{version}-%{release}
-Conflicts:     %{name}-dali-feedback-plugin-profile_ivi
-Conflicts:     %{name}-dali-feedback-plugin-profile_wearable
-Conflicts:     %{name}-dali-feedback-plugin-profile_mobile
-Conflicts:     %{name}-dali-feedback-plugin-profile_common
-%endif
-%description dali-feedback-plugin-profile_tv
-Feedback plugin to play haptic and audio feedback for Dali profile 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 dali-feedback-plugin-profile_wearable
-Summary:    Plugin to play haptic and audio feedback for Dali profile wearable.
-Group:      System/Libraries
-%if 0%{?dali_feedback_plugin_wearable}
-Provides:      %{name}-dali-feedback-plugin-compat = %{version}-%{release}
-Conflicts:     %{name}-dali-feedback-plugin-profile_ivi
-Conflicts:     %{name}-dali-feedback-plugin-profile_tv
-Conflicts:     %{name}-dali-feedback-plugin-profile_mobile
-Conflicts:     %{name}-dali-feedback-plugin-profile_common
-%endif
-%description dali-feedback-plugin-profile_wearable
-Feedback plugin to play haptic and audio feedback for Dali profile 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 dali-feedback-plugin-profile_ivi
-Summary:    Plugin to play haptic and audio feedback for Dali profile ivi.
-Group:      System/Libraries
-%if 0%{?dali_feedback_plugin_ivi}
-Provides:      %{name}-dali-feedback-plugin-compat = %{version}-%{release}
-Conflicts:     %{name}-dali-feedback-plugin-profile_wearable
-Conflicts:     %{name}-dali-feedback-plugin-profile_tv
-Conflicts:     %{name}-dali-feedback-plugin-profile_mobile
-Conflicts:     %{name}-dali-feedback-plugin-profile_common
-%endif
-%description dali-feedback-plugin-profile_ivi
-Feedback plugin to play haptic and audio feedback for Dali profile 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"
-%package dali-feedback-plugin-profile_common
-Summary:    Plugin to play haptic and audio feedback for Dali profile common.
-Group:      System/Libraries
-%if 0%{?dali_feedback_plugin_common}
-Provides:      %{name}-dali-feedback-plugin-compat = %{version}-%{release}
-Conflicts:     %{name}-dali-feedback-plugin-profile_wearable
-Conflicts:     %{name}-dali-feedback-plugin-profile_tv
-Conflicts:     %{name}-dali-feedback-plugin-profile_mobile
-Conflicts:     %{name}-dali-feedback-plugin-profile_ivi
-%endif
-%description dali-feedback-plugin-profile_common
-Feedback plugin to play haptic and audio feedback for Dali profile common.
+%if 0%{?dali_feedback_plugin}
+#Requires:       libdeviced
+BuildRequires:  pkgconfig(mm-sound)
+#BuildRequires:  pkgconfig(haptic)
+BuildRequires:  libfeedback-devel
 %endif
 
+%description dali-feedback-plugin
+Feedback plugin to play haptic and audio feedback for Dali
+
 ##############################
 # Dali VideoPlayer Plugin
 ##############################
@@ -343,6 +215,10 @@ Feedback plugin to play haptic and audio feedback for Dali profile common.
 %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
@@ -420,60 +296,16 @@ TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TI
 #--with-libuv=/usr/include/node/ \ # only affects dali-adaptor-uv
 
 # Set up the build via configure.
-#######################################################################
-# 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%{?dali_feedback_plugin_mobile}
+%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \
+%if 0%{?dali_feedback_plugin}
            --enable-feedback \
 %endif
-%if 0%{?tizen_2_2_compatibility}
-           --with-tizen-2-2-compatibility \
-%endif
+%if 0%{?dali_videoplayer_plugin}
            --enable-videoplayer \
-%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
-%if 0%{?dali_feedback_plugin_mobile}
-for FILE in libdali-feedback-plugin.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
-%endif
-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=ENABLE --enable-profile=TV \
-%if 0%{?dali_feedback_plugin_tv}
-           --enable-feedback \
 %endif
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
 %endif
-           --enable-videoplayer \
 %if %{with wayland}
            --enable-efl=no \
 %else
@@ -489,157 +321,14 @@ popd
 # 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
-%if 0%{?dali_feedback_plugin_tv}
-for FILE in libdali-feedback-plugin.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
-%endif
-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%{?dali_feedback_plugin_wearable}
-           --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
-%if 0%{?dali_feedback_plugin_wearable}
-for FILE in libdali-feedback-plugin.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
-%endif
-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%{?dali_feedback_plugin_ivi}
-           --enable-feedback \
-%endif
-%if 0%{?tizen_2_2_compatibility}
-           --with-tizen-2-2-compatibility \
-%endif
-           --enable-videoplayer \
-%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
-%if 0%{?dali_feedback_plugin_ivi}
-for FILE in libdali-feedback-plugin.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
-%endif
-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%{?dali_feedback_plugin_common}
-           --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}
-
-pushd %{_builddir}/%{name}-%{version}/build/tizen
+cd 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*
-rm -rf %{buildroot}%{_libdir}/libdali-feedback-plugin.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
-
-mkdir -p %{buildroot}/usr/share/license
-cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
 
 ##############################
 # Upgrade order:
@@ -655,160 +344,53 @@ cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{
 exit 0
 
 ##############################
-#  Post, Preun, Postun Install new package
+#  Post Install new package
 ##############################
 %post
 /sbin/ldconfig
 exit 0
 
-%preun
-exit 0
-
-%postun
+%if 0%{?dali_feedback_plugin}
+%post dali-feedback-plugin
 /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
 
 ##############################
-
-# 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
-
-%if 0%{?dali_feedback_plugin_mobile}
-%post dali-feedback-plugin-profile_mobile
-pushd %{_libdir}
-for FILE in libdali-feedback-plugin.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
-popd
-/sbin/ldconfig
-exit 0
-%endif
-
-%if 0%{?dali_feedback_plugin_mobile}
-%postun dali-feedback-plugin-profile_mobile
-/sbin/ldconfig
-exit 0
-%endif
-%endif
-
+#   Pre Uninstall old package
 ##############################
-
-# 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
-
-%postun profile_tv
-/sbin/ldconfig
-exit 0
-
-%if 0%{?dali_feedback_plugin_tv}
-%post dali-feedback-plugin-profile_tv
-pushd %{_libdir}
-for FILE in libdali-feedback-plugin.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
-popd
-/sbin/ldconfig
+%preun
 exit 0
-%endif
-
-%if 0%{?dali_feedback_plugin_tv}
-%postun dali-feedback-plugin-profile_tv
-/sbin/ldconfig
-exit 0
-%endif
-%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"
-%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
-
-%if 0%{?dali_feedback_plugin_wearable}
-%post dali-feedback-plugin-profile_wearable
-pushd %{_libdir}
-for FILE in libdali-feedback-plugin.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
-popd
-/sbin/ldconfig
-exit 0
-%endif
-
-%if 0%{?dali_feedback_plugin_wearable}
-%postun dali-feedback-plugin-profile_wearable
-/sbin/ldconfig
-exit 0
-%endif
-%endif
-
+#   Post Uninstall old package
 ##############################
-
-# 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
+%postun
 /sbin/ldconfig
 exit 0
 
-%if 0%{?dali_feedback_plugin_ivi}
-%post dali-feedback-plugin-profile_ivi
-pushd %{_libdir}
-for FILE in libdali-feedback-plugin.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
-popd
+%if 0%{?dali_feedback_plugin}
+%postun dali-feedback-plugin
 /sbin/ldconfig
 exit 0
 %endif
 
-%if 0%{?dali_feedback_plugin_ivi}
-%postun dali-feedback-plugin-profile_ivi
+%if %{with wayland}
+%if 0%{?dali_videoplayer_plugin}
+%postun dali-video-player-plugin
 /sbin/ldconfig
 exit 0
 %endif
 %endif
 
-
 ##############################
 # Files in Binary Packages
 ##############################
@@ -816,126 +398,11 @@ exit 0
 %files
 %manifest dali-adaptor.manifest
 %defattr(-,root,root,-)
+%{_libdir}/libdali-adap*.so*
 %defattr(-,app,app,-)
 %dir %{user_shader_cache_dir}
 %{_bindir}/*
-%{_datadir}/license/%{name}
-# 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,-)
-%{_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
-
-%if %{with wayland}
-%files dali-video-player-plugin
-%manifest dali-adaptor.manifest
-%defattr(-,root,root,-)
-%{_libdir}/libdali-video-player-plugin.so*
-%endif
-
-%files dali-feedback-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"
-%if 0%{?dali_feedback_plugin_common}
-%manifest dali-adaptor.manifest
-%defattr(-,root,root,-)
-%{_libdir}/libdali-feedback-plugin.so*
-%exclude %{_libdir}/libdali-feedback-plugin.so*.mobile
-%exclude %{_libdir}/libdali-feedback-plugin.so*.wearable
-%exclude %{_libdir}/libdali-feedback-plugin.so*.tv
-%exclude %{_libdir}/libdali-feedback-plugin.so*.ivi
-%endif
-%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"
-%files profile_common
-# default .so files are housed in the main pkg.
-
-%if 0%{?dali_feedback_plugin_common}
-%files dali-feedback-plugin-profile_common
-# default .so files are housed in the main pkg.
-%manifest dali-adaptor.manifest
-%defattr(-,root,root,-)
-%{dali_plugin_sound_files}/*
-%endif
-%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-adap*.so*.mobile
-
-%if 0%{?dali_feedback_plugin_mobile}
-%files dali-feedback-plugin-profile_mobile
-%manifest dali-adaptor.manifest
-%defattr(-,root,root,-)
-%{_libdir}/libdali-feedback-plugin.so*.mobile
-%{dali_plugin_sound_files}/*
-%endif
-%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
-
-%if 0%{?dali_feedback_plugin_tv}
-%files dali-feedback-plugin-profile_tv
-%manifest dali-adaptor.manifest
-%defattr(-,root,root,-)
-%{_libdir}/libdali-feedback-plugin.so*.tv
-%{dali_plugin_sound_files}/*
-%endif
-%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
-
-%if 0%{?dali_feedback_plugin_wearable}
-%files dali-feedback-plugin-profile_wearable
-%manifest dali-adaptor.manifest
-%defattr(-,root,root,-)
-%{_libdir}/libdali-feedback-plugin.so*.wearable
-%{dali_plugin_sound_files}/*
-%endif
-%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
-
-%if 0%{?dali_feedback_plugin_ivi}
-%files dali-feedback-plugin-profile_ivi
-%manifest dali-adaptor.manifest
-%defattr(-,root,root,-)
-%{_libdir}/libdali-feedback-plugin.so*.ivi
-%{dali_plugin_sound_files}/*
-%endif
-%endif
-
+%license LICENSE
 
 %files devel
 %defattr(-,root,root,-)
@@ -950,3 +417,20 @@ exit 0
 %defattr(-,root,root,-)
 %{dev_include_path}/dali/integration-api/adaptors/*
 %{_libdir}/pkgconfig/dali-adaptor-integration.pc
+
+%if 0%{?dali_feedback_plugin}
+%files dali-feedback-plugin
+%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
+%manifest dali-adaptor.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libdali-video-player-plugin.so*
+%license LICENSE
+%endif
+%endif