diff --git a/emacs.service b/emacs.service new file mode 100644 index 0000000..b527b46 --- /dev/null +++ b/emacs.service @@ -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 diff --git a/emacs.spec b/emacs.spec index ec174c8..2337564 100644 --- a/emacs.spec +++ b/emacs.spec @@ -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 - 1:24.3-24 +- emacs.service file for systemd (#1128723) + * Tue Aug 05 2014 jchaloup - 1:24.3-23 - resolves: #1104012 initialize kbd_macro_ptr and kbd_macro_end to kdb_macro_buffer