From 52e84ea5220c51694452c31a5e6eff7161444eb1 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Tue, 4 Jun 2013 10:44:11 +0200 Subject: [PATCH] Fix hardcoded library path in CMakelists - fix hardcoded lib path - use %unitdir_user macro for systemd related files in specfile --- CMakeLists.txt | 4 ++-- client/CMakeLists.txt | 4 ++-- native/CMakeLists.txt | 6 +++--- packaging/calendar-service.spec | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e67cfc0..24052ca 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ SET(SRC_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include") SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "\${prefix}") -SET(LIBDIR "\${prefix}/lib") +SET(LIBDIR ${LIB_INSTALL_DIR}) SET(INCLUDEDIR "\${prefix}/${DEST_INCLUDE_DIR}") SET(VERSION_MAJOR 0) SET(VERSION "${VERSION_MAJOR}.1.15") @@ -43,7 +43,7 @@ INSTALL(FILES ${HEADER_FILES} DESTINATION ${INCLUDEDIR}2) # for immigration SET(IMMIGRATION "calendar-service2") CONFIGURE_FILE(calendar.pc.in calendar.pc @ONLY) -INSTALL(FILES calendar.pc DESTINATION lib/pkgconfig) +INSTALL(FILES calendar.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) FILE(GLOB NOTI_FILES ${CMAKE_SOURCE_DIR}/.CALENDAR_SVC_*_CHANGED) INSTALL(FILES ${NOTI_FILES} DESTINATION /opt/usr/data/calendar-svc) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 5492b12..f8b2148 100755 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -70,9 +70,9 @@ SET_TARGET_PROPERTIES(${CALSVC2} PROPERTIES SOVERSION ${VERSION_MAJOR}) SET_TARGET_PROPERTIES(${CALSVC2} PROPERTIES VERSION ${VERSION}) TARGET_LINK_LIBRARIES(${CALSVC2} ${service2_pkgs_LDFLAGS}) -INSTALL(TARGETS ${CALSVC2} DESTINATION lib) +INSTALL(TARGETS ${CALSVC2} DESTINATION ${LIB_INSTALL_DIR}) #pc CONFIGURE_FILE(${CALSVC2}.pc.in ${CALSVC2}.pc @ONLY) -INSTALL(FILES ${CALSVC2}.pc DESTINATION lib/pkgconfig) +INSTALL(FILES ${CALSVC2}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index 6059301..99a7143 100755 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -72,9 +72,9 @@ SET_TARGET_PROPERTIES(${CALSVCNATIVE} PROPERTIES SOVERSION ${VERSION_MAJOR}) SET_TARGET_PROPERTIES(${CALSVCNATIVE} PROPERTIES VERSION ${VERSION}) TARGET_LINK_LIBRARIES(${CALSVCNATIVE} ${servicenative_pkgs_LDFLAGS}) -INSTALL(TARGETS ${CALSVCNATIVE} DESTINATION lib) +INSTALL(TARGETS ${CALSVCNATIVE} DESTINATION ${LIB_INSTALL_DIR}) #pc CONFIGURE_FILE(${CALSVCNATIVE}.pc.in ${CALSVCNATIVE}.pc @ONLY) -INSTALL(FILES ${CALSVCNATIVE}.pc DESTINATION lib/pkgconfig) -#INSTALL(FILES calendar-service2.pc DESTINATION lib/pkgconfig) +INSTALL(FILES ${CALSVCNATIVE}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) +#INSTALL(FILES calendar-service2.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) diff --git a/packaging/calendar-service.spec b/packaging/calendar-service.spec index 75e0ff4..19e25f4 100644 --- a/packaging/calendar-service.spec +++ b/packaging/calendar-service.spec @@ -54,9 +54,9 @@ mkdir -p %{buildroot}/etc/rc.d/rc5.d/ ln -s ../init.d/calendar-serviced.sh %{buildroot}/etc/rc.d/rc3.d/S85calendar-serviced ln -s ../init.d/calendar-serviced.sh %{buildroot}/etc/rc.d/rc5.d/S85calendar-serviced -mkdir -p %{buildroot}/usr/lib/systemd/user/tizen-middleware.target.wants -install %{SOURCE1} %{buildroot}/usr/lib/systemd/user/ -ln -s ../calendar.service %{buildroot}/usr/lib/systemd/user/tizen-middleware.target.wants/ +mkdir -p %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants +install %{SOURCE1} %{buildroot}%{_unitdir_user}/ +ln -s ../calendar.service %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants/ mkdir -p %{buildroot}/opt/usr/dbspace/.calendar-svc.db mkdir -p %{buildroot}/opt/usr/dbspace/.calendar-svc.db-journal @@ -93,8 +93,8 @@ chmod 660 /opt/usr/data/calendar-svc/.CALENDAR_SVC_* /opt/usr/data/calendar-svc/.CALENDAR_SVC_TODO_CHANGED /usr/share/calendar-svc/dft-calendar %config(noreplace) /opt/usr/dbspace/.calendar-svc.db* -/usr/lib/systemd/user/calendar.service -/usr/lib/systemd/user/tizen-middleware.target.wants/calendar.service +%{_unitdir_user}/calendar.service +%{_unitdir_user}/tizen-middleware.target.wants/calendar.service %files devel %defattr(-,root,root,-) -- 2.7.4