-
Notifications
You must be signed in to change notification settings - Fork 2
Format
Marco edited this page Feb 16, 2026
·
3 revisions
Syntax reference for writing PKGBUILDs. See The PKGBUILD for an introduction to the format.
pkgname="mypackage"
pkgdesc=`string with "quotes" inside`url="https://github.com/user/${pkgname}"# Single element
arch=('x86_64')
# Multiple elements
depends=(
'libfoo'
'libbar'
)build() {
cd "${srcdir}/${pkgname}-${pkgver}"
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
}Append __<directive> to any variable or array to make it target-specific:
pkgdesc="Default description"
pkgdesc__ubuntu="Ubuntu-specific description"
makedepends=(
'gcc'
)
makedepends__apt=(
'build-essential'
)See Directives for the full list.