Fix versioning 73/155973/1 accepted/tizen/unified/20171018.062257 submit/tizen/20171017.013459 submit/tizen/20171017.052427
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 16 Oct 2017 23:29:55 +0000 (08:29 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 16 Oct 2017 23:30:35 +0000 (08:30 +0900)
Change-Id: I374e410aa9afb8c475c13bb6c10eb86bab99da3e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
CMakeLists.txt
packaging/voice-control-elm.spec
src/CMakeLists.txt

index a8ce164..d8d30cc 100644 (file)
@@ -14,7 +14,7 @@ SET(LIBRARY_NAME "vc-elm")
 #SET(VOICE_CONTROL_ELM_VERSION_MAJOR 0)
 #SET(VOICE_CONTROL_ELM_VERSION_MINOR 2)
 #SET(VOICE_CONTROL_ELM_VERSION_PATCH 0)
-SET(VERSION 0.2.0)
+SET(VERSION ${VERSION})
 
 # pkg config tool
 INCLUDE(FindPkgConfig)
index 7fcd3ea..5cb6e7e 100644 (file)
@@ -27,6 +27,9 @@ BuildRequires:        pkgconfig(voice-control-widget)
 BuildRequires: pkgconfig(vconf)
 BuildRequires: gettext-tools
 
+Requires(post):   /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
 %description
 voice-control-elm library that provides advanced Voice Driven Control over UI
 
@@ -47,6 +50,8 @@ export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed"
 rm -rf objdir
 mkdir objdir
 
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+
 %{?SRPOL_DEBUG:
 (cd objdir && cmake .. -DVERSION=%{version} \
        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
@@ -55,6 +60,7 @@ mkdir objdir
        -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE \
        -DTZ_SYS_BIN=%TZ_SYS_BIN \
        -DCMAKE_BUILD_TYPE=Debug \
+       -DMAJORVER=${MAJORVER} \
        -DSRPOL_DEBUG="1")
 }
 %{!?SRPOL_DEBUG:
@@ -65,6 +71,7 @@ mkdir objdir
        -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE \
        -DTZ_SYS_BIN=%TZ_SYS_BIN \
        -DCMAKE_BUILD_TYPE=Debug \
+       -DMAJORVER=${MAJORVER} \
        -DSRPOL_DEBUG="0")
 }
 
@@ -79,6 +86,10 @@ rm -rf %{buildroot}
 rm -rf %{buildroot}
 
 %post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
 
 mkdir -p %{TZ_SYS_RO_SHARE}/voice
 
@@ -87,7 +98,6 @@ mkdir -p %{TZ_SYS_RO_SHARE}/voice
 %manifest %{name}.manifest
 %attr(644,root,root)
 %defattr(-,root,root,-)
-%{_libdir}/*.so
 %{_libdir}/*.so.*
 %{_datadir}/*
 %{TZ_SYS_RO_SHARE}/locale/*
index c71fa62..406856d 100644 (file)
@@ -37,8 +37,8 @@ INCLUDE_DIRECTORIES(
 ADD_LIBRARY(${LIBRARY_NAME} SHARED ${VC_ELM_SOURCES})
 SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES
        COMPILE_FLAGS -fPIC
-       SOVERSION "0.2.0"
-       VERSION "0.2.0")
+       SOVERSION ${MAJORVER}
+       VERSION ${VERSION})
 
 TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
        ${VC_ELM_DEPS_LIBRARIES})