From 6dfd288962043a87938817fed6aea7000bb8d325 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich=20M=C3=BCller?= Date: Sun, 22 Sep 2019 18:14:54 +0200 Subject: [PATCH] app-editors/emacs-vcs: Install systemd unit file. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug: https://bugs.gentoo.org/694542 Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Ulrich Müller --- app-editors/emacs-vcs/emacs-vcs-26.3.9999.ebuild | 9 +++++++++ app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/app-editors/emacs-vcs/emacs-vcs-26.3.9999.ebuild b/app-editors/emacs-vcs/emacs-vcs-26.3.9999.ebuild index 03b0618a410f..bc37463010be 100644 --- a/app-editors/emacs-vcs/emacs-vcs-26.3.9999.ebuild +++ b/app-editors/emacs-vcs/emacs-vcs-26.3.9999.ebuild @@ -304,6 +304,15 @@ src_install () { # remove COPYING file (except for etc/COPYING used by describe-copying) rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING + if use systemd; then + insinto /usr/lib/systemd/user + sed -e "/^##/d" \ + -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ + -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ + etc/emacs.service | newins - ${EMACS_SUFFIX}.service + assert + fi + if use gzip-el; then # compress .el files when a corresponding .elc exists find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ diff --git a/app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild b/app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild index cb262d172dd2..3ee98c8520ad 100644 --- a/app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild +++ b/app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild @@ -311,6 +311,15 @@ src_install () { # remove COPYING file (except for etc/COPYING used by describe-copying) rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING + if use systemd; then + insinto /usr/lib/systemd/user + sed -e "/^##/d" \ + -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ + -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ + etc/emacs.service | newins - ${EMACS_SUFFIX}.service + assert + fi + if use gzip-el; then # compress .el files when a corresponding .elc exists find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ -- 2.26.2