Pacman packages: Difference between revisions
From wikinotes
Line 23: | Line 23: | ||
= PKGBUILD Syntax = | = PKGBUILD Syntax = | ||
<blockquote> | <blockquote> | ||
package info | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# ======== | # ======== | ||
Line 32: | Line 33: | ||
arch=('x86_64') # supported cpu architectures. ('any') supports any arch | arch=('x86_64') # supported cpu architectures. ('any') supports any arch | ||
license=('MIT') # (optional) licences (see /usr/share/licences/common/) | license=('MIT') # (optional) licences (see /usr/share/licences/common/) | ||
</syntaxhighlight> | |||
package interoperability | |||
<syntaxhighlight lang="bash"> | |||
# package version requests | # package version requests | ||
depends=('foobar>=1.8.0' 'foobar<2.0.0') # required to build/run | depends=('foobar>=1.8.0' 'foobar<2.0.0') # required to build/run | ||
Line 46: | Line 46: | ||
conflicts=('bleh') # cannot be installed alongside this pkg | conflicts=('bleh') # cannot be installed alongside this pkg | ||
replaces=('bloo') # this package should replace these older/deprecated pkgs | replaces=('bloo') # this package should replace these older/deprecated pkgs | ||
</syntaxhighlight> | |||
files | |||
<syntaxhighlight lang="bash"> | |||
backup=('etc/pacman.conf') # create .pacnew files when ovewritten (relpaths) | backup=('etc/pacman.conf') # create .pacnew files when ovewritten (relpaths) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- PKGBUILD Syntax --> | </blockquote><!-- PKGBUILD Syntax --> |
Revision as of 00:01, 26 December 2021
Archlinux packages are described in PKGBUILD
files, and built using makepkg
.
They are expressed in bash shellscript.
Documentation
man PKGBUILD
https://man.archlinux.org/man/PKGBUILD.5 PKGBUILD docs https://wiki.archlinux.org/title/PKGBUILD
Usage
cd ${DIR_W_PKGBUILD} makepkg
PKGBUILD Syntax
package info
# ======== # pkg info # ======== pkgname=blah 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 license=('MIT') # (optional) licences (see /usr/share/licences/common/)package interoperability
# package version requests depends=('foobar>=1.8.0' 'foobar<2.0.0') # required to build/run checkdepends=('foobar>=1.8.0' 'foobar<2.0.0') # required to run tests optdepends=('foo: does foo' 'bar: does bar') # if installed, program uses these groups=('metapackage-name') # included in metapackage X provides=('blah=1.1.1') # provided by this pkg. (may overlap) conflicts=('bleh') # cannot be installed alongside this pkg replaces=('bloo') # this package should replace these older/deprecated pkgsfiles
backup=('etc/pacman.conf') # create .pacnew files when ovewritten (relpaths)