# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: goetzc
# Contributor: Jonathan Squirawski <sky@sky-co.de>

pkgname=libeatmydata
pkgver=131
pkgrel=2
pkgdesc='Library and utilities designed to disable fsync and friends.'
arch=('x86_64')
url='https://github.com/stewartsmith/libeatmydata'
license=('GPL3')
depends=('bash')
source=("https://github.com/stewartsmith/libeatmydata/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('70e496693fa43ec3a1fbe4750628b778d12a38c71138be6ab32bdc67c6d548ca')

prepare() {
  cd libeatmydata-$pkgver
  autoreconf -i
}

build() {
  cd libeatmydata-$pkgver
  ./configure --prefix=/usr --libexecdir=/usr/lib/libeatmydata
  make
}

check() {
  cd libeatmydata-$pkgver
  make check || echo "Tests need strace permission to run"
}

package() {
  cd libeatmydata-$pkgver
  make DESTDIR="$pkgdir" install
}
