Difference between revisions of "PKGBUILD Templates"

From ArchWiki
Jump to: navigation, search
(Basic PKGBUILD without comments)
(Basic PKGBUILD)
Line 40: Line 40:
 
  provides=('lol-git')
 
  provides=('lol-git')
 
   
 
   
  conflicts=()
+
# Packages that cannot be installed at the same time as this package
  replaces=()
+
  conflicts=('foobar')
  backup=()
+
 +
# Obsolete Packages that this Package replaces
 +
  replaces=('dur')
 +
 +
# User files that should be saved. They are kept as [[Pacnew and Pacsave Files]]
 +
  backup=('etc/derp.conf')
 +
 +
# Change the default behavior of [[makepkg]] see [[PKGBUILD#options]]
 +
options=
 +
 
  install='foo.install'
 
  install='foo.install'
 
  source=("http://server.tl;dr/${pkgname}-${pkgver}.tar.gz"
 
  source=("http://server.tl;dr/${pkgname}-${pkgver}.tar.gz"

Revision as of 16:37, 9 July 2012

Basic PKGBUILD

# Maintainer: Your Name <your email>

# Name of the Software your PKGBUILD will install - should be unique
pkgname=Derp

# The version number for the software
pkgver=6.6.6

#The release number for the arch package, as fixes are added to the PKGBUILD, the release number will increase
pkgrel=900

# The description of the package, should be about 80 characters long (one line)
pkgdesc="Derp is an example package for this PKGBUILD file."

# The type of processor this software can build and work on. See PKGBUILD#arch
arch=('i686' 'x86_64')

# The official website for the software your PKGBUILD will install
url="http://archlinux.org"

# The License that the software is released under. See PKGBUILD#license
license=('GPLv3')

# The group a package belongs in. An example would be kdebase (install all the KDE  packages)
groups=allyourbase

# Packages that your software needs to run. If the dependancy requires a minimum version number use the >= operator
depends=('herp' 'fuuuuu>=2.0')

# Packages that must be installed to build the software, but at not necessary to run it
makedepends=('supercompiler300')

# Optional packages that extend the software's functionality
optdepends=('derp-toolbar: a browser plugin')

# List of Package names that this PKGBUILD provides. Put modified packages that will be installed here.
provides=('lol-git')

# Packages that cannot be installed at the same time as this package
conflicts=('foobar')

# Obsolete Packages that this Package replaces
replaces=('dur')

# User files that should be saved. They are kept as Pacnew and Pacsave Files
backup=('etc/derp.conf')

# Change the default behavior of makepkg see PKGBUILD#options
options=

install='foo.install'
source=("http://server.tl;dr/${pkgname}-${pkgver}.tar.gz"
        "derp.desktop")
md5sums=('a0b2c3d4e5f6g7h8i9'
         'j10k11l12m13n14o15')

Basic PKGBUILD without comments

# Maintainer: Your Name <your email>

pkgname=Derp
pkgver=6.6.6
pkgrel=900
pkgdesc="Derp is an example package for this PKGBUILD file."
arch=('i686' 'x86_64')
url="http://archlinux.org"
license=('GPLv3')
groups=allyourbase
depends=('herp' 'fuuuuu>=2.0')
makedepends=('supercompiler300')
optdepends=('derp-toolbar: a browser plugin')
provides=('lol-git')
conflicts=()
replaces=()
backup=()
install='foo.install'
source=("http://server.tl;dr/${pkgname}-${pkgver}.tar.gz"
        "derp.desktop")
md5sums=('a0b2c3d4e5f6g7h8i9'
         'j10k11l12m13n14o15')

build() {
 cd "${srcdir}/${pkgname}-${pkgver}"

PKGBUILD with .install and patch