HP-UX Reference (11i v3 07/02) - 4 File Formats (vol 8)
s
swpackage(4) swpackage(4)
Directory Mapping
The directory source[=destination] keyword defines a
source directory under which subsequently
listed files are located. In addition, the user can map the
source directory to a destination directory
under which the packaged files will be installed. For example, the definition:
directory ./commands = /usr/sbin
causes all files from the ./commands
directory to have the prefix /usr/sbin when installed. The
destination directory must be a located within the
product.directory
attribute, if defined.
(This attribute is defined by the
directory keyword in the product specification.)
The destination directory must be an absolute pathname.
The
directory keyword is optional.
Recursive File Specification
The file * keyword directs swpackage to recursively include every file (and directory) within the
current source directory in the fileset. (Partial wildcarding is not supported—e.g.,
file dm* to indicate
all files starting with "dm".)
The
directory keyword must have been previously specified before the file * specification can be
used.
All attributes for the destination file object are taken from the source file, unless a
file_permissions
keyword is active (this keyword is described below).
The user can specify multiple
directory source[=destination]
file *
pairs to gather files from different source directories into a single fileset.
Explicit File Specification
Instead of, or in addition to, the recursive file specification, the user can explicitly specify the files and
directories to be packaged into a fileset.
The user can use the directory keyword to define a source (and destination) for explicitly specified files. If
no directory keyword is active, then the source path and the absolute destination path must be specified for
each file.
(See the EXAMPLES section for sample file specifications.)
An explicit file specification uses this form:
file [-m mode][-o [owner[,]][uid]] [-g [
group[,]][gid]] [-t type]
[-v][
source][destination]
file
Specifies an existing file or directory (perhaps within the currently active source directory) to
include in the fileset.
source
Defines the relative or absolute path to the source file.
If this is a relative path, swpackage will search for it relative to the source directory set by
the directory keyword. If no source directory is active, swpackage will search for it relative to
the current working directory in which the command was invoked.
All attributes for the destination file object are taken from the source file, unless a
file_permissions keyword is active, or the -m, -o,or-g, options are also included in the
file specification.
destination
Defines the destination path at which the file will be installed. If destination is a relative
path, the active destination directory set by the directory keyword will be prefixed to it. If it
is a relative path, and no destination directory is active, swpackage generates an error. If the
destination is not specified, the source is used as the destination, with the appropriate mapping
done with the active destination directory (if any).
-m mode
Defines the (octal) mode of a file or directory.
HP-UX 11i Version 3: February 2007 − 21 − Hewlett-Packard Company 461