Make the library version to be same as the pakcage version 83/110983/3
authorjongmyeongko <jongmyeong.ko@samsung.com>
Thu, 19 Jan 2017 06:04:08 +0000 (15:04 +0900)
committerjongmyeongko <jongmyeong.ko@samsung.com>
Thu, 19 Jan 2017 08:02:59 +0000 (17:02 +0900)
Change-Id: Ib5af69fc93cfd13eade47f8342ea8b84692f66e7
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
CMakeLists.txt
client/CMakeLists.txt
client/pkgmgr.pc.in
installer/CMakeLists.txt
installer/pkgmgr-installer.pc.in
packaging/pkgmgr.spec
types/pkgmgr-types.pc.in

index 7c5c2d1a6ba0cee94b913e0f0a69406ea6c02c7b..5a6fbfa8e52a836132ac6c9a50a947405ef3684f 100644 (file)
@@ -4,8 +4,6 @@ SET(CMAKE_SKIP_BUILD_RPATH true)
 
 PROJECT(package-manager C)
 INCLUDE(TizenCommon)
-SET(VERSION_MAJOR 0)
-SET(VERSION ${VERSION_MAJOR}.1.68)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(EXEC_PREFIX "\${prefix}")
index ab19c7b61cc185cd11fb07abb14b206e28726e4c..5154bbd70ed561a1c91f04ee697896c03fd8d042 100644 (file)
@@ -20,8 +20,8 @@ INCLUDE_DIRECTORIES(include)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
 
 ADD_LIBRARY(${PKGMGR_CLIENT} SHARED ${SRCS})
-SET_TARGET_PROPERTIES(${PKGMGR_CLIENT} PROPERTIES SOVERSION ${VERSION_MAJOR})
-SET_TARGET_PROPERTIES(${PKGMGR_CLIENT} PROPERTIES VERSION ${VERSION})
+SET_TARGET_PROPERTIES(${PKGMGR_CLIENT} PROPERTIES SOVERSION ${MAJORVER})
+SET_TARGET_PROPERTIES(${PKGMGR_CLIENT} PROPERTIES VERSION ${FULLVER})
 TARGET_LINK_LIBRARIES(${PKGMGR_CLIENT}
                pkgmgr-info
                ${CLIENT_DEPS_LDFLAGS})
index 907eb801fa104bf036d132ac12cfafbb3fda12d4..5ac565228599303a6f5b97230da7d4928bc84c33 100644 (file)
@@ -8,9 +8,9 @@ exec_prefix=@EXEC_PREFIX@
 libdir=@LIBDIR@
 includedir=@INCLUDEDIR@
 
-Name: package manager 
+Name: package manager
 Description: SLP Package Manager Package
-Version: @VERSION@
+Version: @FULLVER@
 Requires: dlog pkgmgr-types dbus-glib-1
 Libs: -L${libdir} -L${libdir}/pkgmgr -lpkgmgr-client
 Cflags: -I${includedir}
index b96af583a471ca654fe88b7bf811d42f6eed8f4d..c3b72ef8074f08430ff16f1c4dbc19f0566e1bfe 100644 (file)
@@ -6,22 +6,6 @@ cmake_minimum_required(VERSION 2.6)
 #set(CMAKE_SKIP_BUILD_RPATH true)
 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
 
-
-### Versioning
-if(DEFINED ${VERSION})
-       message("VERSION: ${VERSION}")
-else()
-       message("VERSION is not defined. set it as 0.1.0")
-       set(VERSION 0.1.0)
-endif()
-if(DEFINED ${VERSION_MAJOR})
-       message("VERSION_MAJOR: ${VERSION_MAJOR}")
-else()
-       message( "VERSION_MAJOR is not defined. set it as 0")
-       set(VERSION_MAJOR 0)
-endif()
-message(STATUS "version/major : ${VERSION} / ${VERSION_MAJOR}")
-
 ### Get required CFLAGS, LDFLAGS from pkg-config
 
 include(FindPkgConfig)
@@ -40,8 +24,8 @@ ENDFOREACH()
 ## pkgmgr_installer object (by youmin.ha)
 # This library is for installer backend
 add_library(pkgmgr_installer SHARED pkgmgr_installer.c)
-set_target_properties(pkgmgr_installer PROPERTIES SOVERSION ${VERSION_MAJOR})
-set_target_properties(pkgmgr_installer PROPERTIES VERSION ${VERSION})
+set_target_properties(pkgmgr_installer PROPERTIES SOVERSION ${MAJORVER})
+set_target_properties(pkgmgr_installer PROPERTIES VERSION ${FULLVER})
 set_target_properties(pkgmgr_installer PROPERTIES COMPILE_FLAGS "${installer_pkgs_CFLAGS_str} -fPIC")
 target_link_libraries(pkgmgr_installer ${installer_pkgs_LDFLAGS})
 
index 06c0002029112cfe408279682c0b3ff71c851013..f812a3b6dba61252ca5e2b7a90fb7dc51ce2cf29 100644 (file)
@@ -10,7 +10,7 @@ includedir=@INCLUDEDIR@
 
 Name: package manager installer library
 Description: SLP package manager's installer lib for each backends
-Version: @VERSION@
+Version: @FULLVER@
 Requires:
 Libs: -L${libdir} -lpkgmgr_installer
 Cflags: -I${includedir}/pkgmgr
index 6b6caa18063eb3d1184f84af2734ddfdae74ded7..88118d7e529a9fc5097cca4ac3ecb64d09bd817e 100644 (file)
@@ -90,7 +90,8 @@ Package Manager client types develpoment package for packaging
 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} %{SOURCE1006} .
 
 %build
-%cmake .
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
 
 %__make %{?_smp_mflags}
 
index 0e536889f2c6a0a2d9b8a7eb316e9a4fed81a6df..8597bab3a38c0cf32e8d52f945448d37361c8ee9 100644 (file)
@@ -10,7 +10,7 @@ includedir=@INCLUDEDIR@
 
 Name: package manager types
 Description: SLP package manager's types header
-Version: @VERSION@
+Version: @FULLVER@
 Requires:
 Libs:
 Cflags: -I${includedir}