Fix for 64 bit compatibility.
authorJunfeng Dong <junfeng.dong@intel.com>
Mon, 25 Mar 2013 09:54:35 +0000 (17:54 +0800)
committerlifang <fangx.li@intel.com>
Tue, 2 Apr 2013 15:18:45 +0000 (23:18 +0800)
- Fix hardcoding path.
- Use %cmake to set default paths.

Change-Id: I7dc4dff90a7d8ea2c97b529e98ba11ace84ba69a

CMakeLists.txt
client/CMakeLists.txt
client/contacts-service2.pc.in
native/CMakeLists.txt
native/contacts-service3.pc.in
packaging/contacts-service.spec

index 624dffd..261ad19 100755 (executable)
@@ -11,7 +11,6 @@ SET(SRC_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(EXEC_PREFIX "\${prefix}")
-SET(LIBDIR "\${prefix}/lib")
 SET(INCLUDEDIR "\${prefix}/${DEST_INCLUDE_DIR}")
 SET(VERSION_MAJOR 0)
 SET(VERSION "${VERSION_MAJOR}.9.59")
@@ -51,6 +50,7 @@ INSTALL(DIRECTORY DESTINATION /opt/usr/data/contacts-svc/img/logo)
 
 # Install header file
 FILE(GLOB HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
+
 INSTALL(FILES ${HEADER_FILES} DESTINATION ${DEST_INCLUDE_DIR})
 
 # Install DB file
index 26cd149..99602e4 100755 (executable)
@@ -93,6 +93,6 @@ SET_TARGET_PROPERTIES(${CLIENT} PROPERTIES SOVERSION ${VERSION_MAJOR})
 SET_TARGET_PROPERTIES(${CLIENT} PROPERTIES VERSION ${VERSION})
 TARGET_LINK_LIBRARIES(${CLIENT} ${client_pkgs_LDFLAGS} ${pkgs_LDFLAGS} -lpthread)
 
-INSTALL(TARGETS ${CLIENT} DESTINATION lib)
-INSTALL(FILES ${CLIENT}.pc DESTINATION lib/pkgconfig)
+INSTALL(TARGETS ${CLIENT} DESTINATION ${LIB_INSTALL_DIR})
+INSTALL(FILES ${CLIENT}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 
index 5ac7490..09f41f5 100644 (file)
@@ -2,7 +2,7 @@
 
 prefix=@PREFIX@
 exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
+libdir=@LIB_INSTALL_DIR@
 includedir=@INCLUDEDIR@
 
 Name: @TARGET@
index 05527a2..e718d78 100755 (executable)
@@ -21,8 +21,8 @@ SET_TARGET_PROPERTIES(${NATIVE} PROPERTIES SOVERSION ${VERSION_MAJOR})
 SET_TARGET_PROPERTIES(${NATIVE} PROPERTIES VERSION ${VERSION})
 TARGET_LINK_LIBRARIES(${NATIVE} ${pkgs_LDFLAGS} ${service_pkgs_LDFLAGS} -lpthread)
 
-INSTALL(TARGETS ${NATIVE} DESTINATION lib)
+INSTALL(TARGETS ${NATIVE} DESTINATION ${LIB_INSTALL_DIR})
 
 # Make pc file and install
 CONFIGURE_FILE(${NATIVE}.pc.in ${NATIVE}.pc @ONLY)
-INSTALL(FILES ${NATIVE}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${NATIVE}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
index 3948eac..4484e5d 100644 (file)
@@ -2,7 +2,7 @@
 
 prefix=@PREFIX@
 exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
+libdir=@LIB_INSTALL_DIR@
 includedir=@INCLUDEDIR@
 
 Name: @TARGET@
index 087c0b9..d1c8bc2 100644 (file)
@@ -50,7 +50,7 @@ New Contacts Service Library (devel)
 
 
 %build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%cmake .
 make %{?_smp_mflags}
 
 
@@ -63,9 +63,10 @@ mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d/
 ln -s ../init.d/contacts-service-ipcd.sh %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S50contacts-svc-helper
 ln -s ../init.d/contacts-service-ipcd.sh %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S50contacts-svc-helper
 
-mkdir -p %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants
-install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/user/contacts-service.service
-ln -s ../contacts-service.service %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants/contacts-service.service
+mkdir -p %{buildroot}/usr/lib/systemd/user/tizen-middleware.target.wants
+install -m 0644 %SOURCE1 %{buildroot}/usr/lib/systemd/user/contacts-service.service
+ln -s ../contacts-service.service %{buildroot}/usr/lib/systemd/user/tizen-middleware.target.wants/contacts-service.service
+
 
 
 %post -n contacts-service2
@@ -91,7 +92,6 @@ vconftool set -t int db/contacts-svc/phonenumber_min_match_digit 8 -g 6005
 
 %postun -p /sbin/ldconfig
 
-
 %files -n contacts-service2
 %manifest contacts-service2.manifest
 %defattr(-,root,root,-)
@@ -109,6 +109,8 @@ vconftool set -t int db/contacts-svc/phonenumber_min_match_digit 8 -g 6005
 
 %files -n contacts-service2-devel
 %defattr(-,root,root,-)
+%{_libdir}/libcontacts-service2.so.*
+%{_libdir}/libcontacts-service3.so.*
 %{_libdir}/libcontacts-service2.so
 %{_libdir}/libcontacts-service3.so
 %{_libdir}/pkgconfig/contacts-service2.pc