apk_create — a utility for creating software packages
apk_create [-fhvS] [-a [+]arch] [-c [+]desc] [-d [+]deps] [-i ] [iscript-I ] [piscript-k ] [dscript-K ] [pdscript-l [+]] [license-m ] [metadir-o ] [owners-p ] [package-P [+]pkgs] [-s ] [srcdir-T ] [includefile-u ] [uscript-U ] [puscript-x ] [excludepattern-X ] [excludefile-w [+]uri] apk-filename
The apk_create command is used to create packages that will subsequently be fed to one of the apk-tools applications. The input description and command line arguments for the creation of a package are not meant to be human-generated, though it is easy enough to do so. It is more expected that you will use a front-end tool for the job rather than muddling through it yourself. Nonetheless, a short description of the input syntax is included in this document.
The following command line arguments are supported:
apk-filenameThe package filename. This will specify the package name and version. The filename consist of four logical subsections:
pkg-ver{_suf{#}}{-r#}.apk
The brackets ({}) delineate optional fields. # represents any non-zero positive integer.
The first subsection, pkg, is the package name,
which should only contain lowercase letters, the
digits 0-9, and any number of single hyphen (-),
underscore (_) or plus (+) characters.
The second subsection, ver,
is the version of the package, which should
normally be same as the version on the main
source tarball. The version is normally made up of
two or three (or more) numbers separated by
periods, such as 1.2 or 4.5.2, and may have a
single letter immediately following the last digit;
e.g., 1.4b or 2.6h. The package version is joined to
the package name with a hyphen. For example:
foo-1.0, bar-2.4.6.
The third subsection, {_suf{#}},
is optional may contain one of these predefined
suffixes, listed in least-recent to most-recent order:
Alpha release
Beta release
Prerelease
Normal release
Patch level (normally accompanied by trailing integer)
Any of these suffixes may be immediately followed by a non-zero positive integer, e.g., foo-2.4.0_pre10.
The fourth subsection of the package name is the
distro specific revision number ({-r#}).
# is a non-zero positive integer; e.g., package-4.5.3-r3.
-a [+]arch
Fetch package “architechture” from file arch
or, if preceded by +, the argument itself.
-c [+]desc
Fetch package “one line description” from file desc
or, if preceded by +, the argument itself.
-fUse fakeroot when creating package. apk_create will set root:root as owner on all files before creation. This option will allow creation of packages without root permissions.
-hShow help and exit.
-i iscript
Set to
be the pre-install shell script for the package. It will
be invoked automatically when the package is later
installed. It will be passed the package's name as
the first argument.
iscript
-I piscript
Set to
be the post-install shell script for the package. It will
be invoked automatically when the package is later
installed. It will be passed the package's name as
the first argument.
piscript
-k dscript
Set to
be the pre-deinstall shell script for the package. It will
be invoked automatically when the package is later
(if ever) de-installed. It will be passed the package's
name as the first argument.
dscript
-K pdscript
Set to
be the post-deinstall shell script for the package. It will
be invoked automatically when the package is later
(if ever) de-installed. It will be passed the package's
name as the first argument.
pdscript
-l [+]license
Fetch package “license” from file license
or, if preceded by +, the argument itself.
-m metadir
Use all metafiles found in metadir.
-o owners
Set to
be the OWNERS list for the package.
owners
The OWNERS file sets the user and group ownership for files in the package. The format is:
user [:group] [@]relative/path/to/file
Where user and group are
either numeric or named UID/GIDs.
If the pathspec begins
with the literal "@", then chown is run with the -R (recursive)
option to set ownership of the entire subtree.
-p package
Use as
source instead of package. (See srcdir-s.) The has to
be either a .tar.gz or a .tar.bz2 file.
package
-P pkgs
Set the initial package dependency list to pkgs. This
is assumed to be a whitespace separated list of
package names without version numbers.
-s srcdir
Set srcdir as the
source directory from where to select files for the
package. If this option is not specified, the current directory is
used.
-SStrip all ELF files with sstrip.
-T includefile
Include files that are listed in the file
includefile or
stdin if includefile is a - (dash).
-u uscript
Set to
be the pre-update shell script for the package. It will
be invoked automatically when the package is later
(if ever) updated. It will be passed the package's
name as the first argument.
uscript
-U puscript
Set to
be the post-update shell script for the package. It will
be invoked automatically when the package is later
(if ever) updated. It will be passed the package's
name as the first argument.
puscript
-vTurn on verbose mode.
-w [+]uri
Fetch package hompage from
file or,
if preceded by +, the argument itself.
uri
-x excludepattern
Exclude files that matches excludepattern.
-X excludefile
Exclude files that are listed in the file
excludefile or
stdin if excludefile is a - (dash).