From: Kim Kibum Date: Sun, 29 Apr 2012 07:58:31 +0000 (+0900) Subject: upload tizen1.0 source X-Git-Tag: 2.0_alpha~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4e0187b5e0c0824d0e27f6e2a119769312ab2b5;p=platform%2Fcore%2Fapi%2Fsensor.git upload tizen1.0 source --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b6a2175..e58b082 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ SET(INC_DIR include) INCLUDE_DIRECTORIES(${INC_DIR}) SET(dependents "dlog sensor capi-base-common") +SET(pc_dependents "capi-base-common") INCLUDE(FindPkgConfig) pkg_check_modules(${fw_name} REQUIRED ${dependents}) @@ -18,7 +19,7 @@ FOREACH(flag ${${fw_name}_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -g -fdump-rtl-expand") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") IF("${ARCH}" STREQUAL "arm") @@ -35,6 +36,13 @@ ADD_LIBRARY(${fw_name} SHARED ${SOURCES}) TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS}) +SET_TARGET_PROPERTIES(${fw_name} + PROPERTIES + VERSION ${FULLVER} + SOVERSION ${MAJORVER} + CLEAN_DIRECT_OUTPUT 1 +) + INSTALL(TARGETS ${fw_name} DESTINATION lib) INSTALL( DIRECTORY ${INC_DIR}/ DESTINATION include/system @@ -44,9 +52,8 @@ INSTALL( ) SET(PC_NAME ${fw_name}) -SET(PC_REQUIRED ${dependents}) +SET(PC_REQUIRED ${pc_dependents}) SET(PC_LDFLAGS -l${fw_name}) -SET(PC_CFLAGS -I\${includedir}/system) CONFIGURE_FILE( ${fw_name}.pc.in diff --git a/capi-system-sensor.pc.in b/capi-system-sensor.pc.in index f758dbd..316fa51 100644 --- a/capi-system-sensor.pc.in +++ b/capi-system-sensor.pc.in @@ -11,5 +11,5 @@ Description: @PACKAGE_DESCRIPTION@ Version: @VERSION@ Requires: @PC_REQUIRED@ Libs: -L${libdir} @PC_LDFLAGS@ -Cflags: -I${includedir} @PC_CFLAGS@ +Cflags: -I${includedir} diff --git a/debian/control b/debian/control index a8922d8..979cd71 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 5), dlog-dev, libslp-sensor-dev, capi-base-common-d Package: capi-system-sensor Architecture: any -Depends: ${shilbs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Description: A Sensor library in Tizen Native API Package: capi-system-sensor-dev diff --git a/debian/rules b/debian/rules index 2f99f75..c3c71aa 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,8 @@ #!/usr/bin/make -f +FULLVER ?= $(shell dpkg-parsechangelog | grep Version: | cut -d ' ' -f 2 | cut -d '-' -f 1) +MAJORVER ?= $(shell echo $(FULLVER) | cut -d '.' -f 1) + CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -13,7 +16,7 @@ CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp configure: configure-stamp configure-stamp: dh_testdir - mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && cmake .. + mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && cmake .. -DFULLVER=${FULLVER} -DMAJORVER=${MAJORVER} touch configure-stamp diff --git a/packaging/capi-system-sensor.spec b/packaging/capi-system-sensor.spec index 66c7a0a..8b66a9c 100644 --- a/packaging/capi-system-sensor.spec +++ b/packaging/capi-system-sensor.spec @@ -1,7 +1,7 @@ Name: capi-system-sensor Summary: A Sensor library in TIZEN C API Version: 0.1.0 -Release: 1 +Release: 9 Group: TO_BE/FILLED_IN License: Apache-2.0 Source0: %{name}-%{version}.tar.gz @@ -29,9 +29,8 @@ Requires: %{name} = %{version}-%{release} %build -FULLVER=%{version} -MAJORVER=`echo ${FULLVER} | cut -d '.' -f 1` -cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=${FULLVER} -DMAJORVER=${MAJORVER} +MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` +cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} make %{?jobs:-j%jobs} @@ -46,10 +45,11 @@ rm -rf %{buildroot} %files -%{_libdir}/libcapi-system-sensor.so* +%{_libdir}/libcapi-system-sensor.so.* %files devel %{_includedir}/system/sensors.h %{_libdir}/pkgconfig/*.pc +%{_libdir}/libcapi-system-sensor.so