Pacman packages: Difference between revisions

From wikinotes
Line 22: Line 22:
<blockquote>
<blockquote>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# ========
# required
# required
# ========
pkgname=
pkgname=
pkgver=1.1.1    # '[0-9a-Z.@_+-]+', versions must increase alphanumerically
pkgver=1.1.1    # '[0-9a-Z.@_+-]+', versions must increase alphanumerically
Line 28: Line 30:
arch=('x86_64')  # supported cpu architectures. ('any') supports any arch
arch=('x86_64')  # supported cpu architectures. ('any') supports any arch


# ========
# optional
# optional
# ========
license=('MIT')  # licences (see /usr/share/licences/common/)
license=('MIT')  # licences (see /usr/share/licences/common/)
groups=('metapackage-name')              # included in metapackage X
depends=('foobar>=1.8.0' 'foobar<2.0.0')  # required package version requests
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- PKGBUILD Syntax -->
</blockquote><!-- PKGBUILD Syntax -->

Revision as of 23:05, 25 December 2021

Archlinux packages are described in PKGBUILD files, and built using makepkg.
They are expressed in bash shellscript.

Documentation

PKGBUILD docs https://wiki.archlinux.org/title/PKGBUILD

Usage

cd ${DIR_W_PKGBUILD}
makepkg

PKGBUILD Syntax

# ========
# required
# ========
pkgname=
pkgver=1.1.1     # '[0-9a-Z.@_+-]+', versions must increase alphanumerically
pkgrel=2         # increment for each build-version of the same package-version.
arch=('x86_64')  # supported cpu architectures. ('any') supports any arch

# ========
# optional
# ========
license=('MIT')  # licences (see /usr/share/licences/common/)

groups=('metapackage-name')               # included in metapackage X
depends=('foobar>=1.8.0' 'foobar<2.0.0')  # required package version requests