# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=sysbench
pkgver=1.0.17
pkgrel=1
pkgdesc='Scriptable multi-threaded benchmark tool for databases and systems'
url='https://github.com/akopytov/sysbench'
arch=('x86_64')
license=('GPL2')
depends=('luajit' 'mariadb-libs' 'postgresql-libs')
makedepends=('libxslt')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha512sums=('95a6bb7ec9b0fb111bf2844e110b8fb51c006fd68b5bac75c1b80e2ed18e839d6f07f79d55fb5adef67b41d00f67bbf659d129d1cb593d4fd118092b15431815')

build() {
  cd $pkgname-$pkgver

  autoreconf -vi

  ./configure \
  	--prefix=/usr \
  	--with-pgsql \
  	--with-mysql \
  	--with-system-luajit

  make
}

package() {
  cd $pkgname-$pkgver

  make DESTDIR="$pkgdir" install
}

