annotate lisp/package-admin.el @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents a4f53d9b3154
children 6240c7796c7a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
1 ;;; package-admin.el --- Installation and Maintenance of XEmacs packages
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
2
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
3 ;; Copyright (C) 1997 by Free Software Foundation, Inc.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
4
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
5 ;; Author: SL Baur <steve@altair.xemacs.org>
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
6 ;; Keywords: internal
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
7
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
9
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
10 ;; XEmacs is free software; you can redistribute it and/or modify it
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
11 ;; under the terms of the GNU General Public License as published by
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
13 ;; any later version.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
14
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
18 ;; General Public License for more details.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
19
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
23 ;; 02111-1307, USA.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
24
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
25 ;;; Synched up with: Not in FSF
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
26
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
27 ;;; Commentary:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
28
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
29 ;; First pass at lisp front end to package maintenance.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
30
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
31 ;;; Code:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
32
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
33 (require 'config)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
34
237
89ec2bb86eea Import from CVS: tag r20-5b17
cvs
parents: 217
diff changeset
35 (defvar package-admin-xemacs (concat invocation-directory invocation-name)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
36 "Location of XEmacs binary to use.")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
37
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
38 (defvar package-admin-temp-buffer "*Package Output*"
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
39 "Temporary buffer where output of backend commands is saved.")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
40
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
41 ;;;###autoload
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
42 (defun package-admin-add-single-file-package (file destdir &optional pkg-dir)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
43 "Install a single file Lisp package into XEmacs package hierarchy.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
44 `file' should be the full path to the lisp file to install.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
45 `destdir' should be a simple directory name.
243
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 237
diff changeset
46 The optional `pkg-dir' can be used to override the default package hierarchy
274
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 243
diff changeset
47 \(car \(last late-packages))."
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
48 (interactive "fLisp File: \nsDestination: ")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
49 (when (null pkg-dir)
274
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 243
diff changeset
50 (setq pkg-dir (car (last late-packages))))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
51 (let ((destination (concat pkg-dir "/lisp/" destdir))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
52 (buf (get-buffer-create package-admin-temp-buffer)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
53 (call-process "add-little-package.sh"
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
54 nil
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
55 buf
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
56 t
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
57 ;; rest of command line follows
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
58 package-admin-xemacs file destination)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
59
314
341dac730539 Import from CVS: tag r21-0b55
cvs
parents: 274
diff changeset
60 ;;;###autoload
341dac730539 Import from CVS: tag r21-0b55
cvs
parents: 274
diff changeset
61 (defun package-admin-add-binary-package (file &optional pkg-dir)
341dac730539 Import from CVS: tag r21-0b55
cvs
parents: 274
diff changeset
62 "Install a pre-bytecompiled XEmacs package into package hierarchy."
341dac730539 Import from CVS: tag r21-0b55
cvs
parents: 274
diff changeset
63 (interactive "fPackage tarball: ")
371
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
64 (when (null pkg-dir)
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
65 (when (or (not (listp late-packages))
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
66 (not late-packages))
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
67 (error "No package path"))
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
68 (setq pkg-dir (car (last late-packages))))
318
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 314
diff changeset
69
371
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
70 (let ((buf (get-buffer-create package-admin-temp-buffer)))
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
71 (call-process "add-big-package.sh"
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
72 nil
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
73 buf
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
74 t
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
75 ;; rest of command line follows
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
76 package-admin-xemacs file pkg-dir)))
318
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 314
diff changeset
77
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
78 (provide 'package-admin)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
79
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
80 ;;; package-admin.el ends here