summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Kennedy <mkennedy@gentoo.org>2003-09-21 01:40:41 +0000
committerMatthew Kennedy <mkennedy@gentoo.org>2003-09-21 01:40:41 +0000
commitbbcc5a7f207a4fa2a2131c7c776cb2471914f431 (patch)
tree7e7c13959f616b7e25bdb3b6471811ef7e875023 /eclass/elisp-common.eclass
parentfixed src_uri (diff)
downloadgentoo-2-bbcc5a7f207a4fa2a2131c7c776cb2471914f431.tar.gz
gentoo-2-bbcc5a7f207a4fa2a2131c7c776cb2471914f431.tar.bz2
gentoo-2-bbcc5a7f207a4fa2a2131c7c776cb2471914f431.zip
separated elisp into elisp and elisp-common
Diffstat (limited to 'eclass/elisp-common.eclass')
-rw-r--r--eclass/elisp-common.eclass56
1 files changed, 56 insertions, 0 deletions
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
new file mode 100644
index 000000000000..ed33d1b41988
--- /dev/null
+++ b/eclass/elisp-common.eclass
@@ -0,0 +1,56 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.1 2003/09/21 01:40:41 mkennedy Exp $
+#
+# Author Matthew Kennedy <mkennedy@gentoo.org>
+#
+# This is not an eclass, but it does provide emacs-related
+# installation utilities.
+
+ECLASS=elisp-common
+INHERITED="$INHERITED $ECLASS"
+
+SITELISP=/usr/share/emacs/site-lisp
+
+elisp-install() {
+ local subdir=$1
+ dodir ${SITELISP}/${subdir}
+ insinto ${SITELISP}/${subdir}
+ shift
+ doins $@
+}
+
+elisp-site-file-install() {
+ local sitefile=$1
+ pushd ${S}
+ cp ${sitefile} .
+ D=${S}/ dosed "s:@SITELISP@:${SITELISP}/${PN}:g" $(basename ${sitefile})
+ insinto ${SITELISP}
+ doins ${S}/$(basename ${sitefile})
+ popd
+}
+
+elisp-site-regen() {
+ einfo "Regenerating ${SITELISP}/site-start.el..."
+ einfo ""
+ cat <<EOF >${SITELISP}/site-start.el
+;;; DO NOT EDIT THIS FILE -- IT IS GENERATED AUTOMATICALLY BY PORTAGE
+;;; -----------------------------------------------------------------
+
+EOF
+ ls ${SITELISP}/[0-9][0-9]* |sort -n |grep -vE '~$' | \
+ while read sf
+ do
+ einfo " Adding $sf..."
+ # Great for debugging, too noisy and slow for users though
+# echo "(message \"Loading $sf...\")" >>${SITELISP}/site-start.el
+ cat $sf >>${SITELISP}/site-start.el
+ done
+ einfo ""
+}
+
+# Local Variables: ***
+# mode: shell-script ***
+# tab-width: 4 ***
+# indent-tabs-mode: t ***
+# End: ***