# $Id: PKGBUILD 229004 2015-01-14 21:35:43Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: kfgz <kfgz at interia dot pl>
# Contributor: pootzko <pootzko at gmail dot com>

pkgname=haveged
pkgver=1.9.1
pkgrel=2
pkgdesc='Entropy harvesting daemon using CPU timings'
arch=('i686' 'x86_64')
url='http://www.issihosts.com/haveged'
license=('GPL')
depends=('glibc')
source=($url/$pkgname-$pkgver.tar.gz
        service)
md5sums=('015ff58cd10607db0e0de60aeca2f5f8'
         '5b1afbd842300ff8dba0dfccef76514b')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/bin
  make
}

package() {
  make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
  install -Dm644 service "$pkgdir"/usr/lib/systemd/system/haveged.service
}
