DALi Version 1.5.0
[platform/core/uifw/dali-adaptor.git] / packaging / dali-adaptor.spec
index 997b1cf..e8acd9d 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.4.41
+Version:    1.5.0
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT
@@ -27,6 +27,12 @@ Source0:    %{name}-%{version}.tar.gz
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 Requires:       giflib
+Provides: libdali-adaptor-cxx11.so
+Provides: libdali-adaptor-cxx11.so.0
+Provides: libdali-adaptor-cxx11.so.0.0.0
+Provides: libdali-adaptor.so
+Provides: libdali-adaptor.so.0
+Provides: libdali-adaptor.so.0.0.0
 
 %define tizen_platform_config_supported 1
 BuildRequires:  pkgconfig(libtzplatform-config)
@@ -122,6 +128,7 @@ Conflicts:      %{name}-profile_tv
 Conflicts:      %{name}-profile_wearable
 Conflicts:      %{name}-profile_ivi
 Conflicts:      %{name}-profile_common
+Requires:       %{name}
 %description profile_mobile
 The DALi Tizen Adaptor for mobile.
 %endif
@@ -136,6 +143,7 @@ Conflicts:      %{name}-profile_mobile
 Conflicts:      %{name}-profile_wearable
 Conflicts:      %{name}-profile_ivi
 Conflicts:      %{name}-profile_common
+Requires:       %{name}
 %description profile_tv
 The DALi Tizen Adaptor for tv.
 %endif
@@ -150,6 +158,7 @@ Conflicts:      %{name}-profile_mobile
 Conflicts:      %{name}-profile_tv
 Conflicts:      %{name}-profile_ivi
 Conflicts:      %{name}-profile_common
+Requires:       %{name}
 %description profile_wearable
 The DALi Tizen Adaptor for wearable.
 %endif
@@ -164,6 +173,7 @@ Conflicts:      %{name}-profile_mobile
 Conflicts:      %{name}-profile_wearable
 Conflicts:      %{name}-profile_tv
 Conflicts:      %{name}-profile_common
+Requires:       %{name}
 %description profile_ivi
 The DALi Tizen Adaptor for ivi.
 %endif
@@ -179,6 +189,7 @@ Conflicts:      %{name}-profile_mobile
 Conflicts:      %{name}-profile_wearable
 Conflicts:      %{name}-profile_tv
 Conflicts:      %{name}-profile_ivi
+Requires:       %{name}
 %description profile_common
 The DALi Tizen Adaptor for common.
 %endif
@@ -233,7 +244,6 @@ Feedback plugin to play haptic and audio feedback for Dali
 
 %define user_shader_cache_dir    %{dali_data_ro_dir}/core/shaderbin/
 %define dali_plugin_sound_files  /plugins/sounds/
-%define dev_include_path %{_includedir}
 
 ##############################
 # Build
@@ -249,7 +259,7 @@ CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
 
 CFLAGS+=" -DWAYLAND"
 CXXFLAGS+=" -DWAYLAND"
-configure_flags=" -DENABLE_WAYLAND=ON"
+cmake_flags=" -DENABLE_WAYLAND=ON"
 
 # Use this conditional when Tizen version is 5.x or greater
 %if 0%{?tizen_version_major} >= 5
@@ -258,7 +268,19 @@ CXXFLAGS+=" -DOVER_TIZEN_VERSION_5"
 # Need Ecore-Wayland2 when Tizen version is 5.x or greater
 CFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
 CXXFLAGS+=" -DECORE_WAYLAND2 -DEFL_BETA_API_SUPPORT"
-configure_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
+cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
+%endif
+
+%if 0%{?enable_debug}
+cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
+%endif
+
+%if 0%{?enable_trace}
+cmake_flags+=" -DENABLE_TRACE=ON"
+%endif
+
+%if 0%{?enable_appfw}
+cmake_flags+=" -DUSE_APPFW"
 %endif
 
 libtoolize --force
@@ -274,6 +296,13 @@ FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION
 TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
 %endif
 
+cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$PREFIX"
+cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
+cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
+cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
+cmake_flags+=" -DENABLE_FEEDBACK=YES"
+cmake_flags+=" -DENABLE_APPFW=YES"
+
 # Set up the build via Cmake
 #######################################################################
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
@@ -283,22 +312,7 @@ TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TI
 mkdir mobile
 pushd mobile
 
-cmake \
-%if 0%{?enable_debug}
-      -DCMAKE_BUILD_TYPE=Debug \
-%endif
-%if 0%{?enable_trace}
-      -DENABLE_TRACE=ON \
-%endif
-      -DCMAKE_INSTALL_PREFIX=$PREFIX \
-      -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-      -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-      -DENABLE_PROFILE=MOBILE \
-      -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
-      -DENABLE_FEEDBACK=YES \
-      -DENABLE_APPFW=YES \
-      $configure_flags \
-      ..
+cmake -DENABLE_PROFILE=MOBILE $cmake_flags ..
 
 # Build.
 make %{?jobs:-j%jobs}
