# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Phil Pirozhkov <pirjsuka@gmail.com>

pkgname=mtd-utils
pkgver=2.1.2
pkgrel=1
pkgdesc='Utilities for dealing with MTD devices'
url='http://www.linux-mtd.infradead.org/'
arch=('x86_64')
license=('GPL2')
depends=('lzo' 'util-linux' 'zstd' 'zlib')
makedepends=('cmocka')
source=(ftp://ftp.infradead.org/pub/mtd-utils/${pkgname}-${pkgver}.tar.bz2{,.asc})
sha512sums=('ff3bf018d02b7fb2d545c49823d69a1726e42c39e3e3a956c1c4dc2ac7f18142b1dab66ad4c167b2652e33bc2a0fa277a6803e7fd04d7fd8b75d70a047ce177d'
            'SKIP')
validpgpkeys=('13063F723C9E584AEACD5B9BBCE5DC3C741A02D1')

prepare() {
  cd ${pkgname}-${pkgver}
  autoreconf -fiv
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --enable-unit-tests \
    --enable-tests
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check
}

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

# vim: ts=2 sw=2 et:
