emacs.service file for systemd (#1128723)

This commit is contained in:
Petr Hracek 2014-08-13 09:24:03 +02:00
parent fd77835c53
commit f86fe1b16f
2 changed files with 21 additions and 1 deletions

11
emacs.service Normal file
View file

@ -0,0 +1,11 @@
[Unit]
Description=Emacs: the extensible, self-documenting text editor
[Service]
Type=Forking
ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
Restart=always
[Install]
WantedBy=default.target

View file

@ -3,7 +3,7 @@ Summary: GNU Emacs text editor
Name: emacs
Epoch: 1
Version: 24.3
Release: 23%{?dist}
Release: 24%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors
@ -16,6 +16,7 @@ Source5: default.el
# Emacs Terminal Mode, #551949, #617355
Source6: emacs-terminal.desktop
Source7: emacs-terminal.sh
Source8: emacs.service
# rhbz#713600
Patch7: emacs-spellchecker.patch
@ -343,6 +344,10 @@ install -p -m 755 %SOURCE7 %{buildroot}%{_bindir}/emacs-terminal
rm -f %{buildroot}%{_infodir}/dir
rm %{buildroot}%{_localstatedir}/games/emacs/*
# Installing service file
mkdir -p %{buildroot}%{_userunitdir}
install -p -m 0644 %SOURCE8 %{buildroot}%{_userunitdir}/emacs.service
# Install desktop files
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
@ -457,6 +462,7 @@ update-desktop-database &> /dev/null || :
%{_datadir}/emacs/%{version}/etc
%{_datadir}/emacs/%{version}/site-lisp
%{_libexecdir}/emacs
%{_userunitdir}/emacs.service
%attr(0644,root,root) %config(noreplace) %{_datadir}/emacs/site-lisp/default.el
%attr(0644,root,root) %config %{_datadir}/emacs/site-lisp/site-start.el
@ -475,6 +481,9 @@ update-desktop-database &> /dev/null || :
%dir %{_datadir}/emacs/site-lisp/site-start.d
%changelog
* Wed Aug 13 2014 Petr Hracek <phracek@redhat.com> - 1:24.3-24
- emacs.service file for systemd (#1128723)
* Tue Aug 05 2014 jchaloup <jchaloup@redhat.com> - 1:24.3-23
- resolves: #1104012
initialize kbd_macro_ptr and kbd_macro_end to kdb_macro_buffer