# $Id: PKGBUILD 74277 2012-07-23 10:50:59Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andreas Schönfelder <passtschu at freenet dot de>

pkgname=phoronix-test-suite
pkgver=4.0.0
pkgrel=1
pkgdesc="The most comprehensive testing and benchmarking platform available for Linux"
arch=('any')
license=('GPL3')
url="http://www.phoronix-test-suite.com/"
depends=('php')
optdepends=('php-gtk'
	    'php-gd'
	    'php-curl')
install=${pkgname}.install
source=(http://www.phoronix.net/downloads/phoronix-test-suite/releases/phoronix-test-suite-$pkgver.tar.gz)
md5sums=('b5785a8899dc4a0e384bdb8389592a6d')

build() {
  cd $srcdir/phoronix-test-suite
  sed -i 's#-packages.sh#-packages.sh --asdeps#' pts-core/objects/client/pts_external_dependencies.php
  install -d $pkgdir/usr/bin $pkgdir/usr/share/phoronix-test-suite
  sed -e "s/^export PTS_DIR=.*/export PTS_DIR=\/usr\/share\/phoronix-test-suite/g" -i phoronix-test-suite
  install -m755 phoronix-test-suite $pkgdir/usr/bin/
  rm -f $pkgdir/usr/share/phoronix-test-suite/pts/etc/scripts/package-build-*
  cp -r pts-core/ $pkgdir/usr/share/phoronix-test-suite/
}
