<commit_before>.\"
.\" FreeBSD pkg - a next generation package for the installation and maintenance
.\" of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\"
.\"     @(#)pkg.8
.\" $FreeBSD$
.\"
.Dd February 16, 2012
.Dt PKG-CREATE 8
.Os
.\" ---------------------------------------------------------------------------
.Sh NAME
.Nm "pkg create"
.Nd a utility for creating software package distributions
.\" ---------------------------------------------------------------------------
.Sh SYNOPSIS
.Nm
.Op Fl gxXn
.Op Fl r Ar rootdir
.Op Fl m Ar manifest
.Op Fl f Ar format
.Op Fl o Ar outdir
.Ar pkg-name ...
.Nm
.Fl an
.Op Fl r Ar rootdir
.Op Fl m Ar manifest
.Op Fl f Ar format
.Op Fl o Ar outdir
.\" ---------------------------------------------------------------------------
.Sh DESCRIPTION
.Nm
is used to create packages from binaries installed on your computer.
Packages thus created can be distributed and subsequently installed on other machines
using the
.Cm pkg add
command.
.\" ---------------------------------------------------------------------------
.Sh OPTIONS
The following options are supported by
.Nm :
.Bl -tag -width ".Fl m Ar manifest"
.It Fl a
Create packages for all binaries installed on your system.
You can't use this option along with the
.Fl g , x
or
.Fl X
option.
.It Fl g
Interpret
.Ar pkg-name
as a shell glob pattern and create package only for installed binaries whose
name match this pattern.
.It Fl x
Like
.Fl g ,
but interpret
.Ar pkg-name
as a regular expression.
.It Fl X
Like
.Fl g ,
but interpret
.Ar pkg-name
as an extended regular expression.
.It Fl r Ar rootdir
Specify root directory for the package \" TODO: New description
.It Fl m Ar manifest
Specify manifest directory \" TODO: New description
.It Fl f Ar format
Set
.Ar format
as the package output format.
It can be one of
.Ar txz , tbz , tgz
or
.Ar tar
which are currently the only supported format.
If an invalid or no format is specified
.Ar txz
is assumed.
.It Fl o Ar outdir
Set
.Ar outdir
as the output directory.
If this option is not given, all created packages will
be saved in the current directory.
.It Fl n
Do not overwrite already existing packages
.El
.\" ---------------------------------------------------------------------------
.Sh MANIFEST FILE DETAILS
.Bl -tag -width ".Cm www"
.It Cm name Ar pkg-name
This entry sets the package's name to
.Ar pkg-name . \" TODO: Find out why there is a space after the ``.''
Among other things, this name is used - with the version and the origin of the
concerned package - to identify a dependency.
.It Cm version Ar pkg-version
This entry sets the package's version to
.Ar pkg-version .
.It Cm origin Ar pkg-origin
This entry sets the package's origin to
.Ar pkg-origin .
This is a string of the form
.Pa category/port-dir
which designate the port this package was built from.
.It Cm comment Ar comment-string
.Ar comment-string
is a one-line description of this package.
It is the equivalent of the
.Dv COMMENT
variable for a port, not a way to put comments in a
.Pa +MANIFEST
file.
.It Cm arch Ar cpu-type
The architecture of the machine the package was built on.
.Ar cpu-type
takes values like x86, amd64...
.It Cm osversion Ar os-version
Version of the OS used to build the package.
.It Cm www Ar url
The software's official website.
.It Cm maintainer Ar mail-address
The maintainer's mail address.
.It Cm prefix Ar path-prefix
The path where the files contained in this package are installed
.Pq usually Pa /usr/local .
.It Cm flatsize Ar size
The size that the files contained in this package will occupy on your system
once uncompressed.
This value does not take into account files stored in the
package database.
.It Cm dep Ar dep-name dep-origin dep-version
Declare a dependency on the package which name, origin and version match
.Ar dep-name , dep-origin
and
.Ar dep-version
respectively.
.It Cm conflict Ar pkg-glob
Flag this package as incompatible with the one designated by
.Ar pkg-glob .
Conflicting packages cannot be installed on the same system as they may contain
references to the sames files.
.It Cm option Ar option-name option-value
Set the option
.Ar option-name
to the value
.Ar option-value .
.It Cm file Ar sha256-hash path
.Cm file
entries list files included in the package.
If the file is a regular one, such
an entry contains its sha256 digest along with its path.
If a packaged file is
a link, you must use this entry's other form, as described below.
.It Cm file Ar - path
Same as above but for file links.
The sha256 hash is replaced with a
.Ar -
(dash).
.It Cm dir Ar path
Mimics the
.Cm file
entry but for directories.
.El
.\" ---------------------------------------------------------------------------
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm .
See
.Xr pkg.conf 5
for further description.
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
.It Ev PKG_DBDIR
.It Ev PLIST_KEYWORDS_DIR
.It Ev PORTSDIR
.El
.\" ---------------------------------------------------------------------------
.Sh FILES
See
.Xr pkg.conf 5 .
.\" ---------------------------------------------------------------------------
.Sh SEE ALSO
.Xr pkg 8 ,<commit_msg>Document basic usage examples for pkg-create<commit_after>.\"
.\" FreeBSD pkg - a next generation package for the installation and maintenance
.\" of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\"
.\"     @(#)pkg.8
.\" $FreeBSD$
.\"
.Dd February 16, 2012
.Dt PKG-CREATE 8
.Os
.\" ---------------------------------------------------------------------------
.Sh NAME
.Nm "pkg create"
.Nd a utility for creating software package distributions
.\" ---------------------------------------------------------------------------
.Sh SYNOPSIS
.Nm
.Op Fl gxXn
.Op Fl r Ar rootdir
.Op Fl m Ar manifest
.Op Fl f Ar format
.Op Fl o Ar outdir
.Ar pkg-name ...
.Nm
.Fl an
.Op Fl r Ar rootdir
.Op Fl m Ar manifest
.Op Fl f Ar format
.Op Fl o Ar outdir
.\" ---------------------------------------------------------------------------
.Sh DESCRIPTION
.Nm
is used to create packages from binaries installed on your computer.
Packages thus created can be distributed and subsequently installed on other machines
using the
.Cm pkg add
command.
.\" ---------------------------------------------------------------------------
.Sh OPTIONS
The following options are supported by
.Nm :
.Bl -tag -width ".Fl m Ar manifest"
.It Fl a
Create packages for all binaries installed on your system.
You can't use this option along with the
.Fl g , x
or
.Fl X
option.
.It Fl g
Interpret
.Ar pkg-name
as a shell glob pattern and create package only for installed binaries whose
name match this pattern.
.It Fl x
Like
.Fl g ,
but interpret
.Ar pkg-name
as a regular expression.
.It Fl X
Like
.Fl g ,
but interpret
.Ar pkg-name
as an extended regular expression.
.It Fl r Ar rootdir
Specify root directory for the package \" TODO: New description
.It Fl m Ar manifest
Specify manifest directory \" TODO: New description
.It Fl f Ar format
Set
.Ar format
as the package output format.
It can be one of
.Ar txz , tbz , tgz
or
.Ar tar
which are currently the only supported format.
If an invalid or no format is specified
.Ar txz
is assumed.
.It Fl o Ar outdir
Set
.Ar outdir
as the output directory.
If this option is not given, all created packages will
be saved in the current directory.
.It Fl n
Do not overwrite already existing packages
.El
.\" ---------------------------------------------------------------------------
.Sh MANIFEST FILE DETAILS
.Bl -tag -width ".Cm www"
.It Cm name Ar pkg-name
This entry sets the package's name to
.Ar pkg-name . \" TODO: Find out why there is a space after the ``.''
Among other things, this name is used - with the version and the origin of the
concerned package - to identify a dependency.
.It Cm version Ar pkg-version
This entry sets the package's version to
.Ar pkg-version .
.It Cm origin Ar pkg-origin
This entry sets the package's origin to
.Ar pkg-origin .
This is a string of the form
.Pa category/port-dir
which designate the port this package was built from.
.It Cm comment Ar comment-string
.Ar comment-string
is a one-line description of this package.
It is the equivalent of the
.Dv COMMENT
variable for a port, not a way to put comments in a
.Pa +MANIFEST
file.
.It Cm arch Ar cpu-type
The architecture of the machine the package was built on.
.Ar cpu-type
takes values like x86, amd64...
.It Cm osversion Ar os-version
Version of the OS used to build the package.
.It Cm www Ar url
The software's official website.
.It Cm maintainer Ar mail-address
The maintainer's mail address.
.It Cm prefix Ar path-prefix
The path where the files contained in this package are installed
.Pq usually Pa /usr/local .
.It Cm flatsize Ar size
The size that the files contained in this package will occupy on your system
once uncompressed.
This value does not take into account files stored in the
package database.
.It Cm dep Ar dep-name dep-origin dep-version
Declare a dependency on the package which name, origin and version match
.Ar dep-name , dep-origin
and
.Ar dep-version
respectively.
.It Cm conflict Ar pkg-glob
Flag this package as incompatible with the one designated by
.Ar pkg-glob .
Conflicting packages cannot be installed on the same system as they may contain
references to the sames files.
.It Cm option Ar option-name option-value
Set the option
.Ar option-name
to the value
.Ar option-value .
.It Cm file Ar sha256-hash path
.Cm file
entries list files included in the package.
If the file is a regular one, such
an entry contains its sha256 digest along with its path.
If a packaged file is
a link, you must use this entry's other form, as described below.
.It Cm file Ar - path
Same as above but for file links.
The sha256 hash is replaced with a
.Ar -
(dash).
.It Cm dir Ar path
Mimics the
.Cm file
entry but for directories.
.El
.\" ---------------------------------------------------------------------------
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm .
See
.Xr pkg.conf 5
for further description.
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
.It Ev PKG_DBDIR
.It Ev PLIST_KEYWORDS_DIR
.It Ev PORTSDIR
.El
.\" ---------------------------------------------------------------------------
.Sh EXAMPLES
Create package files for installed packages:
.Dl % pkg create -a -o /usr/ports/packages/All
.Pp
Create package file for pkg:
.Dl % pkg create -o /usr/ports/packages/All pkg
.Pp
.\" ---------------------------------------------------------------------------
.Sh FILES
See
.Xr pkg.conf 5 .
.\" ---------------------------------------------------------------------------
.Sh SEE ALSO
.Xr pkg 8 ,
{'fraction_non_alphanumeric': 0.17047512287660602, 'fraction_numerical': 0.004483918254721049, 'mean_word_length': 2.16107931316435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5956573', 'n_tokens_mistral': 3235, 'n_tokens_neox': 3037, 'n_words': 1722}