Building Packages

With Arch Linux ARM, it's easy to build packages on your own to suit your needs. It's just as easy to port your applications to Arch Linux ARM by utilizing our build system. You'll be making packages of your own in 10 minutes.

If you're looking for a place to start, this is it!

The Process: Overwiew

  • Install the build essentials (base-devel).
  • Obtain a PKGBUILD.
  • Go to the folder containing the PKGBUILD file.
  • Run "makepkg".

Components

  • ABS: stands for "Arch Build System". It pulls PKGBUILD files from Arch Linux's rsync repository. This is a great place to look for PKGBUILDs.
  • AUR: stands for "Arch User Repository". If you can't find a PKGBUILD in ABS, look here. Download the "tarball" of a package and extract it for a PKGBUILD and any other requisite files.
  • makepkg: a command, when run in the same folder as a PKGBUILD, creates a package file.
  • PKGBUILD: a file containing information about and how to build source files into a package. Here's how to write one on the Arch Linux Wiki.

Installing Native Build Essentials
Run the following to install basic native compiling tools on Arch Linux ARM:
pacman -S kernel26-headers file base-devel abs

Getting PKGBUILDs
If you want to compile packages from the Arch Build System (ordinary packages available for other Linux platforms such as MediaTomb, Firefox, Samba, etc., you can download sources to build packages from the ABS.

If your package is not in ABS, search the Arch User Repository (AUR) for a community-made source tarball.

If you still have not found the package you intend to use, you'll need to write your own PKGBUILD file (guide here).

Making Packages from PKGBUILDs
The configuration options used for building packages are contained in /etc/makepkg.conf. You should browse through it to get an idea of what's there.
Once you have a PKGBUILD file or tarball from the AUR, all you need to do is run makepkg:
makepkg --asroot -Acs

Once makepkg finishes, you'll see a new ".pkg.tar.xz" file in the same folder as your PKGBUILD file (or whatever you set PKGDEST to in /etc/makepkg.conf).

This package is ready for installation (and inclusion in our repository). Submit your PKGBUILDs on the Forum.

Installing Home-made Packages
Simply run:
pacman -U nameofpackage-1.0-1.pkg.tar.xz

Managing Packages from AUR
It can be really be tedious to get multiple PKGBUILDs from AUR, especially when it comes to dependencies. Consider getting packer. Usage commands are the same as pacman.

You can also install Yaourt, a popular and easy-to-use Pacman replacement that builds packages from AUR if it doesn't find them in the regular repositories. You will have to run yaourt using "yaourt -AS packagename" to bypass the architecture line (which will most of the time say that the package will work only on x86 or x86_64, when it can really be built on ARM as well).

If you're having trouble compiling a package or need help, hop into IRC or post on the Forum.