summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1e76e56c97ffc9eb01ea43b1de82e67202976092 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Maintainer: James P. Harvey <jamespharvey20 at gmail dot com>

pkgname=sysbench-git
_pkgname=sysbench
pkgver=1.1.0.r1193.b04e5fd
pkgrel=2
pkgdesc='Multi-threaded benchmark for evaluating OS parameters for database-loads (git)'
arch=('x86_64' 'i686')
license=('GPL2')
url='https://github.com/akopytov/sysbench'
depends=('libmariadbclient' 'postgresql-libs')
makedepends=('git')
source=('git+https://github.com/akopytov/sysbench')
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_pkgname}"
  echo $( cat configure.ac | grep AC_INIT | sed 's|.*sysbench],\[||; s|].*||' ).r$( git rev-list --count HEAD ).$( git rev-parse --short HEAD )
}

build() {
  cd "${srcdir}/${_pkgname}"
  ./autogen.sh
  ./configure --prefix=/usr --with-pgsql
  make
}

package() {
  cd "${srcdir}/${_pkgname}"
  make DESTDIR="${pkgdir}" install
  install -Dm644 README.md "${pkgdir}/usr/share/${_pkgname}/README.md"
}