Mercurial > hg > xemacs-beta
comparison man/lispref/packaging.texi @ 2955:4d269e525e21
[xemacs-hg @ 2005-09-26 22:18:59 by adrian]
xemacs-21.5-clean: Getting texinfmt.el to compile core .texi again
-------------------- ChangeLog entries follow: --------------------
man/ChangeLog addition:
2005-09-27 Adrian Aichner <adrian@xemacs.org>
* lispref/packaging.texi: Get file to compile with teinfmt.el.
* lispref/packaging.texi (Packaging): Ditto.
* lispref/packaging.texi (Package Overview): Ditto.
* lispref/packaging.texi (The User View): Ditto.
* lispref/packaging.texi (The Library Maintainer View): Ditto.
* lispref/packaging.texi (Infrastructure): Ditto.
* lispref/packaging.texi (Obtaining): Ditto.
* lispref/packaging.texi (Local.rules File): Ditto.
* lispref/packaging.texi (package-info.in): Ditto.
* lispref/packaging.texi (Makefile): Ditto.
* lispref/packaging.texi (Documenting Packages): Ditto.
2005-09-27 Adrian Aichner <adrian@xemacs.org>
* internals/internals.texi (A Summary of the Various XEmacs
Modules): Get file to compile with texinfmt.el.
* internals/internals.texi (Windows Build Flags): Ditto.
author | adrian |
---|---|
date | Mon, 26 Sep 2005 22:19:05 +0000 |
parents | f43f9ca6c7d9 |
children | 15139dbf89f4 |
comparison
equal
deleted
inserted
replaced
2954:db335401794c | 2955:4d269e525e21 |
---|---|
6 @setfilename ../../info/packaging.info | 6 @setfilename ../../info/packaging.info |
7 | 7 |
8 @c Macro to make formatting of the XEmacs pms name consistent. | 8 @c Macro to make formatting of the XEmacs pms name consistent. |
9 @c Maybe @sc looks OK in HTML? If so, condition on Info. | 9 @c Maybe @sc looks OK in HTML? If so, condition on Info. |
10 @iftex | 10 @iftex |
11 @macro xpms | 11 @set xpms XE@sc{macs} Packaging System |
12 XE@sc{macs} Packaging System | |
13 @end macro | |
14 @end iftex | 12 @end iftex |
15 @ifnottex | 13 @ifnottex |
16 @macro xpms | 14 @set xpms XEmacs Packaging System |
17 XEmacs Packaging System | |
18 @end macro | |
19 @end ifnottex | 15 @end ifnottex |
20 | 16 |
21 @node Packaging, Lisp Data Types, Introduction, Top | 17 @node Packaging, Lisp Data Types, Introduction, Top |
22 @chapter The @xpms{} | 18 @chapter The @value{xpms} |
23 @cindex package | 19 @cindex package |
24 @cindex packaging | 20 @cindex packaging |
25 | 21 |
26 The XEmacs distribution, starting with version 21, comes only with a | 22 The XEmacs distribution, starting with version 21, comes only with a |
27 very basic set of built-in modes and libraries. Most of the libraries | 23 very basic set of built-in modes and libraries. Most of the libraries |
30 choose which packages to install; the actual installation process is | 26 choose which packages to install; the actual installation process is |
31 easy. This gives an installer the ability to tailor an XEmacs | 27 easy. This gives an installer the ability to tailor an XEmacs |
32 installation for local needs with safe removal of unnecessary code. | 28 installation for local needs with safe removal of unnecessary code. |
33 | 29 |
34 This chapter describes how to package Lisp libraries for use with the | 30 This chapter describes how to package Lisp libraries for use with the |
35 @xpms{}. | 31 @value{xpms}. |
36 | 32 |
37 @emph{Please note carefully} that the term @dfn{package} as used in | 33 @emph{Please note carefully} that the term @dfn{package} as used in |
38 XEmacs refers to an aggregation of Lisp code and/or data distributed as | 34 XEmacs refers to an aggregation of Lisp code and/or data distributed as |
39 a unit. It does not, as it does in many Lisps, refer to a way of | 35 a unit. It does not, as it does in many Lisps, refer to a way of |
40 creating separate name spaces. XEmacs has no facility for providing | 36 creating separate name spaces. XEmacs has no facility for providing |
48 | 44 |
49 Packaging Lisp Libraries: | 45 Packaging Lisp Libraries: |
50 * Package Terminology:: Basic stuff. | 46 * Package Terminology:: Basic stuff. |
51 * Building Packages:: Turn packaged source into a tarball. | 47 * Building Packages:: Turn packaged source into a tarball. |
52 * Makefile Targets:: Package @file{Makefile} targets | 48 * Makefile Targets:: Package @file{Makefile} targets |
53 * Local.rules File:: Tell the @xpms{} about your host. | 49 * Local.rules File:: Tell the @value{xpms} about your host. |
54 * Creating Packages:: Tell the @xpms{} about your package. | 50 * Creating Packages:: Tell the @value{xpms} about your package. |
55 * Documenting Packages:: Explain your package to users and hackers. | 51 * Documenting Packages:: Explain your package to users and hackers. |
56 @c * History:: History of the @xpms{} | 52 @c * History:: History of the @value{xpms} |
57 @c * Installation:: Installing the @xpms{} with your (X)Emacs. | 53 @c * Installation:: Installing the @value{xpms} with your (X)Emacs. |
58 @c * Configuration:: Configuring the @xpms{} for use. | 54 @c * Configuration:: Configuring the @value{xpms} for use. |
59 @c * Usage:: An overview of the operation of the @xpms{}. | 55 @c * Usage:: An overview of the operation of the @value{xpms}. |
60 @c * Bug Reports:: Reporting Bugs and Problems | 56 @c * Bug Reports:: Reporting Bugs and Problems |
61 @c * Frequently Asked Questions:: Questions and answers from the mailing list. | 57 @c * Frequently Asked Questions:: Questions and answers from the mailing list. |
62 | 58 |
63 Internals and Package Release Engineering: | 59 Internals and Package Release Engineering: |
64 * Issues:: | 60 * Issues:: |
65 @end menu | 61 @end menu |
66 | 62 |
67 @node Package Overview, Package Terminology, , Packaging | 63 @node Package Overview, Package Terminology, , Packaging |
68 @chapter An overview of the @xpms{} | 64 @chapter An overview of the @value{xpms} |
69 | 65 |
70 The @xpms{} is a system for administering the installation, upgrade, and | 66 The @value{xpms} is a system for administering the installation, upgrade, and |
71 removal of Lisp libraries. For the end user, it provides facilities for | 67 removal of Lisp libraries. For the end user, it provides facilities for |
72 determining availability of packages and which versions at remote | 68 determining availability of packages and which versions at remote |
73 sites. It will download and automatically install a package, ensuring | 69 sites. It will download and automatically install a package, ensuring |
74 that any old files from previous versions of the package are removed | 70 that any old files from previous versions of the package are removed |
75 first. By providing a standard set of hierarchies for installation, it | 71 first. By providing a standard set of hierarchies for installation, it |
90 order to reduce this cost, XEmacs imposes fairly strict conditions on | 86 order to reduce this cost, XEmacs imposes fairly strict conditions on |
91 the structure of an installed package. | 87 the structure of an installed package. |
92 | 88 |
93 Meeting these requirements, as well as simply providing the | 89 Meeting these requirements, as well as simply providing the |
94 auto-autoloads and the information about availability and so on does | 90 auto-autoloads and the information about availability and so on does |
95 impose some costs on the library maintainer. The @xpms{} also provides | 91 impose some costs on the library maintainer. The @value{xpms} also provides |
96 structure and utilities to the library maintainer to make these tasks | 92 structure and utilities to the library maintainer to make these tasks |
97 easier. This manual documents the requirements and the tools that the | 93 easier. This manual documents the requirements and the tools that the |
98 @xpms{} provides to ensure that a package satisfies them. | 94 @value{xpms} provides to ensure that a package satisfies them. |
99 | 95 |
100 @menu | 96 @menu |
101 * The User View:: | 97 * The User View:: |
102 * The Library Maintainer View:: | 98 * The Library Maintainer View:: |
103 * The Package Release Engineer View:: | 99 * The Package Release Engineer View:: |
120 Here the main consideration is that the tarball ``expects'' to be | 116 Here the main consideration is that the tarball ``expects'' to be |
121 unpacked from the top of a package hierarchy. A @dfn{package hierarchy} | 117 unpacked from the top of a package hierarchy. A @dfn{package hierarchy} |
122 is basically an image of a classic Emacs ``run-in-place'' tree, with | 118 is basically an image of a classic Emacs ``run-in-place'' tree, with |
123 @file{lisp}, @file{etc}, @file{info}, @file{man}, @file{lib-src}, and | 119 @file{lisp}, @file{etc}, @file{info}, @file{man}, @file{lib-src}, and |
124 @file{pkginfo} subdirectories of the top. The @file{pkginfo} | 120 @file{pkginfo} subdirectories of the top. The @file{pkginfo} |
125 subdirectory is for use by the @xpms{} administration tools, and | 121 subdirectory is for use by the @value{xpms} administration tools, and |
126 currently contains a @file{MANIFEST.@var{package-name}} file for each | 122 currently contains a @file{MANIFEST.@var{package-name}} file for each |
127 package to ensure that no cruft remains when a package is removed or | 123 package to ensure that no cruft remains when a package is removed or |
128 updated. The @file{lisp}, @file{etc}, and @file{lib-src} subdirectories | 124 updated. The @file{lisp}, @file{etc}, and @file{lib-src} subdirectories |
129 are further subdivided, with a subdirectory for each package. The | 125 are further subdivided, with a subdirectory for each package. The |
130 @file{info} directory obeys the usual conventions. | 126 @file{info} directory obeys the usual conventions. |
240 | 236 |
241 | 237 |
242 @node The Library Maintainer View, The Package Release Engineer View, The User View, Package Overview | 238 @node The Library Maintainer View, The Package Release Engineer View, The User View, Package Overview |
243 @section The Library Maintainer View | 239 @section The Library Maintainer View |
244 | 240 |
245 From the library maintainer's viewpoint, the advantages to the @xpms{} | 241 From the library maintainer's viewpoint, the advantages to the @value{xpms} |
246 stem from the convenience to the user of installation and upgrade. | 242 stem from the convenience to the user of installation and upgrade. |
247 Since an installed package automatically registers its entry points via | 243 Since an installed package automatically registers its entry points via |
248 autoload and its configuration variables with the Customize system, | 244 autoload and its configuration variables with the Customize system, |
249 configuration FAQs are reduced. When it's easy to upgrade, users learn | 245 configuration FAQs are reduced. When it's easy to upgrade, users learn |
250 to try @samp{Tools | Packages | Update Installed Packages} before | 246 to try @samp{Tools | Packages | Update Installed Packages} before |
251 posting a FAQ whose answer is ``long since fixed, please upgrade.'' | 247 posting a FAQ whose answer is ``long since fixed, please upgrade.'' |
252 | 248 |
253 This comes at some cost, as the library maintainer needs to arrange that | 249 This comes at some cost, as the library maintainer needs to arrange that |
254 the package be installed in a directory structure that satisfies the | 250 the package be installed in a directory structure that satisfies the |
255 requirements of the @xpms{}. Autoload cookies and defcustoms must also | 251 requirements of the @value{xpms}. Autoload cookies and defcustoms must also |
256 be added to existing libraries. The @xpms{} provides infrastructure to | 252 be added to existing libraries. The @value{xpms} provides infrastructure to |
257 assure that all of these annoyances need only be dealt with once. The | 253 assure that all of these annoyances need only be dealt with once. The |
258 autoload cookies and defcustoms are beyond the scope of this chapter, but | 254 autoload cookies and defcustoms are beyond the scope of this chapter, but |
259 most maintainers of modern packages are already familiar with these | 255 most maintainers of modern packages are already familiar with these |
260 mechanisms. | 256 mechanisms. |
261 | 257 |
262 The @xpms{} may be divided into the @dfn{infrastructure} common to all | 258 The @value{xpms} may be divided into the @dfn{infrastructure} common to all |
263 packages, and the package-specific @dfn{control files}. The | 259 packages, and the package-specific @dfn{control files}. The |
264 infrastructure supports global builds, installation, and generation of | 260 infrastructure supports global builds, installation, and generation of |
265 the ``sumo'' bundles of packages, as well as generation of individual | 261 the ``sumo'' bundles of packages, as well as generation of individual |
266 packages. The package control files describe the structure of the | 262 packages. The package control files describe the structure of the |
267 package's source tree and provide administrative information. | 263 package's source tree and provide administrative information. |
268 | 264 |
269 @menu | 265 @menu |
270 * Infrastructure:: Global Makefiles and common rules. | 266 * Infrastructure:: Global Makefiles and common rules. |
271 * Control Files:: Package-specific Makefiles and administrative files. | 267 * Control Files:: Package-specific Makefiles and administrative files. |
272 * Obtaining:: Obtaining the @xpms{} and required utilities. | 268 * Obtaining:: Obtaining the @value{xpms} and required utilities. |
273 @end menu | 269 @end menu |
274 | 270 |
275 @node Infrastructure, Control Files, , The Library Maintainer View | 271 @node Infrastructure, Control Files, , The Library Maintainer View |
276 @subsection Infrastructure | 272 @subsection Infrastructure |
277 | 273 |
278 In order to get the greatest benefit from the @xpms{}, a library | 274 In order to get the greatest benefit from the @value{xpms}, a library |
279 maintainer should place the package sources in an appropriate place in | 275 maintainer should place the package sources in an appropriate place in |
280 the XEmacs source package hierarchy, and arrange to have the source | 276 the XEmacs source package hierarchy, and arrange to have the source |
281 package imported into the XEmacs CVS repository. | 277 package imported into the XEmacs CVS repository. |
282 @c #### the parenthetical remark should go to "issues." | 278 @c #### the parenthetical remark should go to "issues." |
283 (We realize that the | 279 (We realize that the |
410 forms for the usre configuration variables of the package. | 406 forms for the usre configuration variables of the package. |
411 @end table | 407 @end table |
412 | 408 |
413 | 409 |
414 @node Obtaining, , Control Files, The Library Maintainer View | 410 @node Obtaining, , Control Files, The Library Maintainer View |
415 @subsection Obtaining the @xpms{} and Required Utilities | 411 @subsection Obtaining the @value{xpms} and Required Utilities |
416 | 412 |
417 Currently both the infrastructure for creating XEmacs packages and the | 413 Currently both the infrastructure for creating XEmacs packages and the |
418 package sources themselves are available only by CVS. See | 414 package sources themselves are available only by CVS. See |
419 @uref{http://www.xemacs.org/Develop/cvsaccess.html} for more | 415 @uref{http://www.xemacs.org/Develop/cvsaccess.html} for more |
420 intformation. | 416 intformation. |
421 | 417 |
422 The @xpms{} currently requires GNU @file{make}, and XEmacs, to build | 418 The @value{xpms} currently requires GNU @file{make}, and XEmacs, to build |
423 packages. | 419 packages. |
424 | 420 |
425 | 421 |
426 @node The Package Release Engineer View, , The Library Maintainer View, Package Overview | 422 @node The Package Release Engineer View, , The Library Maintainer View, Package Overview |
427 @subsection The Package Release Engineer View | 423 @subsection The Package Release Engineer View |
615 | 611 |
616 @node Local.rules File, Creating Packages, Makefile Targets, Packaging | 612 @node Local.rules File, Creating Packages, Makefile Targets, Packaging |
617 @comment node-name, next, previous, up | 613 @comment node-name, next, previous, up |
618 @cindex local.rules | 614 @cindex local.rules |
619 @heading The Local.rules File: | 615 @heading The Local.rules File: |
620 This file in @file{packages} provides the @xpms{} with information about | 616 This file in @file{packages} provides the @value{xpms} with information about |
621 the local configuration and environment. To create @file{Local.rules}, | 617 the local configuration and environment. To create @file{Local.rules}, |
622 simply copy @file{Local.rules.template} from that directory to | 618 simply copy @file{Local.rules.template} from that directory to |
623 @file{Local.rules} and edit it to suit your needs. | 619 @file{Local.rules} and edit it to suit your needs. |
624 | 620 |
625 These are the variables in @file{Local.rules} that you may need to | 621 These are the variables in @file{Local.rules} that you may need to |
903 @file{Makefile} variable @code{CATEGORY} and can be either | 899 @file{Makefile} variable @code{CATEGORY} and can be either |
904 @samp{standard} for non-Mule packages, or @samp{mule} for Mule | 900 @samp{standard} for non-Mule packages, or @samp{mule} for Mule |
905 packages. The is also provision for @samp{unsupported} in this field | 901 packages. The is also provision for @samp{unsupported} in this field |
906 which would be for packages that XEmacs.org do not distribute. | 902 which would be for packages that XEmacs.org do not distribute. |
907 | 903 |
908 @strong{N.B.} As yet, the @xpms{} does @emph{not} support this type of | 904 @strong{N.B.} As yet, the @value{xpms} does @emph{not} support this type of |
909 package. It will in the future. | 905 package. It will in the future. |
910 | 906 |
911 @item dump | 907 @item dump |
912 Unused. Always @samp{nil} | 908 Unused. Always @samp{nil} |
913 | 909 |
981 means that anything not dumped into XEmacs by default needs to be | 977 means that anything not dumped into XEmacs by default needs to be |
982 specified in the @samp{REQUIRES} variable (for packaged Lisp) or in | 978 specified in the @samp{REQUIRES} variable (for packaged Lisp) or in |
983 some cases the @samp{PRELOADS} (autoloads used in libraries mentioned | 979 some cases the @samp{PRELOADS} (autoloads used in libraries mentioned |
984 in @samp{PRELOADS}). | 980 in @samp{PRELOADS}). |
985 | 981 |
986 There isn't much to an @xpms{} @file{Makefile}, basically it just | 982 There isn't much to an @value{xpms} @file{Makefile}, basically it just |
987 contains a few @file{Makefile} variables and that's it. See the | 983 contains a few @file{Makefile} variables and that's it. See the |
988 example. | 984 example. |
989 | 985 |
990 Here is a real world example, from the @samp{build} package: | 986 Here is a real world example, from the @samp{build} package: |
991 | 987 |
1038 We distribute over 100 packages so the chances are good that you won't | 1034 We distribute over 100 packages so the chances are good that you won't |
1039 be the first to need such hackery and it is probably already catered | 1035 be the first to need such hackery and it is probably already catered |
1040 for. | 1036 for. |
1041 | 1037 |
1042 @subheading @file{Makefile} Variables Explained: | 1038 @subheading @file{Makefile} Variables Explained: |
1043 A number of @file{make} variables are defined by the @xpms{}. Some are | 1039 A number of @file{make} variables are defined by the @value{xpms}. Some are |
1044 required, others are optional. Of course your @file{Makefile} may | 1040 required, others are optional. Of course your @file{Makefile} may |
1045 define other variables for private use, but you should be careful not to | 1041 define other variables for private use, but you should be careful not to |
1046 choose names that conflict with variables defined and used by the | 1042 choose names that conflict with variables defined and used by the |
1047 @xpms{}. | 1043 @value{xpms}. |
1048 | 1044 |
1049 The required variables are described in the table below. | 1045 The required variables are described in the table below. |
1050 The corresponding field names for @file{package-info.in}, where | 1046 The corresponding field names for @file{package-info.in}, where |
1051 relevant, are given in parentheses. | 1047 relevant, are given in parentheses. |
1052 | 1048 |
1278 @end table | 1274 @end table |
1279 | 1275 |
1280 @section @file{package-compile.el} | 1276 @section @file{package-compile.el} |
1281 @cindex package-compile.el | 1277 @cindex package-compile.el |
1282 @cindex compiling packages | 1278 @cindex compiling packages |
1283 The @xpms{} does not automatically become aware of your package simply | 1279 The @value{xpms} does not automatically become aware of your package simply |
1284 because there is a new subtree. If any package, including your own, | 1280 because there is a new subtree. If any package, including your own, |
1285 requires any of your files, it must be explicitly added to the compile | 1281 requires any of your files, it must be explicitly added to the compile |
1286 environment or loads/requires that search load-path will fail. The | 1282 environment or loads/requires that search load-path will fail. The |
1287 changes that need to be made are | 1283 changes that need to be made are |
1288 | 1284 |
1289 @table @strong | 1285 @table @strong |
1290 @item an entry in @code{package-directory-map} | 1286 @item an entry in @code{package-directory-map} |
1291 This tells the @xpms{} which distribution (currently | 1287 This tells the @value{xpms} which distribution (currently |
1292 @samp{xemacs-packages} or @samp{mule-packages}) your package is found | 1288 @samp{xemacs-packages} or @samp{mule-packages}) your package is found |
1293 in. It then looks in the distribution subdirectory whose name is the | 1289 in. It then looks in the distribution subdirectory whose name is the |
1294 same as the package's. | 1290 same as the package's. |
1295 | 1291 |
1296 @item an entry in the @code{cond} in @code{package-name-to-directory} | 1292 @item an entry in the @code{cond} in @code{package-name-to-directory} |
1298 somewhere other than the top-level directory of the package's source | 1294 somewhere other than the top-level directory of the package's source |
1299 tree, eg, in @file{packages/xemacs-packages/$(PACKAGE)/lisp}. | 1295 tree, eg, in @file{packages/xemacs-packages/$(PACKAGE)/lisp}. |
1300 @end table | 1296 @end table |
1301 | 1297 |
1302 This only needs to be done once, when the package is first added to the | 1298 This only needs to be done once, when the package is first added to the |
1303 @xpms{}. (Well, when you randomly change the subdirectory layout, too.) | 1299 @value{xpms}. (Well, when you randomly change the subdirectory layout, too.) |
1304 Your changes to @file{package-compile.el} must be cleared and checked in | 1300 Your changes to @file{package-compile.el} must be cleared and checked in |
1305 by the XEmacs Package Release Engineer before your package will build | 1301 by the XEmacs Package Release Engineer before your package will build |
1306 correctly from a fresh checkout. | 1302 correctly from a fresh checkout. |
1307 | 1303 |
1308 This is unfortunate; it works pretty well once set up, but can cause | 1304 This is unfortunate; it works pretty well once set up, but can cause |
1309 confusion when first building a package in the @xpms{} context. In | 1305 confusion when first building a package in the @value{xpms} context. In |
1310 particular, if the @code{package-directory-map} entry for a required | 1306 particular, if the @code{package-directory-map} entry for a required |
1311 package, including the package itself, is not found, the necessary | 1307 package, including the package itself, is not found, the necessary |
1312 requires will not be executed by @file{package-compile.el}. If | 1308 requires will not be executed by @file{package-compile.el}. If |
1313 required functions are executed (under @code{eval-when-compile}), | 1309 required functions are executed (under @code{eval-when-compile}), |
1314 they won't be found and the compile will fail. If required function | 1310 they won't be found and the compile will fail. If required function |
1331 Some random notes on documenting your package. | 1327 Some random notes on documenting your package. |
1332 | 1328 |
1333 Do write a Texinfo file. It's not that hard to do basically, and even | 1329 Do write a Texinfo file. It's not that hard to do basically, and even |
1334 using the more advanced features of Texinfo soon become natural. For a | 1330 using the more advanced features of Texinfo soon become natural. For a |
1335 start, just grab the template @file{Samples/package.texi} from the | 1331 start, just grab the template @file{Samples/package.texi} from the |
1336 @xpms{} source tree, and drop your current README into the Top node. At | 1332 @value{xpms} source tree, and drop your current README into the Top node. At |
1337 least this way your documentation will be accessible from the standard | 1333 least this way your documentation will be accessible from the standard |
1338 Info readers. Next, try to add lots of cross-referencing and logical | 1334 Info readers. Next, try to add lots of cross-referencing and logical |
1339 markup, and then node structure. | 1335 markup, and then node structure. |
1340 | 1336 |
1341 Address both end users and developer issues. You may not be the | 1337 Address both end users and developer issues. You may not be the |