annotate doc/interpreter/package.txi @ 16846:e6401864d791

doc: fix documentation about packages. * package.txi: the pre_install, post_install, and on_uninstall files on packages are called as Octave functions, not scripts. Describe the argument passed to this functions.
author Carnë Draug <carandraug+dev@gmail.com>
date Tue, 25 Jun 2013 15:39:47 +0200
parents b157ba28f123
children 0133f1634687
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14859
257a7a7bb303 doc: Fix Søren's name (proper UTF-8 encoding)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14853
diff changeset
1 @c Copyright (C) 2007-2012 Søren Hauberg
7018
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
2 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
3 @c This file is part of Octave.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
4 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
5 @c Octave is free software; you can redistribute it and/or modify it
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
6 @c under the terms of the GNU General Public License as published by the
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
7 @c Free Software Foundation; either version 3 of the License, or (at
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
8 @c your option) any later version.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
9 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
13 @c for more details.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
14 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
15 @c You should have received a copy of the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
16 @c along with Octave; see the file COPYING. If not, see
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7016
diff changeset
17 @c <http://www.gnu.org/licenses/>.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
18
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
19 @node Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
20 @chapter Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
21
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
22 Since Octave is Free Software users are encouraged to share their
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
23 programs amongst each other. To aid this sharing Octave supports the
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
24 installation of extra packages. The `Octave-Forge' project is a
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
25 community-maintained set of packages that can be downloaded and
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
26 installed in Octave. At the time of writing the `Octave-Forge' project
16792
b157ba28f123 doc: Use Texinfo @url command consistently throughout documentation.
Rik <rik@octave.org>
parents: 16772
diff changeset
27 can be found online at @url{http://octave.sourceforge.net}, but
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
28 since the Internet is an ever-changing place this may not be true at
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
29 the time of reading. Therefore it is recommended to see the Octave
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
30 website for an updated reference.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
31
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
32 @menu
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
33 * Installing and Removing Packages::
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
34 * Using Packages::
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
35 * Administrating Packages::
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
36 * Creating Packages::
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
37 @end menu
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
38
6538
e3a7611430a8 [project @ 2007-04-18 18:27:47 by jwe]
jwe
parents: 6537
diff changeset
39 @findex pkg
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
40 @node Installing and Removing Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
41 @section Installing and Removing Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
42
9307
c2923c27c877 Various documentation improvements
Rik <rdrider0-list@yahoo.com>
parents: 9209
diff changeset
43 Assuming a package is available in the file @file{image-1.0.0.tar.gz}
8828
8463d1a2e544 Doc fixes.
Brian Gough <bjg@network-theory.co.uk>
parents: 8540
diff changeset
44 it can be installed from the Octave prompt with the command
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
45
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
46 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
47 pkg install image-1.0.0.tar.gz
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
48 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
49
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
50 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
51 If the package is installed successfully nothing will be printed on
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
52 the prompt, but if an error occurred during installation it will be
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
53 reported. It is possible to install several packages at once by
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
54 writing several package files after the @code{pkg install} command.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
55 If a different version of the package is already installed it will
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
56 be removed prior to installing the new package. This makes it easy to
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
57 upgrade and downgrade the version of a package, but makes it
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
58 impossible to have several versions of the same package installed at
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
59 once.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
60
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
61 To see which packages are installed type
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
62
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
63 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
64 @group
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
65 pkg list
7031
120f3135952f [project @ 2007-10-15 15:30:03 by jwe]
jwe
parents: 7018
diff changeset
66 @print{} Package Name | Version | Installation directory
120f3135952f [project @ 2007-10-15 15:30:03 by jwe]
jwe
parents: 7018
diff changeset
67 @print{} --------------+---------+-----------------------
120f3135952f [project @ 2007-10-15 15:30:03 by jwe]
jwe
parents: 7018
diff changeset
68 @print{} image *| 1.0.0 | /home/jwe/octave/image-1.0.0
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
69 @end group
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
70 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
71
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
72 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
73 In this case only version 1.0.0 of the @code{image} package is
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
74 installed. The '*' character next to the package name shows that the
6616
66e30383481b [project @ 2007-05-14 13:56:34 by dbateman]
dbateman
parents: 6538
diff changeset
75 image package is loaded and ready for use.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
76
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
77 It is possible to remove a package from the system using the
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
78 @code{pkg uninstall} command like this
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
79
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
80 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
81 pkg uninstall image
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
82 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
83
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
84 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
85 If the package is removed successfully nothing will be printed in the
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
86 prompt, but if an error occurred it will be reported. It should be
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
87 noted that the package file used for installation is not needed for
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
88 removal, and that only the package name as reported by @code{pkg list}
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
89 should be used when removing a package. It is possible to remove
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
90 several packages at once by writing several package names after the
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
91 @code{pkg uninstall} command.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
92
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
93 To minimize the amount of code duplication between packages it is
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
94 possible that one package depends on another one. If a package
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
95 depends on another, it will check if that package is installed
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
96 during installation. If it is not, an error will be reported and
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
97 the package will not be installed. This behavior can be disabled
10828
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10791
diff changeset
98 by passing the @option{-nodeps} flag to the @code{pkg install}
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
99 command
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
100
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
101 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
102 pkg install -nodeps my_package_with_dependencies.tar.gz
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
103 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
104
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
105 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
106 Since the installed package expects its dependencies to be installed
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
107 it may not function correctly. Because of this it is not recommended
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
108 to disable dependency checking.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
109
8540
1eb16d930f3c package.txi: @DOCSTRING for pkg
John W. Eaton <jwe@octave.org>
parents: 8347
diff changeset
110 @DOCSTRING(pkg)
1eb16d930f3c package.txi: @DOCSTRING for pkg
John W. Eaton <jwe@octave.org>
parents: 8347
diff changeset
111
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
112 @node Using Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
113 @section Using Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
114
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
115 By default installed packages are available from the Octave prompt,
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
116 but it is possible to control this using the @code{pkg load} and
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
117 @code{pkg unload} commands. The functions from a package can be
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
118 removed from the Octave path by typing
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
119
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
120 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
121 pkg unload package_name
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
122 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
123
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
124 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
125 where @code{package_name} is the name of the package to be removed
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
126 from the path.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
127
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
128 In much the same way a package can be added to the Octave path by
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
129 typing
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
130
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
131 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
132 pkg load package_name
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
133 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
134
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
135 @node Administrating Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
136 @section Administrating Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
137
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
138 On UNIX-like systems it is possible to make both per-user and
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
139 system-wide installations of a package. If the user performing the
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
140 installation is @code{root} the packages will be installed in a
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
141 system-wide directory that defaults to
9307
c2923c27c877 Various documentation improvements
Rik <rdrider0-list@yahoo.com>
parents: 9209
diff changeset
142 @file{OCTAVE_HOME/share/octave/packages/}. If the user is not
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
143 @code{root} the default installation directory is
9307
c2923c27c877 Various documentation improvements
Rik <rdrider0-list@yahoo.com>
parents: 9209
diff changeset
144 @file{~/octave/}. Packages will be installed in a subdirectory of the
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
145 installation directory that will be named after the package. It is
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
146 possible to change the installation directory by using the
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
147 @code{pkg prefix} command
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
148
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
149 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
150 pkg prefix new_installation_directory
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
151 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
152
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
153 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
154 The current installation directory can be retrieved by typing
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
155
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
156 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
157 current_installation_directory = pkg prefix
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
158 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
159
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
160 To function properly the package manager needs to keep some
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
161 information about the installed packages. For per-user packages this
9307
c2923c27c877 Various documentation improvements
Rik <rdrider0-list@yahoo.com>
parents: 9209
diff changeset
162 information is by default stored in the file @file{~/.octave_packages}
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
163 and for system-wide installations it is stored in
9307
c2923c27c877 Various documentation improvements
Rik <rdrider0-list@yahoo.com>
parents: 9209
diff changeset
164 @file{OCTAVE_HOME/share/octave/octave_packages}. The path to the
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
165 per-user file can be changed with the @code{pkg local_list} command
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
166
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
167 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
168 pkg local_list /path/to/new_file
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
169 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
170
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
171 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
172 For system-wide installations this can be changed in the same way
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
173 using the @code{pkg global_list} command. If these commands are
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
174 called without a new path, the current path will be returned.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
175
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
176 @node Creating Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
177 @section Creating Packages
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
178
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
179 Internally a package is simply a gzipped tar file that contains a
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
180 top level directory of any given name. This directory will in the
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
181 following be referred to as @code{package} and may contain the
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
182 following files:
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
183
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
184 @table @code
16178
3a93af21d206 New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents: 15545
diff changeset
185 @item package/CITATION
3a93af21d206 New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents: 15545
diff changeset
186 This is am optional file describing instructions on how to cite
3a93af21d206 New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents: 15545
diff changeset
187 the package for publication. It will be displayed verbatim by the
3a93af21d206 New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents: 15545
diff changeset
188 function @code{citation}.
3a93af21d206 New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents: 15545
diff changeset
189
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
190 @item package/COPYING
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
191 This is a required file containing the license of the package. No
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
192 restrictions is made on the license in general. If however the
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
193 package contains dynamically linked functions the license must be
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
194 compatible with the GNU General Public License.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
195
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
196 @item package/DESCRIPTION
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
197 This is a required file containing information about the package.
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
198 @xref{The DESCRIPTION File}, for details on this file.
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
199
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
200 @item package/ChangeLog
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
201 This is an optional file describing all the changes made to the
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
202 package source files.
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
203
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
204 @item package/INDEX
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
205 This is an optional file describing the functions provided by the
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
206 package. If this file is not given then one with be created
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
207 automatically from the functions in the package and the
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
208 @code{Categories} keyword in the @file{DESCRIPTION} file.
11257
8d4c57258523 fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents: 11255
diff changeset
209 @xref{The INDEX File}, for details on this file.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
210
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
211 @item package/NEWS
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
212 This is an optional file describing all user-visible changes worth
14038
b0cdd60db5e5 doc: Grammarcheck documentation ahead of 3.6.0 release.
Rik <octave@nomad.inbox5.com>
parents: 13864
diff changeset
213 mentioning. As this file increases on size, old entries can be moved
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
214 into @file{package/ONEWS}.
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
215
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
216 @item package/ONEWS
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
217 This is an optional file describing old entries from the @file{NEWS} file.
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
218
15288
92476462d01f doc: index PKG_ADD and PKG_DEL
John W. Eaton <jwe@octave.org>
parents: 14859
diff changeset
219 @cindex PKG_ADD
16772
7eff3032d144 Fix seealso HTML links when using Texinfo 4.X (bug #38862).
Rik <rik@octave.org>
parents: 16178
diff changeset
220 @anchor{docXPKG_ADD}
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
221 @item package/PKG_ADD
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
222 An optional file that includes commands that are run when the package
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
223 is added to the users path. Note that @w{@code{PKG_ADD}} directives in the
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
224 source code of the package will also be added to this file by the
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
225 Octave package manager. Note that symbolic links are to be avoided in
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
226 packages, as symbolic links do not exist on some file systems, and so
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
227 a typical use for this file is the replacement of the symbolic link
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
228
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
229 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
230 ln -s foo.oct bar.oct
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
231 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
232
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
233 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
234 with an autoload directive like
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
235
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
236 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
237 autoload ('bar', which ('foo'));
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
238 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
239
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
240 @noindent
11257
8d4c57258523 fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents: 11255
diff changeset
241 @xref{PKG_ADD and PKG_DEL Directives}, for details on @w{@code{PKG_ADD}}
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
242 directives.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
243
15288
92476462d01f doc: index PKG_ADD and PKG_DEL
John W. Eaton <jwe@octave.org>
parents: 14859
diff changeset
244 @cindex PKG_DEL
16772
7eff3032d144 Fix seealso HTML links when using Texinfo 4.X (bug #38862).
Rik <rik@octave.org>
parents: 16178
diff changeset
245 @anchor{docXPKG_DEL}
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
246 @item package/PKG_DEL
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
247 An optional file that includes commands that are run when the package
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
248 is removed from the users path. Note that @w{@code{PKG_DEL}} directives in
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
249 the source code of the package will also be added to this file by the
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
250 Octave package manager.
11257
8d4c57258523 fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents: 11255
diff changeset
251 @xref{PKG_ADD and PKG_DEL Directives}, for details on @w{@code{PKG_DEL}}
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
252 directives.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
253
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
254 @item package/pre_install.m
16846
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
255 This is an optional function that is run prior to the installation of a
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
256 package. This function is called with a single argument, a struct with
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
257 fields names after the data in the @file{DESCRIPTION}, and the paths where
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
258 the package functions will be installed.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
259
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
260 @item package/post_install.m
16846
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
261 This is an optional function that is run after the installation of a
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
262 package. This function is called with a single argument, a struct with
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
263 fields names after the data in the @file{DESCRIPTION}, and the paths where
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
264 the package functions were installed.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
265
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
266 @item package/on_uninstall.m
16846
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
267 This is an optional function that is run prior to the removal of a
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
268 package. This function is called with a single argument, a struct with
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
269 fields names after the data in the @file{DESCRIPTION}, the paths where
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
270 the package functions are installed, and whether the package is currently
e6401864d791 doc: fix documentation about packages.
Carnë Draug <carandraug+dev@gmail.com>
parents: 16792
diff changeset
271 loaded.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
272 @end table
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
273
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
274 Besides the above mentioned files, a package can also contain on or
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
275 more of the following directories:
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
276
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
277 @table @code
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
278 @item package/inst
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
279 An optional directory containing any files that are directly installed
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
280 by the package. Typically this will include any @code{m}-files.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
281
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
282 @item package/src
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
283 An optional directory containing code that must be built prior to the
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
284 packages installation. The Octave package manager will execute
9307
c2923c27c877 Various documentation improvements
Rik <rdrider0-list@yahoo.com>
parents: 9209
diff changeset
285 @file{./configure} in this directory if this script exists, and will
c2923c27c877 Various documentation improvements
Rik <rdrider0-list@yahoo.com>
parents: 9209
diff changeset
286 then call @code{make} if a file @file{Makefile} exists in this
12167
ad636c1f353b Let pkg.m export environment variables MKOCTFILE, OCTAVE_CONFIG and OCTAVE.
Olaf Till <olaf.till@uni-jena.de>
parents: 11523
diff changeset
287 directory. @code{make install} will however not be called. The
ad636c1f353b Let pkg.m export environment variables MKOCTFILE, OCTAVE_CONFIG and OCTAVE.
Olaf Till <olaf.till@uni-jena.de>
parents: 11523
diff changeset
288 environment variables @env{MKOCTFILE}, @w{@env{OCTAVE_CONFIG}}, and
ad636c1f353b Let pkg.m export environment variables MKOCTFILE, OCTAVE_CONFIG and OCTAVE.
Olaf Till <olaf.till@uni-jena.de>
parents: 11523
diff changeset
289 @env{OCTAVE} will be set to the full paths of the programs
ad636c1f353b Let pkg.m export environment variables MKOCTFILE, OCTAVE_CONFIG and OCTAVE.
Olaf Till <olaf.till@uni-jena.de>
parents: 11523
diff changeset
290 @code{mkoctfile}, @code{octave-config}, and @code{octave}, respectively,
ad636c1f353b Let pkg.m export environment variables MKOCTFILE, OCTAVE_CONFIG and OCTAVE.
Olaf Till <olaf.till@uni-jena.de>
parents: 11523
diff changeset
291 of the correct version when @code{configure} and @code{make} are
ad636c1f353b Let pkg.m export environment variables MKOCTFILE, OCTAVE_CONFIG and OCTAVE.
Olaf Till <olaf.till@uni-jena.de>
parents: 11523
diff changeset
292 called. If a file called @code{FILES} exists all files listed there
ad636c1f353b Let pkg.m export environment variables MKOCTFILE, OCTAVE_CONFIG and OCTAVE.
Olaf Till <olaf.till@uni-jena.de>
parents: 11523
diff changeset
293 will be copied to the @code{inst} directory, so they also will be
ad636c1f353b Let pkg.m export environment variables MKOCTFILE, OCTAVE_CONFIG and OCTAVE.
Olaf Till <olaf.till@uni-jena.de>
parents: 11523
diff changeset
294 installed. If the @code{FILES} file doesn't exist, @file{src/*.m} and
ad636c1f353b Let pkg.m export environment variables MKOCTFILE, OCTAVE_CONFIG and OCTAVE.
Olaf Till <olaf.till@uni-jena.de>
parents: 11523
diff changeset
295 @file{src/*.oct} will be copied to the @code{inst} directory.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
296
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
297 @item package/doc
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
298 An optional directory containing documentation for the package. The
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
299 files in this directory will be directly installed in a sub-directory
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
300 of the installed package for future reference.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
301
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
302 @item package/bin
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
303 An optional directory containing files that will be added to the
10828
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10791
diff changeset
304 Octave @w{@env{EXEC_PATH}} when the package is loaded. This might contain
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
305 external scripts, etc., called by functions within the package.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
306 @end table
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
307
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
308 @menu
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
309 * The DESCRIPTION File::
11255
d682cd6669ac Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents: 10828
diff changeset
310 * The INDEX File::
d682cd6669ac Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents: 10828
diff changeset
311 * PKG_ADD and PKG_DEL Directives::
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
312 @end menu
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
313
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
314 @node The DESCRIPTION File
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
315 @subsection The DESCRIPTION File
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
316
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
317 The @file{DESCRIPTION} file contains various information about the
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
318 package, such as its name, author, and version. This file has a very
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
319 simple format
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
320
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
321 @itemize
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
322 @item
9307
c2923c27c877 Various documentation improvements
Rik <rdrider0-list@yahoo.com>
parents: 9209
diff changeset
323 Lines starting with @samp{#} are comments.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
324
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
325 @item
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
326 Lines starting with a blank character are continuations from the
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
327 previous line.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
328
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
329 @item
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
330 Everything else is of the form @code{NameOfOption: ValueOfOption}.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
331 @end itemize
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
332
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
333 @noindent
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
334 The following is a simple example of a @file{DESCRIPTION} file
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
335
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
336 @example
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
337 @group
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
338 Name: The name of my package
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
339 Version: 1.0.0
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
340 Date: 2007-18-04
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
341 Author: The name (and possibly email) of the package author.
7031
120f3135952f [project @ 2007-10-15 15:30:03 by jwe]
jwe
parents: 7018
diff changeset
342 Maintainer: The name (and possibly email) of the current
120f3135952f [project @ 2007-10-15 15:30:03 by jwe]
jwe
parents: 7018
diff changeset
343 package maintainer.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
344 Title: The title of the package
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
345 Description: A short description of the package. If this
7031
120f3135952f [project @ 2007-10-15 15:30:03 by jwe]
jwe
parents: 7018
diff changeset
346 description gets too long for one line it can continue
120f3135952f [project @ 2007-10-15 15:30:03 by jwe]
jwe
parents: 7018
diff changeset
347 on the next by adding a space to the beginning of the
120f3135952f [project @ 2007-10-15 15:30:03 by jwe]
jwe
parents: 7018
diff changeset
348 following lines.
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7007
diff changeset
349 License: GPL version 3 or later
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
350 @end group
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
351 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
352
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
353 The package manager currently recognizes the following keywords
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
354
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
355 @table @code
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
356 @item Name
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
357 Name of the package.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
358
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
359 @item Version
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
360 Version of the package. A package version must be 3 numbers separated
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
361 by a dot.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
362
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
363 @item Date
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
364 Date of last update.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
365
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
366 @item Author
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
367 Original author of the package.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
368
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
369 @item Maintainer
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
370 Maintainer of the package.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
371
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
372 @item Title
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
373 A one line description of the package.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
374
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
375 @item Description
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
376 A one paragraph description of the package.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
377
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
378 @item Categories
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
379 Optional keyword describing the package (if no @file{INDEX} file is
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
380 given this is mandatory).
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
381
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
382 @item Problems
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
383 Optional list of known problems.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
384
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
385 @item Url
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
386 Optional list of homepages related to the package.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
387
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
388 @item Autoload
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
389 Optional field that sets the default loading behavior for the package.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
390 If set to @code{yes}, @code{true} or @code{on}, then Octave will
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
391 automatically load the package when starting. Otherwise the package
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
392 must be manually loaded with the pkg load command. This default
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
393 behavior can be overridden when the package is installed.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
394
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
395 @item Depends
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
396 A list of other Octave packages that this package depends on. This can
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
397 include dependencies on particular versions, with a format
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
398
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
399 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
400 Depends: package (>= 1.0.0)
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
401 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
402
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
403 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
404 Possible operators are @code{<}, @code{<=}, @code{==}, @code{>=} or
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
405 @code{>}. If the part of the dependency in @code{()} is missing, any
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
406 version of the package is acceptable. Multiple dependencies can be
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
407 defined either as a comma separated list or on separate @code{Depends}
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
408 lines.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
409
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
410 @item License
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
411 An optional short description of the used license (e.g., GPL version 3
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
412 or newer). This is optional since the file @file{COPYING} is mandatory.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
413
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
414 @item SystemRequirements
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
415 These are the external install dependencies of the package and are not
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
416 checked by the package manager. This is here as a hint to the
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
417 distribution packager. They follow the same conventions as the
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
418 @code{Depends} keyword.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
419
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
420 @item BuildRequires
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
421 These are the external build dependencies of the package and are not
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
422 checked by the package manager. This is here as a hint to the
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
423 distribution packager. They follow the same conventions as the
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
424 @code{Depends} keyword. Note that in general, packaging systems such
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
425 as @code{rpm} or @code{deb} and autoprobe the install dependencies
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
426 from the build dependencies, and therefore the often a
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
427 @code{BuildRequires} dependency removes the need for a
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
428 @code{SystemRequirements} dependency.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
429
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
430 @end table
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
431
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
432 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
433 The developer is free to add additional arguments to the
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
434 @file{DESCRIPTION} file for their own purposes. One further detail to
8325
b93ac0586e4b spelling corrections
Brian Gough<bjg@network-theory.co.uk>
parents: 8297
diff changeset
435 aid the packager is that the @code{SystemRequirements} and
8347
fa78cb8d8a5c corrections for typos
Brian Gough<bjg@network-theory.co.uk>
parents: 8325
diff changeset
436 @code{BuildRequires} keywords can have a distribution dependent section,
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
437 and the automatic build process will use these. An example of the
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
438 format of this is
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
439
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
440 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
441 BuildRequires: libtermcap-devel [Mandriva] libtermcap2-devel
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
442 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
443
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
444 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
445 where the first package name will be used as a default and if the
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
446 RPMs are built on a Mandriva distribution, then the second package
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
447 name will be used instead.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
448
11255
d682cd6669ac Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents: 10828
diff changeset
449 @node The INDEX File
d682cd6669ac Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents: 10828
diff changeset
450 @subsection The INDEX File
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
451
13864
a03e96aa4977 NEWS file of packages now expected to be in the package root. Also support ONEWS file as per GNU the standards. Updated manual accordingly.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12167
diff changeset
452 The optional @file{INDEX} file provides a categorical view of the
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
453 functions in the package. This file has a very simple format
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
454
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
455 @itemize
9307
c2923c27c877 Various documentation improvements
Rik <rdrider0-list@yahoo.com>
parents: 9209
diff changeset
456 @item Lines beginning with @samp{#} are comments.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
457
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
458 @item The first non-comment line should look like this
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
459
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
460 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
461 toolbox >> Toolbox name
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
462 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
463
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
464 @item Lines beginning with an alphabetical character indicates a new
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
465 category of functions.
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
466
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
467 @item Lines starting with a white space character indicate that the
8347
fa78cb8d8a5c corrections for typos
Brian Gough<bjg@network-theory.co.uk>
parents: 8325
diff changeset
468 function names on the line belong to the last mentioned category.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
469 @end itemize
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
470
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
471 @noindent
10828
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10791
diff changeset
472 The format can be summarized with the following example.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
473
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
474 @example
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
475 @group
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
476 # A comment
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
477 toolbox >> Toolbox name
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
478 Category Name 1
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
479 function1 function2 function3
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
480 function4
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
481 Category Name 2
7007
6304d9ea0a30 [project @ 2007-10-11 16:26:36 by jwe]
jwe
parents: 6616
diff changeset
482 function2 function5
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
483 @end group
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
484 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
485
7496
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
486 If you wish to refer to a function that users might expect
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
487 to find in your package but is not there, providing a work around or
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
488 pointing out that the function is available elsewhere, you can use:
7496
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
489
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
490 @example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
491 fn = workaround description
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
492 @end example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
493
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
494 @noindent
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
495 This workaround description will not appear when listing functions in the
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
496 package with @code{pkg describe} but they will be published
10791
3140cb7a05a1 Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents: 9307
diff changeset
497 in the HTML documentation online.
3140cb7a05a1 Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents: 9307
diff changeset
498 Workaround descriptions can use any HTML markup, but
7496
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
499 keep in mind that it will be enclosed in a bold-italic environment.
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
500 For the special case of:
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
501
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
502 @example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
503 fn = use <code>alternate expression</code>
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
504 @end example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
505
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
506 @noindent
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
507 the bold-italic is automatically suppressed. You will need
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
508 to use @code{<code>} even in references:
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
509
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
510 @example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
511 fn = use <a href="someothersite.html"><code>fn</code></a>
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
512 @end example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
513
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
514 @noindent
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
515 Sometimes functions are only partially compatible, in which
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
516 case you can list the non-compatible cases separately. To
7496
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
517 refer to another function in the package, use @code{<f>fn</f>}.
10828
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10791
diff changeset
518 For example:
7496
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
519
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
520 @example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
521 eig (a, b) = use <f>qz</f>
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
522 @end example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
523
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
524 @noindent
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
525 Since sites may have many missing functions, you can define
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
526 a macro rather than typing the same link over and again.
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
527
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
528 @example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
529 $id = expansion
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
530 @end example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
531
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
532 @noindent
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
533 defines the macro id. You can use @code{$id} anywhere in the
10828
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10791
diff changeset
534 description and it will be expanded. For example:
7496
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
535
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
536 @example
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
537 @group
7496
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
538 $TSA = see <a href="link_to_spctools">SPC Tools</a>
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
539 arcov = $TSA <code>armcv</code>
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
540 @end group
7496
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
541 @end example
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
542
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
543 @noindent
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
544 id is any string of letters, numbers and @code{_}.
e27f8afa99e5 better documentation on the INDEX file format
carlo@guglielmo.local
parents: 7031
diff changeset
545
11255
d682cd6669ac Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents: 10828
diff changeset
546 @node PKG_ADD and PKG_DEL Directives
d682cd6669ac Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents: 10828
diff changeset
547 @subsection PKG_ADD and PKG_DEL Directives
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
548
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
549 If the package contains files called @w{@code{PKG_ADD}} or @w{@code{PKG_DEL}}
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
550 the commands in these files will be executed when the package is
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
551 added or removed from the users path. In some situations such files
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
552 are a bit cumbersome to maintain, so the package manager supports
9079
4d610aba7347 Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
553 automatic creation of such files. If a source file in the package
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
554 contains a @w{@code{PKG_ADD}} or @w{@code{PKG_DEL}} directive they will be
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
555 added to either the @w{@code{PKG_ADD}} or @w{@code{PKG_DEL}} files.
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
556
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
557 In @code{m}-files a @w{@code{PKG_ADD}} directive looks like this
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
558
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
559 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
560 ## PKG_ADD: some_octave_command
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
561 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
562
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
563 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
564 Such lines should be added before the @code{function} keyword.
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
565 In C++ files a @w{@code{PKG_ADD}} directive looks like this
6537
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
566
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
567 @example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
568 // PKG_ADD: some_octave_command
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
569 @end example
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
570
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
571 @noindent
062bade36bf7 [project @ 2007-04-18 16:40:25 by jwe]
jwe
parents:
diff changeset
572 In both cases @code{some_octave_command} should be replaced by the
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
573 command that should be placed in the @w{@code{PKG_ADD}} file.
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
574 @w{@code{PKG_DEL}} directives work in the same way, except the @w{@code{PKG_ADD}}
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
575 keyword is replaced with @w{@code{PKG_DEL}} and the commands get added
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9079
diff changeset
576 to the @w{@code{PKG_DEL}} file.