From: Jerome Marant Date: Mon, 22 Aug 2005 19:50:19 +0000 (+0000) Subject: Move Emacs-related files in a separate ocaml-mode package X-Git-Tag: archive/raspbian/4.08.1-4+rpi1~3^2~738 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a34533ad3d4826310fdf2dabc2bd353e1610f732;p=ocaml.git Move Emacs-related files in a separate ocaml-mode package --- diff --git a/debian/changelog b/debian/changelog index 537dfca3..2b4c0365 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 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 Thu, 15 Jul 2004 09:21:55 +0200 -ocaml (3.07.2a-5) unstable; urgency=low - - - -- Sven Luther 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 diff --git a/debian/control b/debian/control index cc24b6fc..d5f97767 100644 --- a/debian/control +++ b/debian/control @@ -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 index 1984fb9b..00000000 --- a/debian/emacsen-install +++ /dev/null @@ -1,63 +0,0 @@ -#! /bin/sh -e -# /usr/lib/emacsen-common/packages/install/ocaml - -# Written by Jim Van Zandt , borrowing heavily -# from the install scripts for gettext by Santiago Vila -# and octave by Dirk Eddelbuettel . - -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 index 4633c244..00000000 --- a/debian/emacsen-remove +++ /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 index b7b54fa9..00000000 --- a/debian/emacsen-startup +++ /dev/null @@ -1,22 +0,0 @@ -;; -*-emacs-lisp-*- -;; -;; Emacs startup file for the Debian GNU/Linux ocaml package -;; -;; Originally contributed by Nils Naumann -;; Modified by Dirk Eddelbuettel -;; Adapted for dh-make by Jim Van Zandt - -;; 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) diff --git a/debian/ocaml-base-nox.README.Debian b/debian/ocaml-base-nox.README.Debian index 911b2466..5a36ab4e 100644 --- a/debian/ocaml-base-nox.README.Debian +++ b/debian/ocaml-base-nox.README.Debian @@ -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//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//stublibs which is searched before /usr/lib/ocaml//stublibs. - -- Mike Furr , Thu Jun 24 14:23:14 2004 + -- Jerome Marant , 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 index 00000000..cb6871cd --- /dev/null +++ b/debian/ocaml-mode.emacsen-install @@ -0,0 +1,63 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/ocaml-mode + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +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 index 00000000..abc5bd3f --- /dev/null +++ b/debian/ocaml-mode.emacsen-remove @@ -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 index 00000000..eff69193 --- /dev/null +++ b/debian/ocaml-mode.emacsen-startup @@ -0,0 +1,22 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file for the Debian GNU/Linux ocaml package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; 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 index 00000000..471bb964 --- /dev/null +++ b/debian/ocaml-nox.NEWS @@ -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 Sat, 20 Aug 2005 13:30:25 +0200 + diff --git a/debian/ocaml-nox.dirs b/debian/ocaml-nox.dirs index b7f3a6c0..18bef22a 100644 --- a/debian/ocaml-nox.dirs +++ b/debian/ocaml-nox.dirs @@ -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 diff --git a/debian/ocaml-nox.postinst b/debian/ocaml-nox.postinst index 2340095b..64c06234 100644 --- a/debian/ocaml-nox.postinst +++ b/debian/ocaml-nox.postinst @@ -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# diff --git a/debian/rules b/debian/rules index 186a8d79..80c46f3c 100755 --- a/debian/rules +++ b/debian/rules @@ -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/-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 \