- Fix hardcoding path.
- Use %cmake to set default paths.
Change-Id: I7dc4dff90a7d8ea2c97b529e98ba11ace84ba69a
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")
# Install header file
FILE(GLOB HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
+
INSTALL(FILES ${HEADER_FILES} DESTINATION ${DEST_INCLUDE_DIR})
# Install DB file
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)
prefix=@PREFIX@
exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
+libdir=@LIB_INSTALL_DIR@
includedir=@INCLUDEDIR@
Name: @TARGET@
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)
prefix=@PREFIX@
exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
+libdir=@LIB_INSTALL_DIR@
includedir=@INCLUDEDIR@
Name: @TARGET@
%build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%cmake .
make %{?_smp_mflags}
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
%postun -p /sbin/ldconfig
-
%files -n contacts-service2
%manifest contacts-service2.manifest
%defattr(-,root,root,-)
%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