Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 1.08 KB

arch-linux-official-packaging.md

File metadata and controls

62 lines (39 loc) · 1.08 KB

How to create an arch linux package the right way

Install devtools

sudo pacman -Syu devtools

Prepare a clean chroot

Create a directory in which the chroot will reside:

mkdir ~/chroot

Define the CHROOT environment variable:

echo "CHROOT=$HOME/chroot" >> ~/.bashrc

Create the chroot (the sub directory root is required because the $CHROOT directory will get other sub directories for clean working copies):

mkarchroot $CHROOT/root base-devel

Edit ~/.makepkg.conf to set the packager name and any makeflags:

Adjust the mirrorlist in $CHROOT/root/etc/pacman.d/mirrorlist:

WIP

Enable the testing repositories in $CHROOT/root/etc/pacman.conf:

WIP

How to prepare the chroot before building a package

Make sure the base chroot ($CHROOT/root) is up to date:

arch-nspawn $CHROOT/root pacman -Syu

How to build a package inside a chroot

Build the package by calling makechrootpkg in the directory containing its PKGBUILD:

makechrootpkg -c -r $CHROOT package_name