apk-tools

the small and simple package manager

home : downloads : project :

Name

apk_create — a utility for creating software packages

Synopsis

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

DESCRIPTION

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.

OPTIONS

The following command line arguments are supported:

apk-filename

The 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

Alpha release

_beta

Beta release

_pre

Prerelease

(none)

Normal release

_p

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.

-f

Use 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.

-h

Show help and exit.

-i iscript

Set iscript 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.

-I piscript

Set piscript 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.

-k dscript

Set dscript 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.

-K pdscript

Set pdscript 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.

-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 owners to be the OWNERS list for the package.

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 package as source instead of srcdir. (See -s.) The package has to be either a .tar.gz or a .tar.bz2 file.

-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.

-S

Strip 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 uscript 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.

-U puscript

Set puscript 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.

-v

Turn on verbose mode.

-w [+]uri

Fetch package hompage from file uri or, if preceded by +, the argument itself.

-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).

ENVIRONMENT

APK_TMPDIR

Directory where apk_create stores temporary files. Default is /tmp.

FILES

/tmp

Default location for temporary files and directories.

SEE ALSO

apk_add (1)

SourceForge.net Logo