From a9a7849a4ef52f95c2eaaa463f446b00483067f1 Mon Sep 17 00:00:00 2001 From: Eunhye Choi Date: Tue, 4 Jun 2024 17:36:14 +0900 Subject: [PATCH] [1.0.0] Set so version for compatibility - Set so version regardless of package version - The prebuilt binary which has dependency of this package will be failed while loading this shared library by different so name if version of so file is 1.0.0. (new:libcapi-media-player.so.1 vs old:libcapi-media-player.so.0) Change-Id: Id0d9095eadf61fe7b4078cb026141b8c107ee3e3 --- CMakeLists.txt | 4 ++-- packaging/capi-media-player.spec | 7 +++++-- test/event-handler/CMakeLists.txt | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5bd1df..9e7feb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,8 +43,8 @@ TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS}) SET_TARGET_PROPERTIES(${fw_name} PROPERTIES - VERSION ${FULLVER} - SOVERSION ${MAJORVER} + VERSION ${SO_FULLVER} + SOVERSION ${SO_MAJORVER} CLEAN_DIRECT_OUTPUT 1 ) diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index ba44adb..06fb1f6 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,7 +1,7 @@ Name: capi-media-player Summary: A Media Player API Version: 1.0.0 -Release: 0 +Release: 1 Group: Multimedia/API License: Apache-2.0 Source0: %{name}-%{version}.tar.gz @@ -93,7 +93,10 @@ export LDFLAGS+=" -lgcov" %endif MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \ +SO_FULLVER=0.4.0 +SO_MAJORVER=`echo ${SO_FULLVER} | awk 'BEGIN {FS="."}{print $1}'` + +%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DSO_FULLVER=${SO_FULLVER} -DSO_MAJORVER=${SO_MAJORVER} \ %if 0%{?gtests:1} -DBUILD_UNITTEST=YES %else diff --git a/test/event-handler/CMakeLists.txt b/test/event-handler/CMakeLists.txt index e6e4c78..9bac336 100644 --- a/test/event-handler/CMakeLists.txt +++ b/test/event-handler/CMakeLists.txt @@ -18,8 +18,8 @@ ADD_LIBRARY(${fw_handler} SHARED ${HANDLER_SRC}) SET_TARGET_PROPERTIES(${fw_handler} PROPERTIES - VERSION ${FULLVER} - SOVERSION ${MAJORVER} + VERSION ${SO_FULLVER} + SOVERSION ${SO_MAJORVER} CLEAN_DIRECT_OUTPUT 1 ) -- 2.7.4