aur-build
aur-build is the core utility for building packages and adding them to a local pacman repository.
Synopsis
aur build [options] [-a queue] [--margs makepkg_args...] [--cargs makechrootpkg_args...]
Description
This command orchestrates the process of building a package from a directory containing a PKGBUILD. It handles calling makepkg (or aur-chroot for containerized builds), moving the resulting package files to the repository directory, signing them if requested, and updating the repository database with repo-add.
After a successful build and database update, it also triggers a pacman sync operation for the local repository to make the new packages immediately available for installation, unless --no-sync is specified.
Options
-a FILE,--arg-file=FILE: Read a list of directories containing PKGBUILDs fromFILE. If unspecified, the current directory is used.-c,--chroot: Build packages inside asystemd-nspawncontainer usingaur-chroot.-d NAME,--database=NAME: The name of the local pacman repository database.--root=DIR: The root directory for the repository, where the database and package files are stored.--pool=DIR: An optional separate directory to store package files. If used, symbolic links will be created in the repository's root directory. This requires a filesystem that supports symlinks.-f,--force: Rebuild a package even if a file with the same name already exists in the repository.-S,--sign,--gpg-sign: Sign built packages and the repository database with GPG.--pkgver: Runmakepkg -odbefore checking for existing packages. This is useful for VCS packages to update their version number via thepkgver()function.--no-sync: Do not runpacman -Syon the local repository after a successful build.--results=FILE: Write colon-delimited output toFILE, indicating whether a package was built (build:) or already existed (exist:).
Makepkg Options
These options are passed directly to makepkg.
--margs=ARGS: Comma-separated arguments to pass tomakepkg.--nocheck: Do not run thecheck()function.-n,--noconfirm: Do not ask for confirmation when installing dependencies.-r,--rmdeps: Remove dependencies after a successful build.-s,--syncdeps: Install missing dependencies withpacman.-A,--ignorearch: Ignore thearchfield in the PKGBUILD.-C,--clean: Clean up work files after a successful build.--cleanbuild: Remove the$srcdirbefore building.
Repo-add Options
These options are passed to repo-add.
-R,--remove: Remove old package files from the repository when updating an entry.--new: Only add packages that are not already in the database.--prevent-downgrade: Do not add a package if a newer version is already present.
Environment Variables
AUR_MAKEPKG: The command to use instead ofmakepkgfor building packages.AUR_REPO_ADD: The command to use instead ofrepo-add.AUR_GPG: The command to use for signing packages.GPGKEY: The GPG key ID to use for signing.TMPDIR: Directory for temporary files. Built packages are staged here before being moved to the repository. Defaults to/var/tmp.