diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-03-20 13:55:04 +0100 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-04-05 14:21:56 -0700 |
commit | aed578697478dc89215feac765a9d680353212b3 (patch) | |
tree | c53f660dab19ea6a95a32ce3ef343a97a9a5e728 | |
parent | c9e4d453ba609e1fb9f0562a46cd346e44377b4a (diff) | |
download | libsf-common-aed578697478dc89215feac765a9d680353212b3.tar.gz libsf-common-aed578697478dc89215feac765a9d680353212b3.tar.bz2 libsf-common-aed578697478dc89215feac765a9d680353212b3.zip |
Fix x86_64 build and install, cleanup spec filesubmit/tizen_2.1/20130424.233044submit/tizen/20130517.045156accepted/tizen_2.1/20130425.032921accepted/tizen/20130520.1012412.1b_releasetizen_2.1
[Xavier Roche]
- Change (int) cast to (unsigned long) in source files
- Change library path var in *.pc.in
- Use %cmake macro to set default path
- Fix hard-coded library path in CMakeLists.txt
[Anas Nashif]
- set package group
- remove extra dependecnies
- use rpm macros for common path
Change-Id: I592db59f0357a59bf80a06c98516f8f324368b19
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | packaging/libsf-common.spec | 49 | ||||
-rw-r--r-- | sf_common.pc.in | 2 | ||||
-rwxr-xr-x | src/cipc_worker.cpp | 6 | ||||
-rwxr-xr-x | src/cworker.cpp | 2 |
5 files changed, 27 insertions, 37 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 82eb68d..5da7d7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,6 @@ project(sf_common CXX) # to install pkgconfig setup file. SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "\${prefix}") -SET(LIBDIR "\${prefix}/lib") SET(INCLUDEDIR "\${prefix}/include") SET(VERSION 1.0) @@ -51,8 +50,8 @@ add_library(${PROJECT_NAME} SHARED target_link_libraries(${PROJECT_NAME} ${rpkgs_LDFLAGS} "-lrt -ldl") configure_file(${PROJECT_NAME}.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc @ONLY) -install(TARGETS ${PROJECT_NAME} DESTINATION lib) -install(FILES ${PROJECT_NAME}.pc DESTINATION lib/pkgconfig) +install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR}) +install(FILES ${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) install(FILES include/sf_common.h include/csensor_module.h diff --git a/packaging/libsf-common.spec b/packaging/libsf-common.spec index b51ae3a..3b6752b 100644 --- a/packaging/libsf-common.spec +++ b/packaging/libsf-common.spec @@ -1,51 +1,42 @@ -#sbs-git:slp/pkgs/l/libsf-common libsf-common 0.3.6 07588b34636f76e6457efb6d65e9318513c5957c -Name: libsf-common -Summary: Commonly used code and defintions for the sensor framework -Version: 0.3.20 -Release: 1 -Group: TO_BE/FILLED_IN -License: Apache 2.0 -Source0: libsf-common-%{version}.tar.gz -BuildRequires: cmake, libattr-devel +Name: libsf-common +Version: 0.3.20 +Release: 1 +License: Apache-2.0 +Summary: Sensor framework common library +Group: System/Sensor Framework +Source0: libsf-common-%{version}.tar.gz +BuildRequires: cmake +BuildRequires: libattr-devel BuildRequires: pkgconfig(dlog) - - %description -Sensor framework common library - - +Commonly used code and defintions for the sensor framework. %package devel -Summary: Sensor framework common (devel) -Group: System/Sensor Framework -Requires: %{name} = %{version}-%{release} -Requires: libsf-common +Summary: Sensor framework common - Development +Group: Development/Libraries +Requires: %{name} = %{version} %description devel -Sensor framework common library - +Sensor framework common library - Development Files. %prep -%setup -q - +%setup -q %build -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} - +%cmake . -make %{?jobs:-j%jobs} +make %{?_smp_mflags} %install -rm -rf %{buildroot} %make_install -mkdir -p %{buildroot}/usr/share/license -cp LICENSE %{buildroot}/usr/share/license/%{name} +mkdir -p %{buildroot}%{_datadir}/license +cp LICENSE %{buildroot}%{_datadir}/license/%{name} %files %manifest libsf-common.manifest %{_libdir}/libsf_common.so -/usr/share/license/%{name} +%{_datadir}/license/%{name} %files devel diff --git a/sf_common.pc.in b/sf_common.pc.in index eb7bbbb..2e07ac3 100644 --- a/sf_common.pc.in +++ b/sf_common.pc.in @@ -2,7 +2,7 @@ prefix=@PREFIX@ exec_prefix=@EXEC_PREFIX@ -libdir=@LIBDIR@ +libdir=@LIB_INSTALL_DIR@ includedir=@INCLUDEDIR@/sf_common Name: libsf_common diff --git a/src/cipc_worker.cpp b/src/cipc_worker.cpp index 2799ed5..8d540d5 100755 --- a/src/cipc_worker.cpp +++ b/src/cipc_worker.cpp @@ -72,7 +72,7 @@ bool cipc_worker::start(void) m_state = START; pthread_mutex_unlock(&(mutex_lock)); - state = (ipc_worker_state_s)(int)m_func[START](m_context); + state = (ipc_worker_state_s)(unsigned long)m_func[START](m_context); if (state == TERMINATE) { pthread_mutex_lock(&(mutex_lock)); @@ -127,7 +127,7 @@ void *cipc_worker::started(void *data) do { - state = (ipc_worker_state_s)(int)inst->m_func[STARTED](inst->m_context); + state = (ipc_worker_state_s)(unsigned long)inst->m_func[STARTED](inst->m_context); if(state == TERMINATE) { pthread_mutex_lock(&(inst->mutex_lock)); @@ -151,7 +151,7 @@ bool cipc_worker::stop(void) { ipc_worker_state_s state; - state = (ipc_worker_state_s)(int)m_func[STOP](m_context); + state = (ipc_worker_state_s)(unsigned long)m_func[STOP](m_context); pthread_mutex_lock(&(mutex_lock)); m_state = TERMINATE; diff --git a/src/cworker.cpp b/src/cworker.cpp index 81e0c78..6ecb528 100755 --- a/src/cworker.cpp +++ b/src/cworker.cpp @@ -141,7 +141,7 @@ void *cworker::started(void *data) do { - state = (worker_state_s)(int)inst->m_func[STARTED](inst->m_context); + state = (worker_state_s)(unsigned long)inst->m_func[STARTED](inst->m_context); if(state == STOPPED || inst->m_state == STOP) inst->stopped(); |