PKGBUILD files are how packages are built and created for Arch Linux and its derivatives such as Manjaro.
You may have even come across them a bit yourself if you8217ve ever used the AUR Arch Linux8217s user-curated repository of PKGBUILDs.
But how exactly do you go from a PKGBUILD to an installable package What exactly is going on between the two and how can you make them for your own packages You8217ll learn them in this article.
For those who are familiar with Bash or other shells you8217ll be delighted to know if you didn8217t already that a PKGBUILD is pretty much just a shell script with some variables.
PKGBUILD files consist of variables and functions all of which are used to define the package itself and how to build it.
To create a package from a PKGBUILD the makepkg command line utility is used. After obtaining a PKGBUILD you simply run makepkg inside the directory containing the PKGBUILD and voila you have an installable package.