-
Acquire the tarball which contains the PKGBUILD and possibly other required files, like systemd units and patches (but often not the actual code).
-
Extract the tarball (preferably in a directory set aside just for builds from the AUR) with
$ tar -xvf pkgname.tar.gz
-
Verify that the PKGBUILD and accompanying files are not malicious or untrustworthy.
-
Run
$ makepkg -sri
in the directory where the files are saved. This will download the code, resolve the dependencies with pacman, compile it, package it, install the package, and finally remove the build-time dependencies, which are no longer needed.