Arch Linux packages are built with
makepkg tool. In order to build a package from scratch you need to create a
PKGBUILD file which defines package metadata and build steps. This file is essentially a Bash script.
A very basic
PKGBUILD file could look like this:
pkgdesc="Notify all users with X sessions about available updates with a popup."
mkdir -p $pkgdir/usr/bin
install -D -m755 ./updates.py $pkgdir/usr/bin/$pkgname
It creates a package which installs
updates.py file into
For more information see ArchWiki page, which describes in depth how Arch Linux packaging works and how to properly build a package.
There is also an ArchLinux User Repository (AUR) which contains
PKGBUILD files created by users. You can choose a package and click view PKGBUILD to get better idea how others write their
You can use
pacman to download a package:
pacman -Sw <package_name>
This will download a package with all its dependencies into
For more information on using
pacman you can also check out corresponding ArchWiki page.