-
-
Notifications
You must be signed in to change notification settings - Fork 2
Arch Linux Arch Build System
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to the Arch Build System (ABS), including building packages from source, creating custom packages, and PKGBUILD creation.
Arch Build System builds packages from source.
Components:
- PKGBUILD: Build script
- makepkg: Build tool
- AUR: User repository
Install build tools:
# Install base-devel
sudo pacman -S base-devel
# Install asp (for official packages)
sudo pacman -S aspFrom AUR:
# Clone AUR package
git clone https://aur.archlinux.org/package-name.git
cd package-nameFrom official:
# Get package
asp checkout package-name
cd package-name/trunkBuild:
# Build package
makepkg -s
# Install
makepkg -siBasic PKGBUILD:
pkgname=package-name
pkgver=1.0.0
pkgrel=1
pkgdesc="Package description"
arch=('x86_64')
url="https://example.com"
license=('GPL')
depends=('dependency')
source=("https://example.com/package.tar.gz")
md5sums=('checksum')
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
}Check logs:
# Check build log
cat ~/.makepkg.log
# Clean build
makepkg -cThis guide covered ABS, building packages, and creating PKGBUILDs.
- Arch Linux Package Management - Package management
- Arch Linux Development Environment - Development
- ArchWiki ABS: https://wiki.archlinux.org/title/Arch_Build_System
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.