Move Emacs-related files in a separate ocaml-mode package
authorJerome Marant <jerome@debian.org>
Mon, 22 Aug 2005 19:50:19 +0000 (19:50 +0000)
committerJerome Marant <jerome@debian.org>
Mon, 22 Aug 2005 19:50:19 +0000 (19:50 +0000)
13 files changed:
debian/changelog
debian/control
debian/emacsen-install [deleted file]
debian/emacsen-remove [deleted file]
debian/emacsen-startup [deleted file]
debian/ocaml-base-nox.README.Debian
debian/ocaml-mode.emacsen-install [new file with mode: 0644]
debian/ocaml-mode.emacsen-remove [new file with mode: 0644]
debian/ocaml-mode.emacsen-startup [new file with mode: 0644]
debian/ocaml-nox.NEWS [new file with mode: 0644]
debian/ocaml-nox.dirs
debian/ocaml-nox.postinst
debian/rules

index 537dfca3a9b99106ab645e231571f3d19b20aeb2..2b4c0365bea5bfe02f26937ecc3f3af578076d75 100644 (file)
@@ -4,8 +4,28 @@ ocaml (3.08.3-8) UNRELEASED; urgency=low
   * debian/rules
     - remove spurious CVS directories from labltk examples
       (Closes: Bug#322712)
-
- -- Stefano Zacchiroli <zack@debian.org>  Fri, 19 Aug 2005 14:39:51 +0200
+  
+  Changes by Jérôme Marant:
+  * debian/control
+    - Add new ocaml-mode package section
+    - [ocaml-nox]
+      + Remove emacsen-common dependency
+      + Suggests tuareg-mode or ocaml-mode
+  * debian/ocaml-mode.dirs: New file
+  * debian/ocaml-nox.dirs: Remove emacsen-related files entries
+  * debian/ocaml-mode.emacsen-install,
+    debian/ocaml-mode.emacsen-remove,
+    debian/ocaml-mode.emacsen-startup: New files respectively renamed from
+    emacsen-install, emacsen-remove and emacsen-startup
+  * debian/rules: Install ocaml-mode files in their own location
+  * debian/ocaml-base-nox.README.Debian: Mention new ocaml-mode package
+  * debian/ocaml-nox.NEWS:
+    - New file
+    - Mention all emacs-related files moved to a separate ocaml-mode
+      package
+  * debian/changelog: Remove spurious changelog entry
+
+ -- Jerome Marant <jerome@debian.org>  Sat, 20 Aug 2005 13:34:52 +0200
 
 ocaml (3.08.3-7) unstable; urgency=low
 
@@ -183,11 +203,6 @@ ocaml (3.08.0-1) unstable; urgency=low
 
  -- Sven Luther <luther@debian.org>  Thu, 15 Jul 2004 09:21:55 +0200
 
-ocaml (3.07.2a-5) unstable; urgency=low
-
-
- -- Sven Luther <luther@debian.org>  Mon, 12 Jul 2004 12:06:33 +0200
-
 ocaml (3.07.2a-4) unstable; urgency=low
 
   * *-nox and -interp now conflict with the package which previously
index cc24b6fc221d856be98e61d4e685d8e73bec6dc9..d5f97767a6cc1ba04c2cdb59c76abe7b6ad96ecf 100644 (file)
@@ -8,8 +8,8 @@ Standards-Version: 3.6.2
 
 Package: ocaml-nox
 Architecture: any
-Depends: libncurses5-dev, ocaml-base-nox (=${Source-Version}), ocaml-base-nox-3.08.3, ocaml-interp-3.08.3, emacsen-common
-Suggests: ocaml-doc, libgdbm-dev, emacsen
+Depends: libncurses5-dev, ocaml-base-nox (=${Source-Version}), ocaml-base-nox-3.08.3, ocaml-interp-3.08.3
+Suggests: ocaml-doc, libgdbm-dev, tuareg-mode | ocaml-mode
 Recommends: ledit, file
 Provides: ocaml-nox-3.08.3 ${F:BestProvides}, libnums-ocaml-dev
 Replaces: camlp4, ocaml (<< 3.07.2a-3), libnums-ocaml-dev
@@ -147,3 +147,19 @@ Description: Ocaml interpreter and standard libraries
  This package contains several modules used internally by the ocaml
  compilers.  They are not needed for normal ocaml development, but may
  be helpful in the development of certain applications.
+
+Package: ocaml-mode
+Architecture: all
+Depends: emacs21 | emacsen
+Suggests: ocaml
+Conflicts: ocaml-nox (<< 3.08.3-8)
+Description: A major mode for editing Objective Caml in Emacs
+ This package provides support for editing both Objective Caml and
+ Caml Light programs with Emacs and XEmacs.
+ .
+ Caml-mode supports:
+  - indentation
+  - compilation and error retrieving
+  - interaction with the toplevel
+  - font-lock
+  - imenu
diff --git a/debian/emacsen-install b/debian/emacsen-install
deleted file mode 100644 (file)
index 1984fb9..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh -e
-# /usr/lib/emacsen-common/packages/install/ocaml
-
-# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
-# from the install scripts for gettext by Santiago Vila
-# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
-
-FLAVOR=$1
-PACKAGE=ocaml
-
-case ${FLAVOR} in
-    emacs20|emacs21|xemacs21)
-       ;;
-    *)
-       echo install/${PACKAGE}: Ignoring emacsen flavor ${FLAVOR}
-       exit 0
-       ;;
-esac
-
-echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
-
-FLAVORTEST=`echo $FLAVOR | cut -c-6`
-if [ ${FLAVORTEST} = xemacs ] ; then
-    SITEFLAG="-no-site-file"
-else
-    SITEFLAG="--no-site-file"
-fi
-FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
-
-ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
-ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
-
-# Install-info-altdir does not actually exist. 
-# Maybe somebody will write it.
-if test -x /usr/sbin/install-info-altdir; then
-    echo install/${PACKAGE}: install Info links for ${FLAVOR}
-    install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
-fi
-
-install -m 755 -d ${ELCDIR}
-
-cd ${ELDIR}
-case "${FLAVOR}" in
-    emacs20 | emacs21)
-       FILES=`ls *.el | grep -v caml-xemacs`
-       ;;
-
-    xemacs21)
-       FILES=`ls *.el | grep -v caml-emacs`
-       ;;
-    *)
-       ;;      
-esac
-cp ${FILES} ${ELCDIR}
-cd ${ELCDIR}
-
-cat << EOF > path.el
-(setq load-path (cons "." load-path) byte-compile-warnings nil)
-EOF
-${FLAVOR} ${FLAGS} ${FILES}
-rm -f *.el path.el
-
-exit 0
diff --git a/debian/emacsen-remove b/debian/emacsen-remove
deleted file mode 100644 (file)
index 4633c24..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh -e
-# /usr/lib/emacsen-common/packages/remove/ocaml
-
-FLAVOR=$1
-PACKAGE=ocaml
-
-if [ ${FLAVOR} != emacs ]; then
-    if test -x /usr/sbin/install-info-altdir; then
-        echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
-        install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/#PACKAGE#.info.gz
-    fi
-
-    echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
-    rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
-fi
diff --git a/debian/emacsen-startup b/debian/emacsen-startup
deleted file mode 100644 (file)
index b7b54fa..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-;; -*-emacs-lisp-*-
-;;
-;; Emacs startup file for the Debian GNU/Linux ocaml package
-;;
-;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
-;; Modified by Dirk Eddelbuettel <edd@debian.org>
-;; Adapted for dh-make by Jim Van Zandt <jrv@vanzandt.mv.com>
-
-;; The ocaml package follows the Debian/GNU Linux 'emacsen' policy and
-;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
-;; xemacs19, emacs20, xemacs20...).  The compiled code is then
-;; installed in a subdirectory of the respective site-lisp directory.
-;; We have to add this to the load-path:
-(setq load-path
-      (nconc load-path
-            (list (concat "/usr/share/"
-                          (symbol-name flavor)
-                          "/site-lisp/ocaml"))))
-(setq auto-mode-alist
-          (cons '("\\.ml[iylp]?$" . caml-mode) auto-mode-alist))
-(autoload 'caml-mode "caml" "Major mode for editing Caml code." t)
-(autoload 'run-caml "inf-caml" "Run an inferior Caml process." t)
index 911b24663b49890fa7f6496a5048cc4abdc4e96a..5a36ab4e1186821f030ffe6686b98e737ae4a22a 100644 (file)
@@ -28,6 +28,8 @@ ocaml for Debian
     need them at build time or for personal use (it should _not_ be used to
     build ocam litself).
 
+  o ocaml-mode: contains a major mode for editing OCaml files in Emacs.
+
   2) The caml include files are found under /usr/lib/ocaml/<ocaml_version>/caml.
   A symlink is provided from /usr/include/caml for convenience. If
   /usr/include/caml was previously a directory, for whatever reason, a warning
@@ -48,4 +50,4 @@ ocaml for Debian
   /usr/local/lib/ocaml/<ocaml_version>/stublibs which is searched before
   /usr/lib/ocaml/<ocaml_version>/stublibs.
 
- -- Mike Furr <mfurr@debian.org>, Thu Jun 24 14:23:14 2004
+ -- Jerome Marant <jerome@debian.org>, Sat Aug 20 11:51:32 2005
diff --git a/debian/ocaml-mode.emacsen-install b/debian/ocaml-mode.emacsen-install
new file mode 100644 (file)
index 0000000..cb6871c
--- /dev/null
@@ -0,0 +1,63 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/ocaml-mode
+
+# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
+
+FLAVOR=$1
+PACKAGE=ocaml-mode
+
+case ${FLAVOR} in
+    emacs20|emacs21|xemacs21)
+       ;;
+    *)
+       echo install/${PACKAGE}: Ignoring emacsen flavor ${FLAVOR}
+       exit 0
+       ;;
+esac
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+FLAVORTEST=`echo $FLAVOR | cut -c-6`
+if [ ${FLAVORTEST} = xemacs ] ; then
+    SITEFLAG="-no-site-file"
+else
+    SITEFLAG="--no-site-file"
+fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist. 
+# Maybe somebody will write it.
+if test -x /usr/sbin/install-info-altdir; then
+    echo install/${PACKAGE}: install Info links for ${FLAVOR}
+    install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+
+cd ${ELDIR}
+case "${FLAVOR}" in
+    emacs20 | emacs21)
+       FILES=`ls *.el | grep -v caml-xemacs`
+       ;;
+
+    xemacs21)
+       FILES=`ls *.el | grep -v caml-emacs`
+       ;;
+    *)
+       ;;      
+esac
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
diff --git a/debian/ocaml-mode.emacsen-remove b/debian/ocaml-mode.emacsen-remove
new file mode 100644 (file)
index 0000000..abc5bd3
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/ocaml-mode
+
+FLAVOR=$1
+PACKAGE=ocaml-mode
+
+if [ ${FLAVOR} != emacs ]; then
+    if test -x /usr/sbin/install-info-altdir; then
+        echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+        install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/#PACKAGE#.info.gz
+    fi
+
+    echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+    rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
diff --git a/debian/ocaml-mode.emacsen-startup b/debian/ocaml-mode.emacsen-startup
new file mode 100644 (file)
index 0000000..eff6919
--- /dev/null
@@ -0,0 +1,22 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file for the Debian GNU/Linux ocaml package
+;;
+;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
+;; Modified by Dirk Eddelbuettel <edd@debian.org>
+;; Adapted for dh-make by Jim Van Zandt <jrv@vanzandt.mv.com>
+
+;; The ocaml package follows the Debian/GNU Linux 'emacsen' policy and
+;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
+;; xemacs19, emacs20, xemacs20...).  The compiled code is then
+;; installed in a subdirectory of the respective site-lisp directory.
+;; We have to add this to the load-path:
+(setq load-path
+      (nconc load-path
+            (list (concat "/usr/share/"
+                          (symbol-name flavor)
+                          "/site-lisp/ocaml-mode"))))
+(setq auto-mode-alist
+          (cons '("\\.ml[iylp]?$" . caml-mode) auto-mode-alist))
+(autoload 'caml-mode "caml" "Major mode for editing Caml code." t)
+(autoload 'run-caml "inf-caml" "Run an inferior Caml process." t)
diff --git a/debian/ocaml-nox.NEWS b/debian/ocaml-nox.NEWS
new file mode 100644 (file)
index 0000000..471bb96
--- /dev/null
@@ -0,0 +1,8 @@
+ocaml-nox (3.08.3-8) unstable; urgency=low
+
+  * The Emacs mode for editing both Objective Caml and Caml Light
+    programs which is shipped with ocaml has been moved to its own
+    `ocaml-mode' package.
+
+ -- Jerome Marant <jerome@debian.org>  Sat, 20 Aug 2005 13:30:25 +0200
+
index b7f3a6c0f84f9373f97a723e972e226664171666..18bef22a06bf1808a66c1fca037fc6494acab998 100644 (file)
@@ -4,7 +4,6 @@ usr/lib/ocaml/3.08.3/config
 usr/include/ocaml/3.08.3
 usr/share/man/man1
 usr/share/man/man3
-usr/share/emacs/site-lisp/ocaml
 usr/share/texmf/tex/latex/misc
 usr/X11R6/include/X11/pixmaps
 usr/share/lintian/overrides
index 2340095b26e13d93ad0c2a8254eed899495f0cea..64c06234a79f9a704efead94c8302b5b9d09cb57 100644 (file)
@@ -8,6 +8,12 @@ ln -sf ../ocaml-base-nox/ocaml_packaging_policy.gz /usr/share/doc/ocaml-nox
 
 if [ "$1" = "configure" ]; then
   ocaml-md5sums update
+
+  # Get rid of Emacs conffiles from previous ocaml versions
+  for f in ocaml ocaml-nox ; do
+    [ -e "/etc/emacs/site-start.d/50$f.el" ] && \
+      rm -f "/etc/emacs/site-start.d/50$f.el"
+  done
 fi
 
 #DEBHELPER#
index 186a8d7938af721934e40c0659ef4a07db5d16e6..80c46f3ca60f187d3d382248655ba8326ffedb73 100755 (executable)
@@ -60,7 +60,7 @@ build: build-arch build-indep
 
 build-arch: build-arch-stamp
 build-arch-stamp: patch-stamp config-stamp
-       
+
        # Add here commands to compile the arch part of the package.
        if test ! -d boot.debian; then                                  \
                cp -xa boot boot.debian;                                \
@@ -80,7 +80,7 @@ build-arch-stamp: patch-stamp config-stamp
 
 build-indep: build-indep-stamp
 build-indep-stamp: patch-stamp config-stamp
-       
+
        # Add here commands to compile the indep part of the package.
        #$(MAKE) doc
 
@@ -103,7 +103,7 @@ endif
 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
        -cp -f /usr/share/misc/config.guess config/gnu/config.guess
 endif
-       
+
        dh_clean debian/README.labltk camlp4/config/Makefile.cnf camlp4/config/Makefile config/m.h config/s.h config/Makefile
 
 install: install-indep install-arch
@@ -112,7 +112,12 @@ install-indep:
        dh_testroot
        dh_clean -k -i
        dh_installdirs -i
-       
+
+       # Install Emacs files
+       $(MAKE) -C emacs EMACSDIR=$(CURDIR)/debian/ocaml-mode/usr/share/emacs/site-lisp/ocaml-mode \
+               NOCOMPILE=true simple-install
+       $(MAKE) -C emacs SCRIPTDIR=$(CURDIR)/debian/ocaml-mode/usr/bin install-ocamltags
+
        # Add here commands to install the indep part of the package into
        # debian/<package>-doc.
        for i in `cat debian/ocaml-source.files`; do                    \
@@ -137,9 +142,6 @@ install-arch:
 
        # Let's install ocaml first.
        $(MAKE) install PREFIX=$(CURDIR)/debian/ocaml-nox/usr
-       $(MAKE) -C emacs EMACSDIR=$(CURDIR)/debian/ocaml-nox/usr/share/emacs/site-lisp/ocaml \
-               NOCOMPILE=true simple-install
-       $(MAKE) -C emacs SCRIPTDIR=$(CURDIR)/debian/ocaml-nox/usr/bin install-ocamltags
        install -m 644 debian/JoeCaml.xpm \
                $(CURDIR)/debian/ocaml-nox/usr/X11R6/include/X11/pixmaps
        install -m 644 debian/ocaml-nox.override \
@@ -178,7 +180,7 @@ install-arch:
 
        # The interpreter files
        dh_movefiles -pocaml-interp                                     \
-                       --sourcedir=debian/ocaml-nox;                   \
+                       --sourcedir=debian/ocaml-nox
 
        # Some extra stuff
        install -m 644 utils/*.mli utils/*.cmi utils/*.cmo              \