# 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.1
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=('615b27f6c4c9f392715060467b5728aeb1e774256e661e2b84126464e69a5e1140646e2cf9d6e42d6279c6396c1b2204f545023e5be09d02afb1587d62c4399e'
            '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:
