spec: remove ambiguity of .so provide location for build systems 97/118197/3 submit/tizen/20170309.231955
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 9 Mar 2017 06:39:30 +0000 (15:39 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 9 Mar 2017 06:55:46 +0000 (15:55 +0900)
In order to remove "have choice for libscl-core.so:
libscl-core-profile_common and libscl-core-profile_wearable",
we manually add "Provides: libscl-core.so" at the main
package.

Although there will be no more libscl-core-profile_common,
image creators can still use libscl-core-profile_common because
libsc-core Provides profile_common as "virtual" package.

Change-Id: I143e6db9d8d111ccb5ec65aec8e64116b3cb4c8e
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
packaging/libscl-core.spec

index a0765dc..e3e2b2b 100644 (file)
@@ -1,6 +1,11 @@
 %bcond_with x
 %bcond_with wayland
 
+# Do not create auto-Provides from .so files of wearable so that
+# we can manually create .so Provides from the main package,
+# which eliminates ambiguity in build systems.
+%global __provides_exclude_from ^%{_libdir}/.*\.so.wearable$
+
 Name:       libscl-core
 Summary:    A library for developing software keyboards
 Version:    0.4.40
@@ -30,34 +35,22 @@ BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(libwebsockets)
 %endif
 
-Requires:      %{name}-compat = %{version}-%{release}
-Recommends:    %{name}-profile_common = %{version}-%{release}
-%description
-A library that helps developing S/W Keyboard
-
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# if mobile || tv || ivi || common || "undefined"
-%if "%{?profile}" != "wearable"
-%package profile_common
-Summary:       libscl-core subpackage for common/mobile/tv/ivi
-Provides:      %{name}-compat = %{version}-%{release}
+Provides:      %{name}-profile_common = %{version}-%{release}
 Provides:      %{name}-profile_mobile = %{version}-%{release}
 Provides:      %{name}-profile_tv = %{version}-%{release}
 Provides:      %{name}-profile_ivi = %{version}-%{release}
-Conflicts:     %{name}-profile_wearable
-%description profile_common
-A library for developing software keyboards for common/mobile/tv/ivi.
-%endif
+
+%description
+A library that helps developing S/W Keyboard
 
 # 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:       libscl-core subpackage for wearable
-Provides:      %{name}-compat = %{version}-%{release}
-Conflicts:     %{name}-profile_common
+Requires:      %{name} = %{version}-%{release}
 %description profile_wearable
-A library for developing software keyboards for wearable.
+A library extension for %{name} for developing software keyboards for wearable.
 %endif
 
 %package devel
@@ -113,7 +106,11 @@ rm -rf %{buildroot}
 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 pushd wearable
 %make_install
+%if "%{?profile}" == "wearable"
+cp %{buildroot}%{_libdir}/%{name}.so %{buildroot}%{_libdir}/%{name}.so.wearable
+%else
 mv %{buildroot}%{_libdir}/%{name}.so %{buildroot}%{_libdir}/%{name}.so.wearable
+%endif
 popd
 %endif
 
@@ -144,17 +141,8 @@ rm %{_libdir}/%{name}.so
 %files
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-%license LICENSE
-
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# if mobile || tv || ivi || common || "undefined"
-%if "%{?profile}" != "wearable"
-
-%files profile_common
-%manifest %{name}.manifest
-%defattr(-,root,root,-)
 %{_libdir}/%{name}.so
-%endif
+%license LICENSE
 
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
 # if wearable || "undefined"