diff -u nxml-mode-20041004/debian/emacsen-install nxml-mode-20041004/debian/emacsen-install --- nxml-mode-20041004/debian/emacsen-install +++ nxml-mode-20041004/debian/emacsen-install @@ -8,7 +8,8 @@ FLAVOR=$1 PACKAGE=nxml-mode -if [ ${FLAVOR} != emacs21 -a ${FLAVOR} != emacs-snapshot ]; then exit 0; fi +if [ ${FLAVOR} != emacs22 ] && [ ${FLAVOR} != emacs21 ] && \ + [ ${FLAVOR} != emacs-snapshot ]; then exit 0; fi echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} @@ -34,12 +35,16 @@ cd ${ELDIR} FILES=`echo *.el` -cp ${FILES} ${ELCDIR} cd ${ELCDIR} +ln -sf ${ELDIR}/*.el . cat << EOF > path.el (setq load-path (cons "." load-path) byte-compile-warnings nil) EOF ${FLAVOR} ${FLAGS} ${FILES} -rm -f *.el path.el +rm -f path.el + +for d in char-name schema; do + ln -sf ${ELDIR}/${d} ${ELCDIR}/${d} +done exit 0 diff -u nxml-mode-20041004/debian/rules nxml-mode-20041004/debian/rules --- nxml-mode-20041004/debian/rules +++ nxml-mode-20041004/debian/rules @@ -6,6 +6,8 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +include /usr/share/dpatch/dpatch.make + CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -25,7 +27,7 @@ touch configure-stamp -build: build-stamp +build: patch build-stamp build-stamp: configure-stamp dh_testdir @@ -36,13 +38,13 @@ touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. - -$(MAKE) clean + [ ! -f Makefile ] || $(MAKE) clean dh_clean @@ -73,7 +75,8 @@ # dh_installdebconf # dh_installlogrotate dh_installemacsen --flavor=emacs21 --priority=60 - dh_installemacsen --flavor=emacs-snapshot --priority=60 + dh_installemacsen --noscripts --flavor=emacs22 --priority=60 + dh_installemacsen --noscripts --flavor=emacs-snapshot --priority=60 # dh_installpam # dh_installmime # dh_installinit diff -u nxml-mode-20041004/debian/emacsen-startup nxml-mode-20041004/debian/emacsen-startup --- nxml-mode-20041004/debian/emacsen-startup +++ nxml-mode-20041004/debian/emacsen-startup @@ -9,19 +9,21 @@ -;; The nxml-mode 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: -(debian-pkg-add-load-path-item "/usr/share/emacs/site-lisp/nxml-mode") -(debian-pkg-add-load-path-item (concat "/usr/share/" - (symbol-name flavor) - "/site-lisp/nxml-mode")) +(if (not (file-exists-p "/usr/share/emacs/site-lisp/nxml-mode")) + (message "Package nxml-mode removed but not purged. Skipping setup.") -;; Load the package. Note that we have to load the *source* of rng-auto -;; for it to properly find the schemas. -(load "rng-auto.el") - -;; Comment this out if you want to use PSGML or another mode to edit -;; these files. -(setq auto-mode-alist - (cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode) - auto-mode-alist)) + ;; The nxml-mode 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: + (debian-pkg-add-load-path-item (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/nxml-mode")) + + ;; Load the package. Note that we have to load the *source* of rng-auto + ;; for it to properly find the schemas. + (load "rng-auto.el") + + ;; Comment this out if you want to use PSGML or another mode to edit + ;; these files. + (setq auto-mode-alist + (cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode) + auto-mode-alist))) diff -u nxml-mode-20041004/debian/control nxml-mode-20041004/debian/control --- nxml-mode-20041004/debian/control +++ nxml-mode-20041004/debian/control @@ -1,15 +1,15 @@ Source: nxml-mode Section: editors Priority: optional -Maintainer: Chris Lawrence -Build-Depends: debhelper (>> 4) -Build-Depends-Indep: texinfo, emacs21 | emacs-snapshot -Build-Conflicts: nxml-mode +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Chris Lawrence +Build-Depends: debhelper (>> 4), dpatch (>= 2.0.9) +Build-Depends-Indep: texinfo, emacs22 | emacs21 | emacs-snapshot Standards-Version: 3.7.2 Package: nxml-mode Architecture: all -Depends: emacs21 | emacs-snapshot, emacsen-common (>= 1.4.14) +Depends: emacs22 | emacs21 | emacs-snapshot, emacsen-common (>= 1.4.14) Suggests: libxml2-utils, xsltproc, trang Description: Emacs mode for editing XML documents using RELAX NG schemas This is a new major mode for GNU Emacs for editing XML documents. It diff -u nxml-mode-20041004/debian/changelog nxml-mode-20041004/debian/changelog --- nxml-mode-20041004/debian/changelog +++ nxml-mode-20041004/debian/changelog @@ -1,3 +1,33 @@ +nxml-mode (20041004-6ubuntu1) gutsy; urgency=low + + * debian/control: + - (Build-Depends): Add dpatch. + - (Build-Depends-Indep): Add emacs22. + - (Maintainer): Set to Ubuntu MOTU. + - (XSBC-Original-Maintainer): Set to Debian maintainer. + - (Build-Conflicts): Remove. + - (Depends): Add emacs22. + * debian/emacsen-install: + - Fix bashism. + - Support Emacs 22. + - Install symlinks to .el files. + - Install symlinks to char-name and schema directories. This is much + easier than patching rng-auto.el to DTRT. + * debian/emacsen-startup: + - Handle case where package is removed but not purged. + - Don't include the shared site-lisp directory, since this causes + problems when using `find-function' and `find-library'. + * debian/patches: + - debian-use-siteflag.dpatch: New patch that causes the build process + to skip loading site files and user settings. + - Turn all other Debian modifications into separate patches. + * debian/rules: + - Include dpatch support. + - (clean): Fix lintian warning. + - (binary-indep): Call dh_installemacsen for emacs22 as well. + + -- Michael W. Olson (GNU address) Wed, 04 Jul 2007 17:40:00 -0400 + nxml-mode (20041004-6) unstable; urgency=low * Apply patch to fix "range striding over charsets" error with reverted: --- nxml-mode-20041004/schema/xhtml-legacy.rnc +++ nxml-mode-20041004.orig/schema/xhtml-legacy.rnc @@ -88,7 +88,7 @@ ul.attlist &= attribute type { text }?, attribute compact { "compact" }? +align.attrib = attribute align { "left" | "all" | "right" | "none" }? -align.attrib = attribute align { "left" | "center" | "right" | "justify" }? Color.datatype = text Inline.class |= font | basefont | s | strike | u Block.class |= center | isindex reverted: --- nxml-mode-20041004/xsd-regexp.el +++ nxml-mode-20041004.orig/xsd-regexp.el @@ -290,8 +290,7 @@ (defun xsdre-compile-single-char (ch) (if (memq ch '(?. ?* ?+ ?? ?\[ ?\] ?^ ?$ ?\\)) (string ?\\ ch) + (string (decode-char 'ucs ch)))) - (let ((utf-translate-cjk-mode nil)) - (string (decode-char 'ucs ch))))) (defun xsdre-char-class-to-range-list (cc) "Return a range-list for a symbolic char-class." @@ -404,8 +403,7 @@ (setq range-list (cdr range-list))) (setq chars (mapcar (lambda (c) + (decode-char 'ucs c)) - (let ((utf-translate-cjk-mode nil)) - (decode-char 'ucs c))) chars)) (when caret (setq chars (cons ?^ chars))) reverted: --- nxml-mode-20041004/rng-auto.el +++ nxml-mode-20041004.orig/rng-auto.el @@ -56,7 +56,8 @@ (let* ((dir (file-name-directory load-file-name)) (schema-dir (concat dir "schema/"))) + (unless (member dir load-path) + (setq load-path (cons dir load-path))) - (add-to-list 'load-path dir 'append) (setq rng-schema-locating-files-default (list "schemas.xml" (abbreviate-file-name only in patch2: unchanged: --- nxml-mode-20041004.orig/debian/patches/00list +++ nxml-mode-20041004/debian/patches/00list @@ -0,0 +1,4 @@ +xhtml-legacy-align +range-striding-over-charsets +startup-bogosity +debian-use-siteflag only in patch2: unchanged: --- nxml-mode-20041004.orig/debian/patches/debian-use-siteflag.dpatch +++ nxml-mode-20041004/debian/patches/debian-use-siteflag.dpatch @@ -0,0 +1,44 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## debian-use-siteflag.dpatch by Michael Olson +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: This causes the build process to skip loading site files and +## DP: user customizations. + +@DPATCH@ +--- old/Makefile 2007-07-01 18:15:21.000000000 -0400 ++++ new/Makefile 2007-07-01 18:16:43.000000000 -0400 +@@ -25,7 +25,7 @@ + + stamp-byte-compile: $(SRC) + -rm -f $(ELC) +- $(EMACS) -batch -l rng-auto.el -f rng-byte-compile-load ++ $(EMACS) -q --no-site-file -batch -l rng-maint.el -f rng-byte-compile-load + touch $(@) + + all: stamp-byte-compile nxml-mode.info +@@ -40,10 +40,10 @@ + $(MAKEINFO) $< + + nxml-mode.texi: nxml-mode.xml +- $(EMACS) -batch -l rng-auto.el -f rng-format-manual ++ $(EMACS) -q --no-site-file -batch -l rng-maint.el -f rng-format-manual + + VERSION: stamp-byte-compile rng-auto.el +- $(EMACS) -batch -l rng-auto.el -f rng-write-version ++ $(EMACS) -q --no-site-file -batch -l rng-maint.el -f rng-write-version + + TAGS: $(SRC) + $(ETAGS) $(SRC) + +--- old/rng-maint.el 2007-07-01 18:15:21.000000000 -0400 ++++ new/rng-maint.el 2007-07-01 18:16:43.000000000 -0400 +@@ -340,4 +340,8 @@ + (while (rng-do-some-validation + (lambda () t)))) + ++(condition-case nil ++ (load "rng-auto.el") ++ (error nil)) ++ + ;;; rng-maint.el ends here only in patch2: unchanged: --- nxml-mode-20041004.orig/debian/patches/xhtml-legacy-align.dpatch +++ nxml-mode-20041004/debian/patches/xhtml-legacy-align.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## xhtml-legacy.dpatch by Chris Lawrence +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix xhtml-legacy.rnc to use correct values for align attribute. + +@DPATCH@ +--- nxml-mode-20041004.orig/schema/xhtml-legacy.rnc ++++ nxml-mode-20041004/schema/xhtml-legacy.rnc +@@ -88,7 +88,7 @@ + ul.attlist &= + attribute type { text }?, + attribute compact { "compact" }? +-align.attrib = attribute align { "left" | "all" | "right" | "none" }? ++align.attrib = attribute align { "left" | "center" | "right" | "justify" }? + Color.datatype = text + Inline.class |= font | basefont | s | strike | u + Block.class |= center | isindex only in patch2: unchanged: --- nxml-mode-20041004.orig/debian/patches/range-striding-over-charsets.dpatch +++ nxml-mode-20041004/debian/patches/range-striding-over-charsets.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## range-striding-over-charsets.dpatch by Chris Lawrence +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix "range striding over charsets" error with emacs-snapshot. + +@DPATCH@ +--- nxml-mode-20041004.orig/xsd-regexp.el ++++ nxml-mode-20041004/xsd-regexp.el +@@ -290,7 +290,8 @@ + (defun xsdre-compile-single-char (ch) + (if (memq ch '(?. ?* ?+ ?? ?\[ ?\] ?^ ?$ ?\\)) + (string ?\\ ch) +- (string (decode-char 'ucs ch)))) ++ (let ((utf-translate-cjk-mode nil)) ++ (string (decode-char 'ucs ch))))) + + (defun xsdre-char-class-to-range-list (cc) + "Return a range-list for a symbolic char-class." +@@ -403,7 +404,8 @@ + (setq range-list (cdr range-list))) + (setq chars + (mapcar (lambda (c) +- (decode-char 'ucs c)) ++ (let ((utf-translate-cjk-mode nil)) ++ (decode-char 'ucs c))) + chars)) + (when caret + (setq chars (cons ?^ chars))) only in patch2: unchanged: --- nxml-mode-20041004.orig/debian/patches/startup-bogosity.dpatch +++ nxml-mode-20041004/debian/patches/startup-bogosity.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## startup-bogosity.dpatch by Chris Lawrence +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix "startup boogosity". + +@DPATCH@ +--- nxml-mode-20041004.orig/rng-auto.el ++++ nxml-mode-20041004/rng-auto.el +@@ -56,8 +56,7 @@ + + (let* ((dir (file-name-directory load-file-name)) + (schema-dir (concat dir "schema/"))) +- (unless (member dir load-path) +- (setq load-path (cons dir load-path))) ++ (add-to-list 'load-path dir 'append) + (setq rng-schema-locating-files-default + (list "schemas.xml" + (abbreviate-file-name