# $Id: PKGBUILD 108771 2014-04-03 10:22:34Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andreas Schönfelder <passtschu at freenet dot de>

pkgname=phoronix-test-suite
pkgver=5.0.1
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')
install=${pkgname}.install
source=(http://www.phoronix.net/downloads/phoronix-test-suite/releases/phoronix-test-suite-$pkgver.tar.gz)
md5sums=('857fe63d71f7e464709d121591ed0041')

package() {
  cd $srcdir/phoronix-test-suite
  sed -i 's#-packages.sh#-packages.sh --asdeps#' pts-core/objects/client/pts_external_dependencies.php
  install -dm755 $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 -Dm755 phoronix-test-suite $pkgdir/usr/bin/phoronix-test-suite
  rm -f $pkgdir/usr/share/phoronix-test-suite/pts/etc/scripts/package-build-*
  cp -r pts-core/ $pkgdir/usr/share/phoronix-test-suite/
}
