diff options
author | Ulrich Müller <ulm@gentoo.org> | 2008-10-29 12:01:02 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2008-10-29 12:01:02 +0000 |
commit | a93ef70fcfd8fd8adf8cea646ea05f769b5d1d59 (patch) | |
tree | 4947fd85fd3e329f64b18bb86198f2d8f8368482 | |
parent | Set charset to utf-8. (diff) | |
download | emacs-a93ef70fcfd8fd8adf8cea646ea05f769b5d1d59.tar.gz emacs-a93ef70fcfd8fd8adf8cea646ea05f769b5d1d59.tar.bz2 emacs-a93ef70fcfd8fd8adf8cea646ea05f769b5d1d59.zip |
Install rc support files for USE=daemon.
svn path=/emacs-overlay/; revision=1183
-rw-r--r-- | app-editors/emacs-cvs/ChangeLog | 4 | ||||
-rw-r--r-- | app-editors/emacs-cvs/Manifest | 8 | ||||
-rw-r--r-- | app-editors/emacs-cvs/emacs-cvs-23.0.9999.ebuild | 7 | ||||
-rw-r--r-- | app-editors/emacs-cvs/files/emacs-daemon.conf | 4 | ||||
-rw-r--r-- | app-editors/emacs-cvs/files/emacs-daemon.rc | 42 | ||||
-rw-r--r-- | app-editors/emacs-cvs/metadata.xml | 2 |
6 files changed, 63 insertions, 4 deletions
diff --git a/app-editors/emacs-cvs/ChangeLog b/app-editors/emacs-cvs/ChangeLog index 58a881f..4c7ae35 100644 --- a/app-editors/emacs-cvs/ChangeLog +++ b/app-editors/emacs-cvs/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 29 Oct 2008; Ulrich Mueller <ulm@gentoo.org> +files/emacs-daemon.conf, + +files/emacs-daemon.rc, metadata.xml, emacs-cvs-23.0.9999.ebuild: + Install rc support files for USE=daemon. + *emacs-cvs-23.0.9999 (29 Oct 2008) 29 Oct 2008; Ulrich Mueller <ulm@gentoo.org> diff --git a/app-editors/emacs-cvs/Manifest b/app-editors/emacs-cvs/Manifest index 2bf9962..c25ebcb 100644 --- a/app-editors/emacs-cvs/Manifest +++ b/app-editors/emacs-cvs/Manifest @@ -1,4 +1,6 @@ AUX emacs-cvs-freebsd-sparc-1.patch 448 RMD160 4f131b630ec09e1d9170374fc60a1620f0f718e9 SHA1 5bc71be91bb8008cec2473479184e250e5284c68 SHA256 e2c2e53e2995d4a505c480d17e0a7e5abff61ea96c4d3451a1e019c985a59cd8 -EBUILD emacs-cvs-23.0.9999.ebuild 8382 RMD160 3587ee2fa54df88b9d98be1e889e8353fb3db6a2 SHA1 496b4f699c11b144e52ed5f2a2af12202f70648a SHA256 e247105dcf4e1b7a3fdca0fa9006ef8ceba410db0ea1d144bc82e545966000da -MISC ChangeLog 321 RMD160 328736a40fc7a1d20917b2b7c8f1d9f23e57a51d SHA1 f9155d16158764d581ec40a171b500b7fd8319c4 SHA256 f55de5e9d782c4970b19eb80edb9c5bee736250eae86364a2ed7c741b16b8dbd -MISC metadata.xml 1606 RMD160 f898da13dfc3bdb1636e9ff7bc241997d235498b SHA1 2dea9901bc80a1d91f38628707395d9b4ef0df70 SHA256 f4df95b7db6f7b3375bdd658024520a03a763e75f4ca846ab494609f6094c9bd +AUX emacs-daemon.conf 121 RMD160 54fa96afc172f76d99048a39fdb8940a5ca73a8e SHA1 8b994cc7026ee835f37ab3f79627e8daf2198e51 SHA256 7a9ec630a5e781a03d7e0db05634719419a4b91f6dd09c32864e31d5476c8cb2 +AUX emacs-daemon.rc 974 RMD160 3cff0ec8d15aa3a628a6cbc5893d77f88aa8d1a9 SHA1 7b142731913a5f1e96f7f17eaf714c850731a28f SHA256 9211a0a910c50de59e3353f6ead17054e4a36702f0c4607d92855afefb572022 +EBUILD emacs-cvs-23.0.9999.ebuild 8539 RMD160 f845ad273a1da95bb5fa43b8d6b31d571f5803b9 SHA1 853a4fa7e917fc9c708b8faa0b73570110685035 SHA256 fe84afe6f7aff1bc238a30f21b952dd046c6bc041598e8e3bf957ab92f2144b1 +MISC ChangeLog 506 RMD160 a1311b917c8ab6498918a5f9b9b7aaea8dde4652 SHA1 ca75decaf7cc1141b9ecb527a046c1469e5e9c41 SHA256 e29a2ac252f62e4ff9c352e82f7b3efa4149c222f421c9b73606d7024447429a +MISC metadata.xml 1703 RMD160 f51be570f25475a1f0228d1c53355dda9cac56e0 SHA1 a0721293b9fe4c6d84fd41def941dd9043846722 SHA256 5e93b2462304eb8c31696d21fac7ae2320efb2075e28d24d1336b3cb1dfd662c diff --git a/app-editors/emacs-cvs/emacs-cvs-23.0.9999.ebuild b/app-editors/emacs-cvs/emacs-cvs-23.0.9999.ebuild index c53896c..b8a785b 100644 --- a/app-editors/emacs-cvs/emacs-cvs-23.0.9999.ebuild +++ b/app-editors/emacs-cvs/emacs-cvs-23.0.9999.ebuild @@ -21,7 +21,7 @@ LICENSE="GPL-3 FDL-1.2 BSD" SLOT="23" KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" -IUSE="alsa dbus gif gpm gtk gzip-el hesiod jpeg kerberos m17n-lib motif png spell sound source svg tiff toolkit-scroll-bars X Xaw3d xft xpm" +IUSE="alsa daemon dbus gif gpm gtk gzip-el hesiod jpeg kerberos m17n-lib motif png spell sound source svg tiff toolkit-scroll-bars X Xaw3d xft xpm" RESTRICT="strip" RDEPEND="sys-libs/ncurses @@ -230,6 +230,11 @@ src_install () { elisp-site-file-install 10${PN}-${SLOT}-gentoo.el fi + if use daemon; then + newinitd "${FILESDIR}/emacs-daemon.rc" emacs-daemon || die + newconfd "${FILESDIR}/emacs-daemon.conf" emacs-daemon || die + fi + dodoc README BUGS || die "dodoc failed" } diff --git a/app-editors/emacs-cvs/files/emacs-daemon.conf b/app-editors/emacs-cvs/files/emacs-daemon.conf new file mode 100644 index 0000000..bfd59b4 --- /dev/null +++ b/app-editors/emacs-cvs/files/emacs-daemon.conf @@ -0,0 +1,4 @@ +# Config file for emacs-daemon + +# Space-separated list of users for whom an Emacs daemon should be started +EMACSUSERS="" diff --git a/app-editors/emacs-cvs/files/emacs-daemon.rc b/app-editors/emacs-cvs/files/emacs-daemon.rc new file mode 100644 index 0000000..4eea991 --- /dev/null +++ b/app-editors/emacs-cvs/files/emacs-daemon.rc @@ -0,0 +1,42 @@ +#!/sbin/runscript +# $Header: $ +# Copyright 2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EMACS=/usr/bin/emacs + +checkconfig() { + local has_daemon=$(${EMACS} -batch -q --no-site-file \ + --eval "(princ (fboundp 'daemonp))") + if [ "${has_daemon}" != t ]; then + eerror "${EMACS} does not support running as a daemon" + return 1 + fi + + if [ -z "${EMACSUSERS}" ]; then + eerror "You must setup EMACSUSERS in /etc/conf.d/emacs-daemon first" + return 1 + fi + + return 0 +} + +start() { + local user fail=0 + checkconfig || return 1 + + for user in ${EMACSUSERS}; do + ebegin "Starting Emacs daemon for ${user}" + start-stop-daemon --start --chuid ${user} --user ${user} \ + --startas emacs-daemon --exec "${EMACS}" -- --daemon &>/dev/null + eend $? || fail=1 + done + + return ${fail} +} + +stop() { + ebegin "Stopping all Emacs daemons" + start-stop-daemon --stop --startas emacs-daemon --exec "${EMACS}" + eend $? +} diff --git a/app-editors/emacs-cvs/metadata.xml b/app-editors/emacs-cvs/metadata.xml index 981238a..9c72766 100644 --- a/app-editors/emacs-cvs/metadata.xml +++ b/app-editors/emacs-cvs/metadata.xml @@ -20,6 +20,8 @@ available separately. </longdescription> <use> + <flag name='daemon'>Install support files for running an Emacs daemon + as rc service</flag> <flag name='gzip-el'>Compress bundled Emacs Lisp source</flag> <flag name='hesiod'>Enable support for <pkg>net-dns/hesiod</pkg></flag> <flag name='sound'>Enable sound</flag> |