1 ;;; package-admin.el --- Installation and Maintenance of XEmacs packages
3 ;; Copyright (C) 1997 by Free Software Foundation, Inc.
5 ;; Author: SL Baur <steve@altair.xemacs.org>
8 ;; This file is part of XEmacs.
10 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; XEmacs is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 ;;; Synched up with: Not in FSF
29 ;; First pass at lisp front end to package maintenance.
35 (defvar package-admin-xemacs (concat invocation-directory invocation-name)
36 "Location of XEmacs binary to use.")
38 (defvar package-admin-temp-buffer "*Package Output*"
39 "Temporary buffer where output of backend commands is saved.")
42 (defun package-admin-add-single-file-package (file destdir &optional pkg-dir)
43 "Install a single file Lisp package into XEmacs package hierarchy.
44 `file' should be the full path to the lisp file to install.
45 `destdir' should be a simple directory name.
46 The optional `pkg-dir' can be used to override the default package hierarchy
47 \(car \(last late-packages))."
48 (interactive "fLisp File: \nsDestination: ")
50 (setq pkg-dir (car (last late-packages))))
51 (let ((destination (concat pkg-dir "/lisp/" destdir))
52 (buf (get-buffer-create package-admin-temp-buffer)))
53 (call-process "add-little-package.sh"
57 ;; rest of command line follows
58 package-admin-xemacs file destination)))
61 (defun package-admin-add-binary-package (file &optional pkg-dir)
62 "Install a pre-bytecompiled XEmacs package into package hierarchy."
63 (interactive "fPackage tarball: ")
65 (when (or (not (listp late-packages))
67 (error "No package path"))
68 (setq pkg-dir (car (last late-packages))))
70 (let ((buf (get-buffer-create package-admin-temp-buffer)))
71 (call-process "add-big-package.sh"
75 ;; rest of command line follows
76 package-admin-xemacs file pkg-dir)))
78 (provide 'package-admin)
80 ;;; package-admin.el ends here