summaryrefslogtreecommitdiffstats
path: root/PKGBUILD.proto
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-12-15 15:06:43 +0100
committerDan McGee <dan@archlinux.org>2010-12-30 02:28:00 +0100
commit0c29eb431a26467fc5ec14742cfcdc7ce3558334 (patch)
tree282a6284582e2b0dd21656cd990bddd5f6e993b0 /PKGBUILD.proto
parentd22777146446ecaf8b4b9c0afd593d23c5c9766e (diff)
downloadpacman-0c29eb431a26467fc5ec14742cfcdc7ce3558334.tar.gz
pacman-0c29eb431a26467fc5ec14742cfcdc7ce3558334.tar.xz
makepkg: Add check() function for running test suites
A PKGBUILD can have an option check() function for running test suites between the build() and package() stages. This function is run by default but can be disabled globally in with "!check" in BUILDENV in makepkg.conf. This setting can be controlled on an individual package basis using makepkg's --check and --nocheck flags. Addition dependencies needed for running the test suite can be specified in the checkdepends array and are only checked when running the check() function. Original-work-by: Jeff C <jeff@kcaccess.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'PKGBUILD.proto')
-rw-r--r--PKGBUILD.proto8
1 files changed, 6 insertions, 2 deletions
diff --git a/PKGBUILD.proto b/PKGBUILD.proto
index 71dbc14d..98172d8d 100644
--- a/PKGBUILD.proto
+++ b/PKGBUILD.proto
@@ -15,6 +15,7 @@ license=('GPL')
groups=()
depends=()
makedepends=()
+checkdepends=()
optdepends=()
provides=()
conflicts=()
@@ -29,14 +30,17 @@ md5sums=() #generate with 'makepkg -g'
build() {
cd "$srcdir/$pkgname-$pkgver"
-
./configure --prefix=/usr
make
}
-package() {
+check() {
cd "$srcdir/$pkgname-$pkgver"
+ make -k check
+}
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
}