Skip to content

Instantly share code, notes, and snippets.

@valeth
Created August 12, 2014 12:38
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save valeth/f94e42cd9ecf76034ef7 to your computer and use it in GitHub Desktop.
Save valeth/f94e42cd9ecf76034ef7 to your computer and use it in GitHub Desktop.
[archlinux] PKGBUILD template
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Your Name <youremail@domain.com>
pkgname=NAME
pkgver=VERSION
pkgrel=1
epoch=
pkgdesc=""
arch=()
url=""
license=('GPL')
groups=()
depends=()
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=($pkgname-$pkgver.tar.gz
$pkgname-$pkgver.patch)
noextract=()
md5sums=() #generate with 'makepkg -g'
prepare() {
cd "$srcdir/$pkgname-$pkgver"
patch -p1 -i "$srcdir/$pkgname-$pkgver.patch"
}
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr
make
}
check() {
cd "$srcdir/$pkgname-$pkgver"
make -k check
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment