.SRCINFO - ArchWiki

# .SRCINFO

Related articles

- Arch packaging standards
- Arch Build System
- Creating packages
- Category:Package development
- Pacman tips
- Arch User Repository
- makepkg
- pacman

This article discusses the creation of and variables definable by the maintainer in a .SRCINFO. For information on the .SRCINFO functions and creating packages in general, refer to Creating packages. Also read `man .SRCINFO`.

`.SRCINFO` is a metadata file used in source tarballs to overwrite specific PKGBUILD fields required by Arch Linux packages.

Maintainters can generate `.SRCINFO` files using:

    $ makepkg --printsrcinfo

Which prints to standard output, or:

    $ mksrcinfo

Provided by pkgbuild-introspection, which writes to the file `.SRCINFO`.

An outdated format of this file was described in the AUR 2.1.0 release announcement. `.SRCINFO` files are parsed line-by-line. The syntax for each line is `key[_arch] = value`. Exactly one space must be on each side of the equals sign, even for an empty value, and do not include quotes around the values.

Warning: Updates to packages require `.SRCINFO` to be regenerated. AUR packagers should be aware that uploads without changes to `.SRCINFO` will be accepted, causing discrepancies between the stale package information displayed on AUR and the actual package content.

## Manually setting keys

The `key` is a field name, based on the names of the corresponding PKGBUILD Variables. Some field names may optionally be suffixed with an architecture name. Fields are grouped into sections, each headed by one of the following two field names:

- pkgbase: This is required by AUR 3, otherwise the infamous “only lowercase letters are allowed” error is reported. (Pacman uses the first pkgname if pkgbase is omitted.) Repeat pkgname if unsure. There is only one pkgbase section. The field values from this section are inherited unless overridden in the pkgname sections that follow it. An empty field value in the pkgname section cancels the inheritance.
- pkgname: There may be multiple pkgname sections.

The following field names are associated with a single value for the section:

- epoch
- pkgver: package version, may be formatted as [epoch:]pkgver if the epoch field is not given separately
- pkgrel: release number of the package specific to Arch Linux
- pkgdesc
- url

The following field names may be repeated on multiple lines in a section to add multiple values:

- license: in case of multiple licenses separate them by a space
- groups

The following field names may be repeated, and also may optionally have an architecture suffix, separated from the field name by an underscore:

- depends: dependencies, one per line
- makedepends
- checkdepends
- optdepends
- conflicts
- provides
- replaces
- source

Fields with other names are ignored. Blank lines and comment lines beginning with a hash sign (#) are also ignored. Lines may be indented. This format closely matches the `.PKGINFO` format that is used for binary packages in pacman/libalpm.

## See also

- .SRCINFO(5) Manual Page
- Example .SRCINFO file

Category:

- Package development