Differences between revisions 3 and 4
Revision 3 as of 2023-01-08 18:17:52
Size: 1868
Comment:
Revision 4 as of 2023-01-08 18:18:13
Size: 1817
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Linux/ArchLinuxPackaging

Arch Linux Packaging


Arch Linux

Arch Linux encourages and empowers users to create their own software packages.

  • The package manager pacman is designed to mix and match official binary packages with unofficial, locally compiled packages.

  • Packages are never split between software and development headers.
  • Build options and flags are coordinated through system configuration packages.
  • Tools for isolated build processes are well tested and documented.


PKGBUILD

A PKGBUILD is a shell script to build a software package installable by pacman(8). The shell script is called by the makepkg(8) utility.

A PKGBUILD...

  • mandatorily defines the pkgname, pkgver, pkgrel, and arch variables

  • defines dependencies as an array variable, wherein each element is a package name with versioning constraints
    • try: depends=('foobar>=1.8.0' 'foobar<2.0.0')

  • defines well-known functions that will be called by makepkg(8)

    • prepare applies patches to the source code

    • build calls the build pipeline, including any configuration steps

    • check calls the test suite

    • package creates the package

It's also possible to specify build-time dependencies with the makedepends variable (same format as depends), test suite dependencies with the checkdepends variables (again, same format), and optional (feature gate) dependencies with the optdepends variable (try: optdepends=('cups: printing support')).

If a package provides software that may be depended upon by other packages, set the provides array variable accordingly. Try: provides=('foobar=1.2.3').


Arch User Repository


CategoryRicottone

Linux/Arch/Packaging (last edited 2023-12-02 01:46:19 by DominicRicottone)