CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(motion)
+PROJECT(capi-context-motion)
INCLUDE(GNUInstallDirs)
-# Target lib (for backward compatibility, the below old naming is used)
-SET(target "core-context-manager")
+SET(target ${PROJECT_NAME})
# Source Lists
FILE(GLOB SRCS src/*.cpp)
ADD_LIBRARY(${target} SHARED ${SRCS})
TARGET_LINK_LIBRARIES(${target} ${pkgs_LDFLAGS})
SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS})
-SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITIONS "LOG_TAG=\"CONTEXT-LIB\"")
+SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITIONS "LOG_TAG=\"MOTION\"")
SET_TARGET_PROPERTIES(${target} PROPERTIES SOVERSION ${MAJORVER})
SET_TARGET_PROPERTIES(${target} PROPERTIES VERSION ${FULLVER})
-Name: motion
+Name: capi-context-motion
Summary: Tizen Native Motion Recognition API
-Version: 1.2.1
+Version: 2.0.0
Release: 1
Group: Service/Context
License: Apache-2.0
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
+# Backward compatibility
+Provides: motion
+
%description
Tizen Native Motion Recognition API
%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-export CFLAGS+=" -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-parameter"
export CXXFLAGS+=" -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-parameter"
-
-export CFLAGS+=" -Wno-empty-body -fomit-frame-pointer -fno-optimize-sibling-calls"
export CXXFLAGS+=" -Wno-empty-body -fomit-frame-pointer -fno-optimize-sibling-calls"
-
-export CFLAGS+=" -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow"
export CXXFLAGS+=" -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow"
-
-export CFLAGS+=" -fno-common"
export CXXFLAGS+=" -Wnon-virtual-dtor"
-#export CFLAGS+=" -Wcast-qual"
-#export CXXFLAGS+=" -Wcast-qual"
-
-#export CFLAGS+=" -DTIZEN_ENGINEER_MODE"
-#export CXXFLAGS+=" -DTIZEN_ENGINEER_MODE"
-#export FFLAGS+=" -DTIZEN_ENGINEER_MODE"
-
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
-make %{?jobs:-j%jobs}
+%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
+make %{?_smp_mflags}
%install
-rm -rf %{buildroot}
%make_install
# For backward compatibility
-ln -s ./%{name}.pc %{buildroot}/%{_libdir}/pkgconfig/libcore-context-manager.pc
+ln -s %{name}.pc %{buildroot}/%{_libdir}/pkgconfig/motion.pc
+ln -s %{name}.pc %{buildroot}/%{_libdir}/pkgconfig/libcore-context-manager.pc
+ln -s lib%{name}.so.%{version} %{buildroot}/%{_libdir}/libcore-context-manager.so.1
%post
/sbin/ldconfig
%files
%manifest packaging/%{name}.manifest
-%defattr(-,root,root,-)
%{_libdir}/*.so*
%license LICENSE
Tizen Native Motion Recognition API (Development)
%files devel
-%defattr(-,root,root,-)
%{_includedir}/*/*.h
%{_libdir}/pkgconfig/*.pc