From: Matthew Brewer Date: Fri, 29 Jan 2016 04:17:47 +0000 (+0100) Subject: sci-mathematics/rstudio: install systemd service unit for rstudio-server into proper... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=53d873715b54186cbcced5c32bfdd8380a4a1508;p=gentoo.git sci-mathematics/rstudio: install systemd service unit for rstudio-server into proper directory (bug #534152) Package-Manager: portage-2.2.26 RepoMan-Options: --ignore-arches --- diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.486-systemd.patch b/sci-mathematics/rstudio/files/rstudio-0.99.486-systemd.patch new file mode 100644 index 000000000000..4c7eda39cc29 --- /dev/null +++ b/sci-mathematics/rstudio/files/rstudio-0.99.486-systemd.patch @@ -0,0 +1,22 @@ +diff -Naur /tmp/rstudio.org/work/rstudio-0.99.486/src/cpp/server/CMakeLists.txt ./work/rstudio-0.99.486/src/cpp/server/CMakeLists.txt +--- /tmp/rstudio.org/work/rstudio-0.99.486/src/cpp/server/CMakeLists.txt 2015-12-10 19:29:24.408267862 +0100 ++++ ./work/rstudio-0.99.486/src/cpp/server/CMakeLists.txt 2015-12-10 19:35:24.660194216 +0100 +@@ -208,17 +208,12 @@ + DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR}) + + # install configured systemd profile +- set(RSERVER_SYSTEMD_DIR "extras/systemd") ++ set(RSERVER_SYSTEMD_DIR "lib/systemd/system") + set(RSERVER_SYSTEMD_PROFILE "${RSERVER_SYSTEMD_DIR}/rstudio-server.service") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_SYSTEMD_PROFILE}.in + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE} + DESTINATION ${RSERVER_SYSTEMD_DIR}) +- set(RSERVER_SYSTEMD_PROFILE_REDHAT "${RSERVER_SYSTEMD_DIR}/rstudio-server.redhat.service") +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT}.in +- ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT}) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT} +- DESTINATION ${RSERVER_SYSTEMD_DIR}) + + endif() + diff --git a/sci-mathematics/rstudio/files/rstudio-server.service.in b/sci-mathematics/rstudio/files/rstudio-server.service.in new file mode 100644 index 000000000000..fb3e37305e00 --- /dev/null +++ b/sci-mathematics/rstudio/files/rstudio-server.service.in @@ -0,0 +1,10 @@ +[Unit] +Description=RStudio Server + +[Service] +Type=forking +ExecStart=${CMAKE_INSTALL_PREFIX}/bin/rserver +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/sci-mathematics/rstudio/rstudio-0.99.486.ebuild b/sci-mathematics/rstudio/rstudio-0.99.486-r1.ebuild similarity index 96% rename from sci-mathematics/rstudio/rstudio-0.99.486.ebuild rename to sci-mathematics/rstudio/rstudio-0.99.486-r1.ebuild index 3682c5ca0fd0..c5b11ff74339 100644 --- a/sci-mathematics/rstudio/rstudio-0.99.486.ebuild +++ b/sci-mathematics/rstudio/rstudio-0.99.486-r1.ebuild @@ -130,7 +130,12 @@ src_prepare() { "${FILESDIR}"/${PN}-0.99.473-clang-pandoc.patch \ "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch \ "${FILESDIR}"/${PN}-0.98.1091-boost-1.57.patch \ - "${FILESDIR}"/${PN}-0.99.473-qtsingleapplication.patch + "${FILESDIR}"/${PN}-0.99.473-qtsingleapplication.patch \ + "${FILESDIR}"/${PN}-0.99.486-systemd.patch + + # Enable CMake to install our .service file for systemd usage + mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die + cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using # this sed hack for now. ~RMH