2 .\" FreeBSD install - a package for the installation and maintainance
3 .\" of non-core utilities.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
19 .TH pkg_create 1 "July 18, 1993" "" "FreeBSD"
22 pkg_create - a utility for creating software package distributions.
32 command is used to create packages that will subsequently be fed to
33 one of the package extraction/info utilities. The input description
34 and command line arguments for the creation of a package are not
35 really meant to be human-generated, though it is easy enough to
36 do so. It is more expected that you will use a front-end tool for
37 the job rather than muddling through it yourself. Nonetheless, a short
38 description of the input syntax is included in this document.
42 The following command line options are supported.
45 Turns on verbose output.
49 Fetch package "one line description" from file
53 , the argument itself. This string should also
54 give some idea of which version of the product (if any) the package
59 Fetch long description for package from file
63 , the argument itself.
67 Fetch "packing list" for package from
81 to be the install procedure for the package. This can be any
82 executable program (or shell script). It will be invoked automatically
83 when the package is later installed.
89 As the initial directory "base" to start from in selecting files for
96 to be the de-install procedure for the package. This can be any
97 executable program (or shell script). It will be invoked automatically
98 when the package is later (if ever) de-installed.
104 to be the "requirements" procedure for the package. This can be any
105 executable program (or shell script). It will be invoked automatically
106 at installation/deinstallation time to determine whether or not
107 installation/deinstallation should proceed.
113 as the input to mktemp(3). By default, this is the string
114 .B /tmp/instmp.XXXXXX,
115 but it may be necessary to override it in the situation where
118 directory is limited. Be sure to leave some number of `X' characters
119 for mktemp(3) to fill in with a unique ID.
129 when creating final package. See
135 flag) for further information on using this flag.
137 .SH "TECHNICAL DETAILS"
138 The "packing list" format (see \fB-f\fR) is fairly simple, being
139 nothing more than a single column of filenames to include in the
140 package. However, since absolute pathnames are generally a bad idea
141 for a package that could be installed potentially anywhere, there is
142 another method of specifying where things are supposed to go
143 and, optionally, what ownership and mode information they should be
144 installed with. This is done by imbeding specialized command sequences
145 in the packing list. Briefly described, these sequences are:
147 .BI "@cwd\ " directory
148 Sets the internal directory pointer to point to
150 All subsequent filenames will be assumed relative to this directory.
153 is also an alias for this command.
155 .BI "@exec\ " command
158 as part of the unpacking process. If
160 contains a any of the following sequences somewhere in it, they will
161 be expanded inline. For the following examples, assume that
165 and the last extracted file was
169 Expands to the last filename extracted (as specified), in the example case
173 Expands to the current directory prefix, as set with
179 Expands to the "basename" of the fully qualified filename, that
180 is the current directory prefix, plus the last filespec, minus
181 the trailing filename. In the example case, that would be
185 Expands to the "filename" part of the fully qualified name, or
188 , being in the example case,
191 .BI "@unexec\ " command
194 as part of the deinstallation process. Expansion of special
196 sequences is the same as for
198 This command is not executed during the package add, as
200 is, but rather when the package is deleted. This is useful
201 for creating links and other ancillary files that were created
202 as a result of adding the package, but not directly known to
203 the package's table of contents (and hence not automatically
204 removable). The advantage of using
206 over a deinstallation script is that you can use the "special
207 sequence expansion" to get at files regardless of where they've
208 been potentially redirected (see
212 Sets default permission for all subsequently extracted files to
214 Format is the same as that used by the
216 command (well, considering that it's later handed off to it, that's
217 no surprise). Use without an arg to set back to default (extraction)
221 Sets default ownership for all subsequently extracted files to
223 Use without an arg to set back to default (extraction)
227 Sets default group ownership for all subsequently extracted files to
229 Use without an arg to set back to default (extraction)
232 .BI "@comment\ " string
233 Imbed a comment in the packing list. Useful in
234 trying to document some particularly hairy sequence that
235 may trip someone up later.
238 Used internally to tell extraction to ignore the next file (don't
239 copy it anywhere), as it's used for some special purpose. Also useful
240 if you want to pack some specialized datafiles in with a distribution
241 for your install script (or something) and want to have the installer
245 Sets the name of the package. This is mandatory and is usually
246 put at the top. This name is potentially different than the name of
247 the file it came in, and is used when keeping track of the package
248 for later deinstallation. Note that
250 will derive this field from the package name and add it automatically
256 .BR pkg_add "(" 1 "),"
257 .BR pkg_info "(" 1 "),"
258 .BR pkg_delete "(" 1 "),"