@@ -314,22 +328,7 @@ popd
 mkdir tv
 pushd tv
 
-cmake \
-%if 0%{?enable_debug}
-      -DCMAKE_BUILD_TYPE=Debug \
-%endif
-%if 0%{?enable_trace}
-      -DENABLE_TRACE=ON \
-%endif
-      -DCMAKE_INSTALL_PREFIX=$PREFIX \
-      -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-      -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-      -DENABLE_PROFILE=TV \
-      -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
-      -DENABLE_FEEDBACK=YES \
-      -DENABLE_APPFW=YES \
-      $configure_flags \
-      ..
+cmake -DENABLE_PROFILE=TV $cmake_flags ..
 
 # Build.
 make %{?jobs:-j%jobs}
@@ -345,22 +344,7 @@ popd
 mkdir wearable
 pushd wearable
 
-cmake \
-%if 0%{?enable_debug}
-      -DCMAKE_BUILD_TYPE=Debug \
-%endif
-%if 0%{?enable_trace}
-      -DENABLE_TRACE=ON \
-%endif
-      -DCMAKE_INSTALL_PREFIX=$PREFIX \
-      -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-      -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-      -DENABLE_PROFILE=WEARABLE \
-      -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
-      -DENABLE_FEEDBACK=YES \
-      -DENABLE_APPFW=YES \
-      $configure_flags \
-      ..
+cmake -DENABLE_PROFILE=WEARABLE $cmake_flags ..
 
 # Build.
 make %{?jobs:-j%jobs}
@@ -376,22 +360,7 @@ popd
 mkdir ivi
 pushd ivi
 
-cmake \
-%if 0%{?enable_debug}
-      -DCMAKE_BUILD_TYPE=Debug \
-%endif
-%if 0%{?enable_trace}
-      -DENABLE_TRACE=ON \
-%endif
-      -DCMAKE_INSTALL_PREFIX=$PREFIX \
-      -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-      -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-      -DENABLE_PROFILE=IVI \
-      -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
-      -DENABLE_FEEDBACK=YES \
-      -DENABLE_APPFW=YES \
-      $configure_flags \
-      ..
+cmake -DENABLE_PROFILE=IVI $cmake_flags ..
 
 # Build.
 make %{?jobs:-j%jobs}
@@ -408,22 +377,7 @@ popd
 mkdir common
 pushd common
 
-cmake \
-%if 0%{?enable_debug}
-      -DCMAKE_BUILD_TYPE=Debug \
-%endif
-%if 0%{?enable_trace}
-      -DENABLE_TRACE=ON \
-%endif
-      -DCMAKE_INSTALL_PREFIX=$PREFIX \
-      -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-      -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-      -DENABLE_PROFILE=COMMON \
-      -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major} \
-      -DENABLE_FEEDBACK=YES \
-      -DENABLE_APPFW=YES \
-      $configure_flags \
-      ..
+cmake -DENABLE_PROFILE=COMMON $cmake_flags ..
 
 # Build.
 make %{?jobs:-j%jobs}
@@ -443,10 +397,12 @@ pushd %{_builddir}/%{name}-%{version}/build/tizen
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 pushd mobile
 %make_install
+%if "%{?profile}" != "mobile"
 pushd  %{buildroot}%{_libdir}
-cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile
+cp libdali-adaptor.so.*.*.* libdali-adaptor.so.mobile # If we're only building this profile, then there's no need to copy the lib
 popd
-make clean # So that we can gather symbol/size information for only one profile
+make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
+%endif
 popd
 %endif
 
@@ -454,10 +410,12 @@ popd
 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
 pushd tv
 %make_install
+%if "%{?profile}" != "tv"
 pushd  %{buildroot}%{_libdir}
-cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv
+cp libdali-adaptor.so.*.*.* libdali-adaptor.so.tv # If we're only building this profile, then there's no need to copy the lib
 popd
-make clean # So that we can gather symbol/size information for only one profile
+make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
+%endif
 popd
 %endif
 
@@ -465,10 +423,12 @@ popd
 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 pushd wearable
 %make_install
+%if "%{?profile}" != "wearable"
 pushd  %{buildroot}%{_libdir}
-cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable
+cp libdali-adaptor.so.*.*.* libdali-adaptor.so.wearable # If we're only building this profile, then there's no need to copy the lib
 popd
-make clean # So that we can gather symbol/size information for only one profile
+make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
+%endif
 popd
 %endif
 
@@ -476,10 +436,12 @@ popd
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
 pushd ivi
 %make_install
