[cylc] 15/23: Next iter of emacsen stuff based on quilt-el

Alastair McKinstry mckinstry at moszumanska.debian.org
Sun Mar 26 12:04:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository cylc.

commit 0cc3755407ede4079577ffbf5495086e1371e9d5
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Nov 10 10:34:29 2016 +0000

    Next iter of emacsen stuff based on quilt-el
---
 debian/50cylc.el               |  5 -----
 debian/cylc-el.emacsen-install | 45 ++++++++++++++++++++++++------------------
 debian/cylc-el.emacsen-remove  | 10 +++++-----
 debian/cylc-el.emacsen-startup | 11 ++++++-----
 debian/cylc-el.install         |  1 -
 debian/rules                   |  3 +++
 6 files changed, 40 insertions(+), 35 deletions(-)

diff --git a/debian/50cylc.el b/debian/50cylc.el
deleted file mode 100644
index 0eb0c23..0000000
--- a/debian/50cylc.el
+++ /dev/null
@@ -1,5 +0,0 @@
-(if (not (file-exists-p "/usr/share/emacs/site-lisp/cylc"))
-  (message "Package cylc-el removed but not purged. Skipping setup.")
-  (autoload 'cylc-mode "cylc-mode"
-    "Major mode for editing CYLC .cylc files" t)
-  (add-to-list 'auto-mode-alist '(list '("\\.rc$" . cylc-mode))))
diff --git a/debian/cylc-el.emacsen-install b/debian/cylc-el.emacsen-install
index 094e7de..16cba86 100644
--- a/debian/cylc-el.emacsen-install
+++ b/debian/cylc-el.emacsen-install
@@ -1,28 +1,35 @@
-#!/bin/sh
-#
-# emacsen install script for the Debian GNU/Linux cylc package
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/cylc-el
+
+# Written by Jim Van Zandt <jrv at debian.org>, borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+# <sanvila at ctv.es> and octave by Dirk Eddelbuettel <edd at debian.org>.
+# Adapted for cylc by Alastair McKinstry <mckinstry at debian.org>
 
 FLAVOR=$1
 PACKAGE=cylc
 
-ELDIR=/usr/share/emacs/site-lisp/
-ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
-ELFILE="cylc-mode.el"
-FLAGS="-batch -no-site-file -l path.el -f batch-byte-compile"
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
 
-if [ ${FLAVOR} != emacs ]; then
-  echo install/${PACKAGE}: Byte-compiling for ${FLAVOR}
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+FLAGS=" -q -batch -l path.el -f batch-byte-compile"
 
-  install -m 755 -d ${ELCDIR}
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+ELRELDIR=../../../emacs/site-lisp/${PACKAGE}
 
-  # Source file symlink (emacsen policy 5C)
-  ln -s "${ELDIR}/${ELFILE}" "${ELCDIR}/${ELFILE}"
 
-  # Compile cylc-mode.el
-  cd ${ELCDIR}
-  cat << EOF > path.el
-(setq load-path (cons "." load-path) byte-compile-warnings nil)
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+FILES=`echo *.el`
+cd ${ELCDIR}
+ln -sf ${ELRELDIR}/*.el .
+
+cat << EOF > path.el
+(debian-pkg-add-load-path-item ".")
+(setq byte-compile-warnings nil)
 EOF
-  ${FLAVOR} ${FLAGS} ${ELFILE}
-  rm -f path.el
-fi
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f path.el
+
+exit 0
diff --git a/debian/cylc-el.emacsen-remove b/debian/cylc-el.emacsen-remove
index a120809..8d5dbd5 100644
--- a/debian/cylc-el.emacsen-remove
+++ b/debian/cylc-el.emacsen-remove
@@ -1,11 +1,11 @@
-#!/bin/sh
-set -e
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/cylc-el
 
 FLAVOR=$1
 PACKAGE=cylc
-ELCDIR=/usr/share/${FLAVOR}/site-lisp/cylc
 
 if [ ${FLAVOR} != emacs ]; then
-  echo remove/${PACKAGE}: Purging byte-compiled files for ${FLAVOR}
-  rm -rf "${ELCDIR}"
+
+    echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+    rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
 fi
diff --git a/debian/cylc-el.emacsen-startup b/debian/cylc-el.emacsen-startup
index 2eabb18..83da6fc 100644
--- a/debian/cylc-el.emacsen-startup
+++ b/debian/cylc-el.emacsen-startup
@@ -2,11 +2,12 @@
 ;;
 ;; Emacs startup file for the Debian GNU/Linux cmake package
 
-(if (file-exists-p "/usr/share/emacs/site-lisp/cylc/cylc-mode.el")
+(if (file-exists-p "/usr/share/emacs/site-lisp/cylc/cycl-mode.el")
  (progn
  (debian-pkg-add-load-path-item "/usr/share/emacs/site-lisp/cylc")
-  (autoload 'cylc-mode "cylc-mode"
-   "Major mode for editing cylc suite files." t)
+  (autoload 'cylc-mode "cylc"
+   "Major mode for editing Cylc RC files." t)
   (setq auto-mode-alist
-   (append '( ("\\.rc\\'" . cylc-mode)) auto-mode-alist)))
- (message "cylc removed but not purged, skipping setup"))
+   (append '( ("\\.rc\\'" . cylc-mode))
+    auto-mode-alist)))
+ (message "cylc-mode removed but not purged, skipping setup"))
diff --git a/debian/cylc-el.install b/debian/cylc-el.install
deleted file mode 100644
index 4a4d833..0000000
--- a/debian/cylc-el.install
+++ /dev/null
@@ -1 +0,0 @@
-debian/50cylc.el /etc/emacs/site-start.d
diff --git a/debian/rules b/debian/rules
index d71159f..7a3efde 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,9 @@ override_dh_auto_install:
 	find . -name '*.t' -exec chmod +x {} \;
 	find . -name test_header -exec chmod +x {} \;
 	chmod +x bin/*
+	install -d -m 0755 $(CURDIR)/debian/cylc-el/usr/share/emacs/site-lisp/cylc
+	install    -m 0644 conf/cylc-mode.el \
+                           $(CURDIR)/debian/cylc-el/usr/share/emacs/site-lisp/cylc/cylc-mode.el
 
 override_dh_fixperms:
 	# Delete after install. Use Pyro package instead.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cylc.git



More information about the debian-science-commits mailing list