comparison man/xemacs/packages.texi @ 448:3078fd1074e8 r21-2-39

Import from CVS: tag r21-2-39
author cvs
date Mon, 13 Aug 2007 11:38:25 +0200
parents 1ccc32a20af4
children c33ae14dd6d0
comparison
equal deleted inserted replaced
447:4fc5f13f3bd3 448:3078fd1074e8
17 17
18 @menu 18 @menu
19 * Package Terminology:: Understanding different kinds of packages. 19 * Package Terminology:: Understanding different kinds of packages.
20 * Using Packages:: How to install and use packages. 20 * Using Packages:: How to install and use packages.
21 * Building Packages:: Building packages from sources. 21 * Building Packages:: Building packages from sources.
22 * Creating Packages:: The basics.
22 * Available Packages:: A brief, out-of-date, directory of packaged LISP. 23 * Available Packages:: A brief, out-of-date, directory of packaged LISP.
23 @end menu 24 @end menu
24 25
25 @node Package Terminology, Using Packages, , Packages 26 @node Package Terminology, Using Packages, , Packages
26 @comment node-name, next, previous, up 27 @comment node-name, next, previous, up
337 That's it. Quit and restart XEmacs to get it to recognize any new or 338 That's it. Quit and restart XEmacs to get it to recognize any new or
338 changed packages. 339 changed packages.
339 340
340 @end enumerate 341 @end enumerate
341 342
342 @node Building Packages, Available Packages, Using Packages, Packages 343 @node Building Packages, Creating Packages, Using Packages, Packages
343 @comment node-name, next, previous, up 344 @comment node-name, next, previous, up
344 345
345 Source packages are available from the @file{packages/source-packages} 346 Source packages are available from the @file{packages/source-packages}
346 subdirectory of your favorite XEmacs distribution site. Alternatively, 347 subdirectory of your favorite XEmacs distribution site. Alternatively,
347 they are available via CVS from @file{cvs.xemacs.org}. Look at 348 they are available via CVS from @file{cvs.xemacs.org}. Look at
379 Bytecompile all files, build and bytecompile byproduct files like 380 Bytecompile all files, build and bytecompile byproduct files like
380 @file{auto-autoloads.el} and @file{custom-load.el}. Create info version 381 @file{auto-autoloads.el} and @file{custom-load.el}. Create info version
381 of TeXinfo documentation if present. 382 of TeXinfo documentation if present.
382 383
383 @item srckit 384 @item srckit
384 Usually aliased to @code{make srckit-std}. This does a @code{make 385 Usually aliased to @code{srckit-std}. This does a @code{make
385 distclean} and creates a package source tarball in the staging 386 distclean} and creates a package source tarball in the staging
386 directory. This is generally only of use for package maintainers. 387 directory. This is generally only of use for package maintainers.
387 388
388 @item binkit 389 @item binkit
389 May be aliased to @code{binkit-sourceonly}, @code{binkit-sourceinfo}, 390 May be aliased to @code{binkit-sourceonly}, @code{binkit-sourceinfo},
400 Runs the rules @code{srckit} followed by @code{binkit}. This is 401 Runs the rules @code{srckit} followed by @code{binkit}. This is
401 primarily of use by XEmacs maintainers producing files for distribution. 402 primarily of use by XEmacs maintainers producing files for distribution.
402 403
403 @end table 404 @end table
404 405
405 @node Available Packages, , Building Packages, Packages 406 @node Creating Packages, Available Packages, Building Packages, Packages
407 @comment node-name, next, previous, up
408
409 Creating a package from an existing Lisp library is not very difficult.
410
411 In addition to the Lisp libraries themselves, you need a
412 @file{package-info.in} file and a simple @file{Makefile}. The rest is
413 done by @file{XEmacs.rules}, part of the packaging system
414 infrastructure.
415
416 @file{package-info.in} contains a single Lisp form like this:
417
418 @example
419 (name ; your package's name
420 (standards-version 1.1
421 version VERSION
422 author-version AUTHOR_VERSION
423 date DATE
424 build-date BUILD_DATE
425 maintainer MAINTAINER
426 distribution xemacs ; change to "mule" if MULE is needed
427 priority high
428 category CATEGORY
429 dump nil
430 description "description" ; a one-line description string
431 filename FILENAME
432 md5sum MD5SUM
433 size SIZE
434 provides (feature1 feature2) ; one for every `provides' form
435 requires (REQUIRES)
436 type regular
437 ))
438 @end example
439
440 You must fill in the four commented lines. The value of @code{name} is
441 the name of your package as an unquoted symbol. Normally it is the name
442 of the main Lisp file or principal feature provided. The allowed values
443 for distribution are @code{xemacs} and @code{mule}. Write them as
444 unquoted symbols. The @code{description} is a quoted Lisp string; use
445 the usual conventions. The value for @code{provides} is a list of
446 feature symbols (written unquoted). All of the features provided by
447 libraries in your package should be elements of this list. Implementing
448 an automatic method for generating the @file{provides} line is
449 desirable, but as yet undone.
450
451 The variables in upper-case are references to variables set in the
452 @file{Makefile} or automatically generated. Do not change them; they
453 are automatically filled in by the build process.
454
455 The remaining lines refer to implementation constants
456 (@code{standards-version}), or features that are unimplemented or have
457 been removed (@code{priority} and @code{dump}). The @code{type} line is
458 not normally relevant to external maintainers; the alternate value is
459 @code{single-file}, which refers to packages consed up out of a number
460 of single-file libraries that are more or less thematically related. An
461 example is @code{prog-modes}. Single-file packages are basically for
462 administrative convenience, and new packages should generally be created
463 as regular packages.
464
465 The @file{Makefile} is quite stylized. The idea is similar to an
466 @file{Imakefile} or an @code{automake} file: the complexity is hidden in
467 generic rules files, in this case the @file{XEmacs.rules} include file
468 in the top directory of the packages hierarchy. Although a number of
469 facilities are available for complex libraries, most simple packages'
470 @file{Makefile}s contain a copyright notice, a few variable definitions,
471 an include for @file{XEmacs.rules}, and a couple of standard targets.
472
473 The first few @code{make} variables defined are @code{VERSION},
474 @code{AUTHOR_VERSION}, @code{MAINTAINER}, @code{PACKAGE},
475 @code{PKG_TYPE}, @code{REQUIRES}, and @code{CATEGORY}. All but one were
476 described in the description of @file{package-info.in}. The last is an
477 admistrative grouping. Current categories include @code{comm},
478 @code{games}, @code{libs}, @code{mule}, @code{oa}, @code{os},
479 @code{prog}, and @code{wp}. @ref{Available Packages}, for a list of
480 categories.
481
482 Next, define the variable @code{ELCS}. This contains the list of the
483 byte-compiled Lisp files used by the package. These files and their
484 @file{.el} versions will be included in the binary package. If there
485 are other files (such as extra Lisp sources or an upstream
486 @file{Makefile}) that are normally placed in the installed Lisp
487 directory, but not byte-compiled, they can be listed as the value of
488 @code{EXTRA_SOURCES}.
489
490 The include is simply
491 @example
492 include ../../XEmacs.rules
493 @end example
494
495 The standard targets follow. These are
496
497 @example
498 all:: $(ELCS) auto-autoloads.elc
499
500 srckit: srckit-alias
501
502 binkit: binkit-alias
503 @end example
504
505 Other targets (such as Texinfo sources) may need to be added as
506 dependencies for the @code{all} target. Dependencies for @code{srckit}
507 and @code{binkit} (that is, values for @var{srckit-alias} and
508 @var{binkit-alias}) are defined in @file{XEmacs.rules}. The most useful
509 of these values are given in the following table.
510
511 @table @var
512 @item srckit-alias
513 Usually set to @code{srckit-std}.
514
515 @item binkit-alias
516 May be set to @code{binkit-sourceonly}, @code{binkit-sourceinfo},
517 @code{binkit-sourcedata}, or
518 @code{binkit-sourcedatainfo}. @code{sourceonly} indicates there is
519 nothing to install in a data directory or info directory.
520 @code{sourceinfo} indicates that source and info files are to be
521 installed. @code{sourcedata} indicates that source and etc (data) files
522 are to be installed. @code{sourcedatainfo} indicates source, etc
523 (data), and info files are to be installed.
524 @end table
525
526 Data files include things like pixmaps for a package-specific toolbar,
527 and are normally installed in @file{etc/@var{PACKAGE_NAME}}. A few
528 packages have needs beyond the basic templates. See @file{XEmacs.rules}
529 or a future revision of this manual for details.
530
531 @node Available Packages, , Creating Packages, Packages
406 @comment node-name, next, previous, up 532 @comment node-name, next, previous, up
407 533
408 This section is surely out-of-date. If you're sure that XEmacs is 534 This section is surely out-of-date. If you're sure that XEmacs is
409 able to do something, but your installed XEmacs won't do it for you, 535 able to do something, but your installed XEmacs won't do it for you,
410 it's probably in a package. If you can't find it in this section, 536 it's probably in a package. If you can't find it in this section,