+%if "%{?profile}" != "ivi"
 pushd  %{buildroot}%{_libdir}
-cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi
+cp libdali-adaptor.so.*.*.* libdali-adaptor.so.ivi # If we're only building this profile, then there's no need to copy the lib
 popd
-make clean # So that we can gather symbol/size information for only one profile
+make clean # So that we can gather symbol/size information for only one profile if we're building all profiles
+%endif
 popd
 %endif
 
@@ -498,6 +460,11 @@ ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0
 ln -sf libdali-adaptor.so libdali-adaptor-cxx11.so.0.0.0
 popd
 
+# Create a symbolic link in integration-api to preserve legacy repo build
+pushd %{buildroot}%{_includedir}/dali/integration-api
+ln -sf adaptor-framework adaptors
+popd
+
 ##############################
 # Upgrade order:
 # 1 - Pre Install new package
@@ -514,6 +481,9 @@ popd
 exit 0
 
 %post
+pushd %{_libdir}
+for i in mobile tv wearable ivi; do [[ -f libdali-adaptor.so.$i ]] && ln -sf libdali-adaptor.so.$i libdali-adaptor.so.0.0.0; done
+popd
 /sbin/ldconfig
 exit 0
 
@@ -527,11 +497,14 @@ exit 0
 ##############################
 # Mobile Profile Commands
 # if mobile || "undefined"
+# No need to create a symbolic link on install required if only building this profile
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 %post profile_mobile
+%if "%{?profile}" != "mobile"
 pushd %{_libdir}
 ln -sf libdali-adaptor.so.mobile libdali-adaptor.so.0.0.0
 popd
+%endif
 /sbin/ldconfig
 exit 0
 
@@ -542,11 +515,14 @@ exit 0
 
 ##############################
 # TV Profile Commands
+# No need to create a symbolic link on install required if only building this profile
 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
 %post profile_tv
+%if "%{?profile}" != "tv"
 pushd %{_libdir}
 ln -sf libdali-adaptor.so.tv libdali-adaptor.so.0.0.0
 popd
+%endif
 /sbin/ldconfig
 exit 0
 
@@ -557,11 +533,14 @@ exit 0
 
 ##############################
 # Wearable Profile Commands
+# No need to create a symbolic link on install required if only building this profile
 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 %post profile_wearable
+%if "%{?profile}" != "wearable"
 pushd %{_libdir}
 ln -sf libdali-adaptor.so.wearable libdali-adaptor.so.0.0.0
 popd
+%endif
 /sbin/ldconfig
 exit 0
 
@@ -572,11 +551,14 @@ exit 0
 
 ##############################
 # IVI Profile Commands
+# No need to create a symbolic link on install required if only building this profile
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
 %post profile_ivi
+%if "%{?profile}" != "ivi"
 pushd %{_libdir}
-ln -sf libdali-adaptor.ivi libdali-adaptor.so.0.0.0
+ln -sf libdali-adaptor.so.ivi libdali-adaptor.so.0.0.0
 popd
+%endif
 /sbin/ldconfig
 exit 0
 
@@ -637,42 +619,51 @@ exit 0
 %files profile_mobile
 %manifest dali-adaptor.manifest
 %defattr(-,root,root,-)
+%if "%{?profile}" != "mobile"
 %{_libdir}/libdali-adaptor.so.mobile
 %endif
+%endif
 
 # if tv ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
 %files profile_tv
 %manifest dali-adaptor.manifest
 %defattr(-,root,root,-)
+%if "%{?profile}" != "tv"
 %{_libdir}/libdali-adaptor.so.tv
 %endif
+%endif
 
 # if wearable || "undefined"
 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 %files profile_wearable
 %manifest dali-adaptor.manifest
 %defattr(-,root,root,-)
+%if "%{?profile}" != "wearable"
 %{_libdir}/libdali-adaptor.so.wearable
 %endif
+%endif
 
 # if ivi ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
 %files profile_ivi
 %manifest dali-adaptor.manifest
 %defattr(-,root,root,-)
+%if "%{?profile}" != "ivi"
 %{_libdir}/libdali-adaptor.so.ivi
 %endif
+%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/*
+%{_includedir}/dali/dali.h
+%{_includedir}/dali/public-api/*
+%{_includedir}/dali/devel-api/*
+%{_includedir}/dali/doc/*
 %{_libdir}/pkgconfig/dali-adaptor.pc
 
 %files integration-devel
 %defattr(-,root,root,-)
-%{dev_include_path}/dali/integration-api/adaptors/*
+%{_includedir}/dali/integration-api/adaptor-framework/*
+%{_includedir}/dali/integration-api/adaptors
 %{_libdir}/pkgconfig/dali-adaptor-integration.pc