summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Brewer <tomboy64@sina.cn>2016-01-29 05:17:47 +0100
committerMatthew Brewer <tomboy64@sina.cn>2016-01-29 05:17:47 +0100
commit53d873715b54186cbcced5c32bfdd8380a4a1508 (patch)
tree67e1f4da42ec5141866d04a0683258cad709af14 /sci-mathematics/rstudio
parenteclass/readme.gentoo.eclass: Add EAPI6 support, stop exporting functions for ... (diff)
downloadgentoo-53d873715b54186cbcced5c32bfdd8380a4a1508.tar.gz
gentoo-53d873715b54186cbcced5c32bfdd8380a4a1508.tar.bz2
gentoo-53d873715b54186cbcced5c32bfdd8380a4a1508.zip
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
Diffstat (limited to 'sci-mathematics/rstudio')
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.99.486-systemd.patch22
-rw-r--r--sci-mathematics/rstudio/files/rstudio-server.service.in10
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.486-r1.ebuild (renamed from sci-mathematics/rstudio/rstudio-0.99.486.ebuild)7
3 files changed, 38 insertions, 1 deletions
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
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