nxml-mode and ELPA
Tom Tromey <[email protected]>
| Newsgroups | gmane.emacs.nxml.general |
|---|---|
| Message-ID | <[email protected]> |
The following message is a courtesy copy of an article
that has been posted to gmane.emacs.nxml.general as well.
Hi. I'd like to include nxml in ELPA. If you aren't aware of it,
ELPA is the Emacs Lisp Package Archive. It is a simple way for users
to download and install elisp packages. More info here:
http://tromey.com/elpa/
I've appended the patch I use to create the ELPA package. An ELPA
package is very similar to what nxml already ships -- I really only
needed to add the '-pkg.el' file.
I know that nxml was recently checked in to Emacs CVS. package.el
(the client side of ELPA) can handle this properly; I will release a
package.el update that knows that an updated nxml is in Emacs 23.
Is 20041004 the latest nxml version? That is the latest I saw on the
web site, and I didn't see 'nxml-version' defined in Emacs CVS.
I don't like to upload a package if the maintainers are against it.
So, if you'd rather I don't, please say so.
If you don't mind if I upload nxml, and if you do another standalone
nxml release, I'd appreciate email mentioning that, so I can upload
the new version. I've posted this from my ELPA account for that
reason.
thanks,
Tom
Index: nxml-mode-20041004/Makefile
===================================================================
--- nxml-mode-20041004.orig/Makefile
+++ nxml-mode-20041004/Makefile
@@ -49,15 +49,34 @@ TAGS: $(SRC)
$(ETAGS) $(SRC)
dist: stamp-byte-compile $(EXTRA)
+ $(MAKE) ELPA=no do-dist
+
+elpa: $(EXTRA)
+ $(MAKE) ELPA=yes do-dist
+
+do-dist:
@version=`cat VERSION`; \
set -e; \
- echo Making $(PACKAGE)-$$version.tar.gz; \
+ if test "$(ELPA)" = yes; then \
+ file=$(PACKAGE)-$$version.tar; \
+ tarflag= ; \
+ else \
+ file=$(PACKAGE)-$$version.tar.gz; \
+ tarflag=z ; \
+ fi; \
+ echo Making $$file; \
rm -fr $(PACKAGE)-$$version; \
mkdir $(PACKAGE)-$$version; \
cd $(PACKAGE)-$$version; \
- for f in $(EXTRA) $(SRC) $(ELC); do \
+ for f in $(EXTRA) $(SRC); do \
ln -s ../$$f .; \
done; \
+ if test "$(ELPA)" = no; then \
+ for f in $(ELC); do \
+ ln -s ../$$f .; \
+ done; \
+ fi; \
+ sed -e "s/VERSION/$$version/" < ../nxml-mode-pkg.el > nxml-mode-pkg.el; \
mkdir schema; \
cd schema; \
for f in ../../schema/*.rnc ../../schema/*.xml; do \
@@ -71,7 +90,7 @@ dist: stamp-byte-compile $(EXTRA)
ln -s $$f .; \
done; \
cd ../../..; \
- tar cfhz $(PACKAGE)-$$version.tar.gz $(PACKAGE)-$$version; \
+ tar cfh$$tarflag $$file $(PACKAGE)-$$version; \
rm -fr $(PACKAGE)-$$version
clean:
Index: nxml-mode-20041004/rng-auto.el
===================================================================
--- nxml-mode-20041004.orig/rng-auto.el
+++ nxml-mode-20041004/rng-auto.el
@@ -20,6 +20,9 @@
;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
;; MA 02111-1307 USA
+;;; For ELPA: arrange to load this file at package activation time.
+;;;###autoload (load "rng-auto")
+
(setq nxml-version "20041004")
(unless (and (fboundp 'make-hash-table)
Index: nxml-mode-20041004/nxml-mode-pkg.el
===================================================================
--- /dev/null
+++ nxml-mode-20041004/nxml-mode-pkg.el
@@ -0,0 +1 @@
+(define-package "nxml-mode" "VERSION" "Major mode for editing XML documents.")
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/emacs-nxml-mode/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/emacs-nxml-mode/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/