pkg_create - create binary software package for distribution
pkg_create [-hv] [-A arches] [-B pkg-destdir] [-P dpkgs] [-C
cpkgs]
[-p prefix] [-i iscript] [-k dscript] [-r
rscript]
[-S pkg-destdir] [-D displayfile] [-L localbase]
-c comment
-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).
pkg-name
will traditionally have a .tgz extension, to denote the underlying binary
format.
Use of the ports(7) infrastructure instead of manual
pkg_create invocation
is strongly recommended.
The options are as follows:
-A arches
Register a list of architectures for which this
package should
install. arches is a comma-separated list of architectures. Use
`*' to mean any architecture (e.g., arch-independent
packages).
-f packinglist
Fetch ``packing list'' for package from the file
packinglist or
stdin if packinglist is a dash ``-''.
-c [-]desc
Fetch package ``one line description'' from file
desc or, if preceded
by ``-'', the argument itself. This string
should also
give some idea of which version of the product (if
any) the package
represents.
-d [-]desc
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
files they
point to are dumped, rather than the links themselves (deprecated).
-i iscript
Set iscript to be the install procedure for the
package. This
can be any executable program (or shell script). It
will be invoked
automatically when the package is later installed.
-P dpkgs
Set the initial package dependency list to dpkgs
(deprecated).
-C cpkgs
Set the initial package conflict list to cpkgs (deprecated).
-p prefix
Set prefix as the initial directory ``base'' to
start from in selecting
files for the package, and to record as the
base for installing
the package.
-S pkg-destdir
-B pkg-destdir
Set pkg-destdir as the prefix to prepend to any file
to select
for the package. Prefer -B.
-L localbase
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
pkg_add(1), to
prevent errors.
-k dscript
Set dscript to be the de-install procedure for the
package. This
can be any executable program (or shell script). It
will be invoked
automatically when the package is later (if
ever) de-installed.
-r rscript
Set rscript to be the ``requirements'' procedure for
the package.
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
should proceed.
-D displayfile
Display the file (using more(1)) after installing
the package.
Useful for things like legal notices on almost-free
software,
etc.
The ``packing list'' format (see -f) is fairly simple, being
basically a
list of filenames and directory names to include in the
package.
Directory names are denoted by a trailing slash.
There are a few annotations that can be inserted for better
control. All
these commands start with an `@'. Here is a list:
@file filename
Default annotation, to use if filename begins with
@. filename
is always a relative path, relative to the current
@cwd.
@man filename
Specialized version of @file, to handle manual
pages.
@info filename
Specialized version of @file, to handle GNU info
files. Automatically
grab filename-* chapter files, run installinfo(1) as
needed.
@lib filename
Specialized version of @file, to handle shared libraries. Satisfy
LIB_DEPENDS, run ldconfig(8) as needed.
@arch arches
List of architectures for which this package is intended.
@cwd pathname
Set the package current directory. All subsequent
filenames will
be assumed relative to pathname.
@exec command
Execute command during pkg_add(1). If command contains any of
the following sequences somewhere in it, they will
be expanded
inline. For the following examples, assume that
@cwd is set to
/usr/local and the last extracted file was
bin/emacs.
%F Expands to the last filename extracted (as
specified); in
the example case, bin/emacs.
%D Expands to the current directory prefix, as
set with
@cwd; in the example case /usr/local.
%B Expands to the ``basename'' of the fully
qualified filename,
that is the current directory prefix,
plus the last
filespec, minus the trailing filename. In
the example
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
case, emacs.
@unexec command
Execute command during pkg_delete(1). Expansion of
special % sequences
is the same as for @exec.
@mode mode
Set default permission for all subsequently extracted files to
mode. Format is the same as that used by the
chmod(1) command.
Use without an arg to set back to default (extraction) permissions.
@owner user
Set default ownership for all subsequently extracted
files to
user. Use without an arg to set back to default
(extraction)
ownership.
@group group
Set default group ownership for all subsequently extracted files
to group. Use without an arg to set back to default
(extraction)
group ownership.
@comment string
Imbed a comment in the packing list. Useful in trying to document
some particularly hairy sequence that may trip
someone up
later.
@ignore
Used internally to tell extraction to ignore the
next file (don't
copy it anywhere), as it's used for some special
purpose.
@localbase base
Used internally to record the settings of -L option.
@name pkgname
Set the name of the package. This name is potentially different
than the name of the file it came in, and is used
when keeping
track of the package for later deinstallation. Note
that
pkg_create will derive this field from the package
name and add
it automatically if none is given.
@dir directoryname
Create directory directoryname at pkg_add(1) time,
taking @mode,
@group, @owner into account, and remove it during
pkg_delete(1).
Directories to remove can be shared between packages. If name
does not begin with an @, same as
name/
@dirrm directoryname
Declare directory directoryname to be deleted at deinstall time.
Deprecated, use
directoryname/
instead, as it handles proper directory creation as
well.
@mandir directoryname
Specialized version of @dir, to handle manual directories: instruct
user to add/remove the directory to
man.conf(5), remove
apropos(1) database when needed.
@fontdir directoryname
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
pkg_delete(1)
time.
@extra filename
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
absolute path.
If filename ends with a slash, it is a directory.
@extraunexec command
Extra command to execute when removing extra files.
@sample filename
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
configuration
files are untouched. During deinstallation, configuration files
are only removed if unchanged. filename can be an
absolute path.
If filename ends with a slash, it refers to a configuration directory
instead.
@display name
Declare name as the file to be displayed at install
time (see -D
above).
@pkgdep pkgname
Declare a dependency on the pkgname package. The
pkgname package
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
the package
depends on multiple other packages.
@pkgcfl pkgcflname
Declare a conflict to the pkgcflname package. The
pkgcflname
package must not be installed if pkgname package
gets installed
because they install the same files and thus conflict.
pkgcflname may use fnmatch(3) wildcards.
@option name
Effects vary depending on name. Some options are
not documented
yet.
no-default-conflict
By default, a package conflicts with other
versions of
the same package. With this option, the
older package
version will still be noticed, but the installation will
proceed anyway.
PKG_DESTDIR Default value for pkg-destdir, if no -B or -S
option is
specified.
pkg_add(1), pkg_delete(1), pkg_info(1), tar(1), sysconf(3)
The pkg_create command first appeared in FreeBSD.
Jordan Hubbard
initial design
Marc Espie
complete rewrite.
OpenBSD 3.6 April 21, 1995
[ Back ] |