]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/pkgdata/pkgdata.1.in
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / tools / pkgdata / pkgdata.1.in
CommitLineData
b75a7d8f
A
1.\" Hey, Emacs! This is -*-nroff-*- you know...
2.\"
3.\" pkgdata.1: manual page for the pkgdata utility
4.\"
5.\" Copyright (C) 2000-2002 IBM, Inc. and others.
6.\"
7.\" Manual page by Yves Arrouye <yves@realnames.com>.
8.\" Modified by Steven R. Loomis <srl@jtcsv.com>.
9.\"
10.TH PKGDATA 1 "16 April 2002" "ICU MANPAGE" "ICU @VERSION@ Manual"
11.SH NAME
12.B pkgdata
13\- package data for use by ICU
14.SH SYNOPSIS
15.B pkgdata
16[
17.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
18]
19[
20.BI "\-v\fP, \fB\-\-verbose"
21]
22[
23.BR "\-c\fP, \fB\-\-copyright"
24|
25.BI "\-C\fP, \fB\-\-comment" " comment"
26]
27[
28.BI "\-m\fP, \fB\-\-mode" " mode"
29]
30.BI "\-p\fP, \fB\-\-name" " name"
31.BI "\-O\fP, \fB\-\-bldopt" " options"
32[
33.BI "\-e\fP, \fB\-\-entrypoint" " name"
34]
35[
36.BI "\-r\fP, \fB\-\-revision" " version"
37]
38[
39.BI "\-M" " arg"
40]
41[
42.BI "\-F\fP, \fB\-\-rebuild"
43]
44[
45.BI "\-k\fP, \fB\-\-clean"
46]
47[
48.BI "\-I\fP, \fB\-\-install"
49]
50[
51.BI "\-n\fP, \fB\-\-nooutput"
52]
53[
54.BI "\-s\fP, \fB\-\-sourcedir" " source"
55]
56[
57.BI "\-d\fP, \fB\-\-destdir" " destination"
58]
59[
60.BI "\-T\fP, \fB\-\-tempdir" " directory"
61]
62[
63.IR file " .\|.\|."
64]
65.SH DESCRIPTION
66.B pkgdata
67takes a set of data files and packages them for use by ICU or
68applications that use ICU. The typical reason to package files using
69.B pkgdata
70is to make their distribution easier and their loading by ICU faster
71and less consuming of limited system resources such as file
72descriptors.
73Packaged data also allow applications to be distributed with fewer
74resource files, or even with none at all if they link against the
75packaged data directly.
76.PP
77.B pkgdata
78supports a few different methods of packaging data that serve
79different purposes.
80.PP
81The default packaging
82.I mode
83is
84.BR common ,
85or
86.BR archive .
87In this mode, the different data files are bundled together as an
88architecture-dependent file that can later be memory mapped for use by
89ICU. Data packaged using this mode will be looked up under the ICU
90data directory. Such packaging is easy to use for applications resource
91bundles, for example, as long as the application can install the
92packaged file in the ICU data directory.
93.PP
94Another packaging mode is the
95.BR dll ,
96or
97.BR library ,
98mode, where the data files are compiled into a shared library. ICU
99used to be able to dynamically load these shared libraries, but as of
100ICU 2.0, such support has been removed. This mode is still useful for
101two main purposes: to build ICU itself, as the ICU data is packaged as
102a shared library by default; and to build resource bundles that are
103linked to the application that uses them. Such resource bundles can
104then be placed anywhere where the system's dynamic linker will be
105looking for shared libraries, instead of being forced to live inside
106the ICU data directory.
107.PP
108The
109.BR static
110packaging mode is similar to the shared library one except that it
111produces a static library.
112.\" Note that many platforms are not able to
113.\" dynamically load symbols from static object files, so for this reason
114.\" .BR udata_setAppData()
115.\" must be called
116.\" to install this data. As a convenience, pkgdata will build a C source file
117.\" and a header file. Given a data package named
118.\" .IR name, in the output
119.\" directory will be created
120.\" .IR name .c
121.\" and
122.\" .IR name .h with the single
123.\" function
124.\" .BR "udata_install_\fcIname\fB(UErrorCode *err)" ,
125.\" where
126.\" .I cname
127.\" is
128.\" .I name
129.\" turned into a valid C identifier.
130.\" The application need to call this function once. The error code returned
131.\" is that of
132.\" .BR udata_setAppData() .
133.\" .PP
134.\" Data pakackaged in a library, whether shared or static,
135.\" Subsequently, the application can access this data by passing
136.\" .I name for the
137.\" .I path
138.\" rgument to functions such as
139.\" .BR Bures_open() .
140.PP
141Finally,
142.B pkgdata
143supports a
144.B files
145mode which simply copies the data files instead of packaging
146them as a single file or library. This mode is mainly intended to
147provide support for building ICU before it is packaged as separate
148small packages for distribution with operating systems such as Debian
149GNU/Linux for example. Please refer to the packaging documentation in
150the ICU source distribution for further information on the use of this
151mode.
152.PP
153.B pkgdata
154relies on GNU
155.BR make (1)
156to do the packaging, and generates a makefile with rules to build,
157package, install, or clean the appropriate data.
158.SH OPTIONS
159.TP
160.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
161Print help about usage and exit.
162.TP
163.BR "\-v\fP, \fB\-\-verbose"
164Display extra informative messages during execution.
165.TP
166.BR "\-c\fP, \fB\-\-copyright"
167Include a copyright notice in the binary data.
168.TP
169.BI "\-C\fP, \fB\-\-comment" " comment"
170Includes the specified
171.I comment
172in the resulting data instead of the ICU copyright notice.
173.TP
174.BI "\-m\fP, \fB\-\-mode" " mode"
175Set the packaging
176.I mode
177to be used by
178.BR pkgdata .
179The different modes and their meaning are explained in the
180.B DESCRIPTION
181section above. The valid mode names are
182.BR common
183(or
184.BR archive ),
185.BR dll
186(or
187.BR library ),
188and
189.BR files .
190.TP
191.BI "\-O\fP, \fB\-\-bldopt" " options"
192Specify options for the builder. The builder is used internally by
193.B pkgdata
194to generate the correct packaged file. Such options include, but are
195not limited to, setting variables used by
196.BR make (1)
197during the build of the packaged file. Note: If
198.BR icu-config
199is available, then this option is not needed.
200.TP
201.BI "\-p\fP, \fB\-\-name" " name"
202Set the packaged file name to
203.IR name .
204This name is also used as the default entry point name after having
205been turned into a valid C identifier.
206.TP
207.BI "\-e\fP, \fB\-\-entrypoint" " name"
208Set the data entry point (used for linking against the data in a
209shared library form) to
210.IR name .
211The default entry point name is the name set by the
212.BI "\-n\fP, \fB\-\-name"
213option.
214.TP
215.BI "\-r\fP, \fB\-\-revision" " version"
216Enable versioning of the shared library produced in
217.BR dll ,
218or
219.BR library ,
220mode. The version number has the format
221.I major\fP.\fIminor\fP.\fIpatchlevel
222and all parts except for
223.I major
224are optional. If only
225.I major
226is supplied then the version is
227assumed to be
228.IR major .0
229for versioning purposes.
230.TP
231.BI "\-M" " arg"
232Pass
233.I arg
234to
235.BR make (1).
236.TP
237.BI "\-F\fP, \fB\-\-rebuild"
238Force the rebuilding of all data and their repackaging.
239.TP
240.BI "\-k\fP, \fB\-\-clean"
241Clean temporary files and other build residues.
242.TP
243.BI "\-I\fP, \fB\-\-install"
244Install the packaged file (or all the files in the
245.B files
246mode). If the variable
247.B DESTDIR
248is set it will be used for installation.
249.TP
250.BI "\-n\fP, \fB\-\-nooutput"
251Do not produce any output but simply a list of affected files.
252.TP
253.BI "\-s\fP, \fB\-\-sourcedir" " source"
254Set the source directory to
255.IR source .
256The default source directory is the current directory.
257.TP
258.BI "\-d\fP, \fB\-\-destdir" " destination"
259Set the destination directory to
260.IR destination .
261The default destination directory is the current directory.
262.TP
263.BI "\-T\fP, \fB\-\-tempdir" " directory"
264Set the directory used to generate temporary files to
265.IR directory .
266The default temporary directory is the same as the destination
267directory
268as set by the
269.BI "\-d\fP, \fB\-\-destdir"
270option.
271.SH AUTHORS
272Steven Loomis
273.br
274Yves Arrouye
275.SH VERSION
276@VERSION@
277.SH COPYRIGHT
278Copyright (C) 2000-2002 IBM, Inc. and others.
279