summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Kibum <kb0929.kim@samsung.com>2012-04-29 16:58:25 +0900
committerKim Kibum <kb0929.kim@samsung.com>2012-04-29 16:58:25 +0900
commit24c06363581c4713b198e0c12d6c01ae380da000 (patch)
tree3a3dad49a59cf69162e500ad1227eb767af8bf33
parentac39af3d1aa435f63c81d2b0308c38272deae124 (diff)
downloadhaptic-24c06363581c4713b198e0c12d6c01ae380da000.tar.gz
haptic-24c06363581c4713b198e0c12d6c01ae380da000.tar.bz2
haptic-24c06363581c4713b198e0c12d6c01ae380da000.zip
upload tizen1.0 source
-rwxr-xr-xCMakeLists.txt11
-rw-r--r--capi-system-haptic.pc.in2
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules5
-rw-r--r--packaging/capi-system-haptic.spec12
5 files changed, 23 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 963b95e..9e01ea5 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,7 @@ SET(INC_DIR include)
INCLUDE_DIRECTORIES(${INC_DIR})
SET(dependents "devman glib-2.0 dlog")
+SET(pc_dependents "capi-base-common")
INCLUDE(FindPkgConfig)
pkg_check_modules(${fw_name} REQUIRED ${dependents})
@@ -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-haptic.pc.in b/capi-system-haptic.pc.in
index f758dbd..d0610b9 100644
--- a/capi-system-haptic.pc.in
+++ b/capi-system-haptic.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 006f3cd..747e935 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 5), dlog-dev, libdevman-dev, libdevman-haptic-dev,
Package: capi-system-haptic
Architecture: any
-Depends: ${shilbs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A Haptic library in Tizen Native API
Package: capi-system-haptic-dev
diff --git a/debian/rules b/debian/rules
index 92090e4..aca248d 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-haptic.spec b/packaging/capi-system-haptic.spec
index 0ebc99f..8ae3721 100644
--- a/packaging/capi-system-haptic.spec
+++ b/packaging/capi-system-haptic.spec
@@ -1,16 +1,18 @@
Name: capi-system-haptic
Summary: A Haptic library in Tizen Native API
Version: 0.1.0
-Release: 1
+Release: 11
Group: TO_BE/FILLED_IN
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(devman)
-BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(devman_haptic)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(devman)
+BuildRequires: pkgconfig(dlog)
+
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@ -31,7 +33,8 @@ Requires: %{name} = %{version}-%{release}
%build
-cmake . -DCMAKE_INSTALL_PREFIX=/usr
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
make %{?jobs:-j%jobs}
@@ -46,10 +49,11 @@ rm -rf %{buildroot}
%files
-%{_libdir}/libcapi-system-haptic.so
+%{_libdir}/libcapi-system-haptic.so.*
%files devel
%{_includedir}/system/*.h
%{_libdir}/pkgconfig/*.pc
+%{_libdir}/libcapi-system-haptic.so