Name

pkg.tar - pacman package archive format

Description

A built package for the pacman package manager is a standard tarball, with optional compression. Files within the tarball are extracted to pacman’s RootDir, using the ownership and permission modes recorded in the tarball.

Files in the root of the archive which start with a dot are not extracted and are considered as packaging metadata. By convention, these files are stored as the first files in the archive, to ensure fast access when extracting metadata. The currently used metadata filenames are:

.PKGINFO

The metadata about the package itself, described below. Required.

.BUILDINFO

Contains build environment information described in BUILDINFO(5). Optional.

.CHANGELOG

A changelog defined in PKGBUILD(5). Optional.

.INSTALL

An install script defined in PKGBUILD(5). Optional.

.MTREE

A serialized mtree(5) description of all files and file metadata provided by the package. Optional.

PKGINFO

The metadata for a package is stored in the .PKGINFO file, formatted as key-value pairs separated by a =, one value per line. Arrays are represented as multiple keys with the same value.

Comments are supported by beginning a line with the hash (#) symbol.

Metadata is mostly taken from the PKGBUILD(5) format, but with some deviations. The full list of .PKGINFO metadata is as follows:

pkgname

The name of the package. Differs from PKGBUILD(5) in that one PKGBUILD can have multiple names, one for each resulting pkg.tar. Required.

pkgver

The full version of the package. Differs from PKGBUILD(5) in that it unifies the three PKGBUILD fields $epoch:$pkgver-$pkgrel. If epoch is 0 or empty, $pkgver-$pkgrel is used. Required.

builddate

The build date of the package in seconds since the epoch.

packager

The details of the packager that built the package.

size

The summed size in bytes of the files installed by the package.

arch

The architecture the package has been built for.

pkgbase
pkgdesc
url
license (array)
replaces (array)
group (array)
provides (array)

Corresponds to the same metadata variable in PKGBUILD(5)

conflict (array)
backup (array)
depend (array)
optdepend (array)
makedepend (array)
checkdepend (array)

Corresponds to the metadata variable in PKGBUILD(5) with the same name but an s appended.

Limitations

The names of files within the tarball may not contain a newline character.

Metadata cannot contain newlines.

Neither the pkgname nor pkgver may contain a slash (/) character.

The pkgname should not contain the characters =<> or the substring ': ' as this prevents it from resolving as a valid dependency for another package.