ArchLinux Package Build Script
Table of Contents
A PKGBUILD is a Bash script containing the build information required by Arch Linux packages. 1
1. Essential Variables 2
In order to name a package, these variables are important.
pkgbasepkgnamepkgver(required)- The version of the package, consisting of letters, numbers, periods, and underscores.
pkgrel(required)- The release number.
pkgdesc- The description of the package, usually <= 80 words.
arch(required)- An array of architecturs that this
PKGBUILDis intended to build and work on. Likex86_64. For most of the cases, we can usearch=(any)to indicate the package can be built on any architecture. license- The open-source license.
1.1. Managing Dependencies
dependsAn array of packages that must be installed for the software to build and run. Packages can be constrained with
>, >=, <, <=to specify certain versions.Dependencies should normally include the requirements for building all optional features of a package.
makedepends- An array of packages that are only required to build the package.
checkdepends- An array of packages required to run its tests, but at runtime.
optdepends- An array of packages that are not needed for the software to function, but provide additional features.
1.2. Package Relations
provides
2. Makepkg Utility 3
Footnotes:
1
Templates for PKGBUILD are available as .proto files under /usr/share/pacman/.