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

pkgname=phoronix-test-suite
pkgver=4.8.3
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=('300508168b8309218b7a66110d904c3d')

package() {
  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/
}
