summaryrefslogtreecommitdiff
path: root/Master/tlpkg/man/TeXLive-TLPOBJ.1
blob: b2ec946fc5c73645ef4ed39946551c207606e7f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.\"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "TeXLive::TLPOBJ 3"
.TH TeXLive::TLPOBJ 3 "2007-11-12" "perl v5.8.8" "User Contributed Perl Documentation"
.SH "NAME"
\&\f(CW\*(C`TeXLive::TLPOBJ\*(C'\fR \-\- TeX Live Package Object access module
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&  use TeXLive::TLPOBJ;
.Ve
.PP
.Vb 1
\&  my $tlpobj=TeXLive::TLPOBJ\->new(name => "foobar");
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The TeXLive::TLPOBJ module provide access to TeX Live Package Object
files describing a self-contained package.
.SH "FILE SPECIFICATION"
.IX Header "FILE SPECIFICATION"
Please see TeXLive::TLPSRC documentation for the specification. The
only differences are that the various \f(CW*pattern\fR keys are invalid, and
instead there are the respective \f(CW*files\fR keys described below. Furthermore
some more \fIkeys\fR is allowed: \f(CW\*(C`revision\*(C'\fR which specifies the maximum of 
all last changed revision of files contained in the package, and anything
starting with \f(CW\*(C`catalogue\-\*(C'\fR specifying information coming from the
TeX Catalogue.
.PP
All these keys have in common that they are followed by a list of files
\&\fIindented\fR by one space. They differ only in the first line itself
(described below).
.ie n .IP """srcfiles""\fR, \f(CW""runfiles""\fR, \f(CW""binfiles""\fR, \f(CW""docfiles"" each of these items contains addition the sum of sizes of the single files (currently in bytes)." 4
.el .IP "\f(CWsrcfiles\fR, \f(CWrunfiles\fR, \f(CWbinfiles\fR, \f(CWdocfiles\fR each of these items contains addition the sum of sizes of the single files (currently in bytes)." 4
.IX Item "srcfiles, runfiles, binfiles, docfiles each of these items contains addition the sum of sizes of the single files (currently in bytes)."
.Vb 2
\&  srcfiles size=NNNNNN
\&  runfiles size=NNNNNN
.Ve
.ie n .IP """docfiles""" 4
.el .IP "\f(CWdocfiles\fR" 4
.IX Item "docfiles"
The docfiles line itself is similar to the \f(CW\*(C`srcfiles\*(C'\fR and \f(CW\*(C`runfiles\*(C'\fR lines
above:
.Sp
.Vb 1
\&  docfiles size=NNNNNN
.Ve
.Sp
But the lines listing the files are allowed to have additional tags:
.Sp
.Vb 6
\&  /\-\-\-\-\-\-\- excerpt from achemso.tlpobj
\&  |...
\&  |docfiles size=1702468
\&  | texmf\-dist/doc/latex/aeguill/README details="Package Readme"
\&  | texmf\-dist/doc/latex/achemso/achemso.pdf details="Package documentation" language="en"
\&  |...
.Ve
.Sp
Currently only the tags \f(CW\*(C`details\*(C'\fR and \f(CW\*(C`language\*(C'\fR are allowed.
.ie n .IP """binfiles""" 4
.el .IP "\f(CWbinfiles\fR" 4
.IX Item "binfiles"
Since \f(CW\*(C`binfiles\*(C'\fR are different for the different architectures one
\&\f(CW\*(C`tlpobj\*(C'\fR file can contain \f(CW\*(C`binfiles\*(C'\fR lines for different
architectures. The architecture is specified on the \f(CW\*(C`binfiles\*(C'\fR using
the \f(CW\*(C`arch=\*(C'\fR\fI\s-1XXX\s0\fR tag. Thus, \f(CW\*(C`binfiles\*(C'\fR lines look like
.Sp
.Vb 1
\&  binfiles arch=XXXX size=NNNNN
.Ve
.PP
Here is an excerpt from the representation of the \f(CW\*(C`bin\-dvipsk\*(C'\fR package,
with \f(CW\*(C`|\*(C'\fR characters inserted to show the indentation:
.PP
.Vb 19
\&  |name bin\-dvipsk
\&  |category TLCore
\&  |revision 4427
\&  |docfiles size=959434
\&  | texmf/doc/dvips/dvips.html
\&  | ...
\&  |runfiles size=1702468
\&  | texmf/dvips/base/color.pro
\&  | ...
\&  | texmf/scripts/pkfix/pkfix.pl
\&  |binfiles arch=i386\-solaris size=329700
\&  | bin/i386\-solaris/afm2tfm
\&  | bin/i386\-solaris/dvips
\&  | bin/i386\-solaris/pkfix
\&  |binfiles arch=win32 size=161280
\&  | bin/win32/afm2tfm.exe
\&  | bin/win32/dvips.exe
\&  | bin/win32/pkfix.exe
\&  |...
.Ve
.SH "PACKAGE VARIABLES"
.IX Header "PACKAGE VARIABLES"
TeXLive::TLPOBJ has one package wide variable which is \f(CW\*(C`containerdir\*(C'\fR where
generated container files are saved (if not otherwise specified.
.PP
.Vb 1
\&  TeXLive::TLPOBJ\->containerdir("path/to/container/dir");
.Ve
.SH "MEMBER ACCESS FUNCTIONS"
.IX Header "MEMBER ACCESS FUNCTIONS"
For any of the \fIkeys\fR a function
.PP
.Vb 1
\&  $tlpobj\->key
.Ve
.PP
is available, which returns the current value when called without an argument,
and sets the respective value when called with an argument. For the 
TeX Catalogue Data the function
.PP
.Vb 1
\&  $tlpobj\->cataloguedata
.Ve
.PP
returns and takes as argument a hash.
.PP
Arguments and return values for \f(CW\*(C`name\*(C'\fR, \f(CW\*(C`category\*(C'\fR, \f(CW\*(C`shortdesc\*(C'\fR,
\&\f(CW\*(C`longdesc\*(C'\fR, \f(CW\*(C`catalogue\*(C'\fR, \f(CW\*(C`revision\*(C'\fR are single scalars.
.PP
Arguments and return values for \f(CW\*(C`depends\*(C'\fR, \f(CW\*(C`executes\*(C'\fR are lists.
.PP
Arguments and return values for \f(CW\*(C`docfiles\*(C'\fR, \f(CW\*(C`runfiles\*(C'\fR, \f(CW\*(C`srcfiles\*(C'\fR
are lists.
.PP
Arguments and return values for \f(CW\*(C`binfiles\*(C'\fR is a hash with the
architectures as keys.
.PP
The size values are handled with these functions:
.PP
.Vb 4
\&  $tlpobj\->docsize
\&  $tlpobj\->runsize
\&  $tlpobj\->srcsize
\&  $tlpobj\->binsize("arch1", ...)
.Ve
.PP
which set or get the current value of the respective sizes. Note that also
the \f(CW\*(C`binsize\*(C'\fR function returns (and takes as argument) a hash with the 
architectures as keys, similar to the \f(CW\*(C`runfiles\*(C'\fR functions (see above).
.SH "OTHER FUNCTIONS"
.IX Header "OTHER FUNCTIONS"
The following functions can be called for an \f(CW\*(C`TLPOBJ\*(C'\fR object:
.ie n .IP """new""" 4
.el .IP "\f(CWnew\fR" 4
.IX Item "new"
The constructor \f(CW\*(C`new\*(C'\fR returns a new \f(CW\*(C`TLPSRC\*(C'\fR object. The arguments
to the \f(CW\*(C`new\*(C'\fR constructor can be in the usual hash representation for
the different keys above:
.Sp
.Vb 1
\&  $tlpobj=TLPOBJ\->new(name => "foobar", shortdesc => "The foobar package");
.Ve
.ie n .IP """from_file(""filename"")""" 4
.el .IP "\f(CWfrom_file(``filename'')\fR" 4
.IX Item "from_file(""filename"")"
reads a \f(CW\*(C`tlpobj\*(C'\fR file.
.Sp
.Vb 2
\&  $tlpobj = new TLPOBJ;
\&  $tlpobj\->from_file("path/to/the/tlpobj/file");
.Ve
.ie n .IP """from_fh($filehandle[, $multi])""" 4
.el .IP "\f(CWfrom_fh($filehandle[, $multi])\fR" 4
.IX Item "from_fh($filehandle[, $multi])"
read the textual representation of a \s-1TLPOBJ\s0 from an already opened
file handle.  If \f(CW$multi\fR is undefined (ie not given) then multiple
tlpobj in the same file are treated as errors. If \f(CW$multi\fR is defined
then returns after reading one tlpobj.
.Sp
Returns \f(CW1\fR if it found a \f(CW\*(C`tlpobj\*(C'\fR, otherwise \f(CW0\fR.
.ie n .IP """writeout""" 4
.el .IP "\f(CWwriteout\fR" 4
.IX Item "writeout"
writes the textual representation of a \f(CW\*(C`TLPOBJ\*(C'\fR object to \f(CW\*(C`stdout\*(C'\fR,
or the filehandle if given:
.Sp
.Vb 2
\&  $tlpsrc\->writeout;
\&  $tlpsrc\->writeout(\e*FILEHANDLE);
.Ve
.ie n .IP """writeout_simple""" 4
.el .IP "\f(CWwriteout_simple\fR" 4
.IX Item "writeout_simple"
debugging function for comparison with \f(CW\*(C`tpm\*(C'\fR/\f(CW\*(C`tlps\*(C'\fR, will go away.
.ie n .IP """make_container($type,$instroot[, $destdir[, $containername]])""" 4
.el .IP "\f(CWmake_container($type,$instroot[, $destdir[, $containername]])\fR" 4
.IX Item "make_container($type,$instroot[, $destdir[, $containername]])"
creates a container file of the arch \fBindependent\fR files in the \f(CW\*(C`TLPOBJ\*(C'\fR
in \f(CW$destdir\fR (if not defined then \f(CW\*(C`TLPOBJ\->containerdir\*(C'\fR is used).
.Sp
The \f(CW$type\fR variable specifies the type of container to be used.
Currently only \f(CW\*(C`zip\*(C'\fR or \f(CW\*(C`lzma\*(C'\fR are allowed, and are generating
zip files and tar.lzma files, respectively.
.Sp
The file name of the created container file is \f(CW\*(C`$containername.extension\*(C'\fR,
where extension is either \f(CW\*(C`.zip\*(C'\fR or \f(CW\*(C`.tar.lzma\*(C'\fR, depending on the
setting of \f(CW$type\fR. If no \f(CW$containername\fR is specified the package name
is used.
.Sp
If the package contains \f(CW"binfiles"\fR, then container files for 
all archs containing \fBonly\fR the binfiles are created, and 
those container files name is \f(CW\*(C`$containername.$arch.$extension\*(C'\fR
.Sp
All the arch independent container files \fBalso\fR contain the respective
\&\f(CW\*(C`TLPOBJ\*(C'\fR file in \f(CW\*(C`tlpkg/tlpobj/$name.tlpobj\*(C'\fR so \f(CW\*(C`$containername.$extension\*(C'\fR does
contain this tlpobj file, while \f(CW\*(C`$containername.$arch.$extension\*(C'\fR does \s-1NOT\s0.
.Sp
The argument \f(CW$instroot\fR specifies the root of the installation from
which the files should be taken.
.ie n .IP """recompute_sizes($tltree)""" 4
.el .IP "\f(CWrecompute_sizes($tltree)\fR" 4
.IX Item "recompute_sizes($tltree)"
recomputes the sizes based on the information present in \f(CW$tltree\fR.
.ie n .IP """recompute_revision($tltree [, $revtlpsrc ])""" 4
.el .IP "\f(CWrecompute_revision($tltree [, $revtlpsrc ])\fR" 4
.IX Item "recompute_revision($tltree [, $revtlpsrc ])"
recomputes the revision based on the information present in \f(CW$tltree\fR.
The optional argument \f(CW$rectlpsrc\fR can be an additional revision number
which is taken into account. \f(CW\*(C`$tlpsrc\-\*(C'\fRmake_tlpobj> adds the revision
number of the \f(CW\*(C`tlpsrc\*(C'\fR file here so that collections (which do not
contain files) also have revision number.
.ie n .IP """update_from_catalogue($texcatalogue)""" 4
.el .IP "\f(CWupdate_from_catalogue($texcatalogue)\fR" 4
.IX Item "update_from_catalogue($texcatalogue)"
adds information from a \f(CW\*(C`TeXCatalogue\*(C'\fR object 
(currently license, version, url, and updates docfiles with details and
languages tags if present in the Catalogue).
.ie n .IP """is_arch_dependent""" 4
.el .IP "\f(CWis_arch_dependent\fR" 4
.IX Item "is_arch_dependent"
returns \f(CW1\fR if there are \f(CW\*(C`binfiles\*(C'\fR, otherwise \f(CW0\fR.
.ie n .IP """total_size""" 4
.el .IP "\f(CWtotal_size\fR" 4
.IX Item "total_size"
If no argument is given returns the sum of \f(CW\*(C`srcsize\*(C'\fR, \f(CW\*(C`docsize\*(C'\fR,
\&\f(CW\*(C`runsize\*(C'\fR.
.Sp
If arguments are given, they are assumed to be architecture names, and
it returns the above plus the sum of sizes of \f(CW\*(C`binsize\*(C'\fR for those
architectures.
.ie n .IP """is_meta_package""" 4
.el .IP "\f(CWis_meta_package\fR" 4
.IX Item "is_meta_package"
Returns true if the package is a meta package as defined in TLConfig
(Currently Collection and Scheme).
.ie n .IP """{add,remove}_{src,run,doc}files(@files)""" 4
.el .IP "\f(CW{add,remove}_{src,run,doc}files(@files)\fR" 4
.IX Item "{add,remove}_{src,run,doc}files(@files)"
adds or removes files to the respective list of files.
.ie n .IP """{add,remove}_binfiles($arch, @files)""" 4
.el .IP "\f(CW{add,remove}_binfiles($arch, @files)\fR" 4
.IX Item "{add,remove}_binfiles($arch, @files)"
adds or removes files from the list of \f(CW\*(C`binfiles\*(C'\fR for the given architecture.
.ie n .IP """{add,remove}_files($type, $files)""" 4
.el .IP "\f(CW{add,remove}_files($type, $files)\fR" 4
.IX Item "{add,remove}_files($type, $files)"
adds or removes files for the given type (only for \f(CW\*(C`run\*(C'\fR, \f(CW\*(C`src\*(C'\fR, \f(CW\*(C`doc\*(C'\fR).
.ie n .IP """all_files""" 4
.el .IP "\f(CWall_files\fR" 4
.IX Item "all_files"
returns a list of all files of all types.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
The modules TeXLive::TLConfig, TeXLive::TLUtils, TeXLive::TLPSRC,
TeXLive::TLPDB, TeXLive::TLTREE, TeXLive::TeXCatalogue.
.SH "AUTHORS AND COPYRIGHT"
.IX Header "AUTHORS AND COPYRIGHT"
This script and its documentation were written for the TeX Live
distribution (<http://tug.org/texlive>) and both are licensed under the
\&\s-1GNU\s0 General Public License Version 2 or later.