pkg_create - create binary software package for distribution
pkg_create [-hv] [-A arches] [-B pkg-destdir] [-P dpkgs] [-C
[-p prefix] [-i iscript] [-k dscript] [-r
[-S pkg-destdir] [-D displayfile] [-L localbase]
-d description -f packlist pkg-name
The pkg_create command creates a binary package named
pkg-name, for subsequent
use with pkg_add(1), pkg_delete(1) and pkg_info(1).
will traditionally have a .tgz extension, to denote the underlying binary
Use of the ports(7) infrastructure instead of manual
is strongly recommended.
The options are as follows:
Register a list of architectures for which this
install. arches is a comma-separated list of architectures. Use
`*' to mean any architecture (e.g., arch-independent
Fetch ``packing list'' for package from the file
stdin if packinglist is a dash ``-''.
Fetch package ``one line description'' from file
desc or, if preceded
by ``-'', the argument itself. This string
give some idea of which version of the product (if
any) the package
Fetch long description for package from file desc
or, if preceded
by ``-'', the argument itself.
-v Turn on verbose output.
-h Force tar(1) to follow symbolic links, so that the
point to are dumped, rather than the links themselves (deprecated).
Set iscript to be the install procedure for the
can be any executable program (or shell script). It
will be invoked
automatically when the package is later installed.
Set the initial package dependency list to dpkgs
Set the initial package conflict list to cpkgs (deprecated).
Set prefix as the initial directory ``base'' to
start from in selecting
files for the package, and to record as the
base for installing
Set pkg-destdir as the prefix to prepend to any file
for the package. Prefer -B.
Record localbase as the localbase used in the package. By default,
/usr/local. Packages built with another localbase can only
be installed by using the same localbase in
Set dscript to be the de-install procedure for the
can be any executable program (or shell script). It
will be invoked
automatically when the package is later (if
Set rscript to be the ``requirements'' procedure for
This can be any executable program (or shell
script). It will be
invoked automatically at installation/deinstallation
time to determine
whether or not installation/deinstallation
Display the file (using more(1)) after installing
Useful for things like legal notices on almost-free
The ``packing list'' format (see -f) is fairly simple, being
list of filenames and directory names to include in the
Directory names are denoted by a trailing slash.
There are a few annotations that can be inserted for better
these commands start with an `@'. Here is a list:
Default annotation, to use if filename begins with
is always a relative path, relative to the current
Specialized version of @file, to handle manual
Specialized version of @file, to handle GNU info
grab filename-* chapter files, run installinfo(1) as
Specialized version of @file, to handle shared libraries. Satisfy
LIB_DEPENDS, run ldconfig(8) as needed.
List of architectures for which this package is intended.
Set the package current directory. All subsequent
be assumed relative to pathname.
Execute command during pkg_add(1). If command contains any of
the following sequences somewhere in it, they will
inline. For the following examples, assume that
@cwd is set to
/usr/local and the last extracted file was
%F Expands to the last filename extracted (as
the example case, bin/emacs.
%D Expands to the current directory prefix, as
@cwd; in the example case /usr/local.
%B Expands to the ``basename'' of the fully
that is the current directory prefix,
plus the last
filespec, minus the trailing filename. In
case, that would be /usr/local/bin.
%f Expands to the ``filename'' part of the fully qualified
name, or the converse of %B; in the example
Execute command during pkg_delete(1). Expansion of
special % sequences
is the same as for @exec.
Set default permission for all subsequently extracted files to
mode. Format is the same as that used by the
Use without an arg to set back to default (extraction) permissions.
Set default ownership for all subsequently extracted
user. Use without an arg to set back to default
Set default group ownership for all subsequently extracted files
to group. Use without an arg to set back to default
Imbed a comment in the packing list. Useful in trying to document
some particularly hairy sequence that may trip
Used internally to tell extraction to ignore the
next file (don't
copy it anywhere), as it's used for some special
Used internally to record the settings of -L option.
Set the name of the package. This name is potentially different
than the name of the file it came in, and is used
track of the package for later deinstallation. Note
pkg_create will derive this field from the package
name and add
it automatically if none is given.
Create directory directoryname at pkg_add(1) time,
@group, @owner into account, and remove it during
Directories to remove can be shared between packages. If name
does not begin with an @, same as
Declare directory directoryname to be deleted at deinstall time.
instead, as it handles proper directory creation as
Specialized version of @dir, to handle manual directories: instruct
user to add/remove the directory to
apropos(1) database when needed.
Specialized version of @dir, to handle font directories: create
font.alias from font.alias-* fragments, execute mkfontdir(1),
fc-cache(1) when needed. Delete extra files at
Declare extra file filename to be deleted at deinstall time, if
user sets -c option. Those files are extra configuration files
that are normally not deleted. filename can be an
If filename ends with a slash, it is a directory.
Extra command to execute when removing extra files.
Last preceding @file item is a sample configuration
file, to be
copied to filename at pkg_add(1) time and to be removed at
pkg_delete(1) time. During installation, existing
files are untouched. During deinstallation, configuration files
are only removed if unchanged. filename can be an
If filename ends with a slash, it refers to a configuration directory
Declare name as the file to be displayed at install
time (see -D
Declare a dependency on the pkgname package. The
must be installed before this package may be installed, and this
package must be deinstalled before the pkgname package is deinstalled.
Multiple @pkgdep directives may be used if
depends on multiple other packages.
Declare a conflict to the pkgcflname package. The
package must not be installed if pkgname package
because they install the same files and thus conflict.
pkgcflname may use fnmatch(3) wildcards.
Effects vary depending on name. Some options are
By default, a package conflicts with other
the same package. With this option, the
version will still be noticed, but the installation will
PKG_DESTDIR Default value for pkg-destdir, if no -B or -S
pkg_add(1), pkg_delete(1), pkg_info(1), tar(1), sysconf(3)
The pkg_create command first appeared in FreeBSD.
OpenBSD 3.6 April 21, 1995
[ Back ]