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}")
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})
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}
#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)
## 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})
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
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}
Name: package manager types
Description: SLP package manager's types header
-Version: @VERSION@
+Version: @FULLVER@
Requires:
Libs:
Cflags: -I${includedir}