Rename the package to capi-context-motion from motion 09/116909/2
authorMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 2 Mar 2017 03:37:56 +0000 (12:37 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 2 Mar 2017 04:34:51 +0000 (20:34 -0800)
Change-Id: I7a8f5eb3009d224475dddbbeb103a2336a9f6fd6
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
CMakeLists.txt
capi-context-motion.pc.in [moved from motion.pc.in with 100% similarity]
packaging/capi-context-motion.manifest [moved from packaging/motion.manifest with 100% similarity]
packaging/capi-context-motion.spec [moved from packaging/motion.spec with 62% similarity]

index d6db33d..d8f80d9 100644 (file)
@@ -1,9 +1,8 @@
 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)
@@ -30,7 +29,7 @@ ENDFOREACH(flag)
 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})
 
similarity index 100%
rename from motion.pc.in
rename to capi-context-motion.pc.in
similarity index 62%
rename from packaging/motion.spec
rename to packaging/capi-context-motion.spec
index 0bb75ba..36b1c99 100644 (file)
@@ -1,6 +1,6 @@
-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
@@ -16,6 +16,9 @@ BuildRequires:  pkgconfig(sensor)
 Requires(post):  /sbin/ldconfig
 Requires(postun):  /sbin/ldconfig
 
+# Backward compatibility
+Provides: motion
+
 %description
 Tizen Native Motion Recognition API
 
@@ -25,34 +28,21 @@ 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
@@ -62,7 +52,6 @@ ln -s ./%{name}.pc %{buildroot}/%{_libdir}/pkgconfig/libcore-context-manager.pc
 
 %files
 %manifest packaging/%{name}.manifest
-%defattr(-,root,root,-)
 %{_libdir}/*.so*
 %license LICENSE
 
@@ -75,6 +64,5 @@ Requires:     %{name} = %{version}-%{release}
 Tizen Native Motion Recognition API (Development)
 
 %files devel
-%defattr(-,root,root,-)
 %{_includedir}/*/*.h
 %{_libdir}/pkgconfig/*.pc