APP=mtd-utils
VERSION=2.1.1
NANDVERSION=1.5.2
BUILD=1sml
HOMEPAGE="http://www.linux-mtd.infradead.org/"
DOWNLOAD=""
DESC="A collection of utiltiies for dealing with memory technology and NAND devices"
REQUIRES="lzo util-linux "

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION 
  fixbuilddirpermissions

  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --without-zstd

  make
  make install DESTDIR=$PKG 

  cp COPYING $PKGDOCS/

  tar xf $SRCDIR/nand-utils-$NANDVERSION.tar.?z*
  cd nand-utils-$NANDVERSION

  make 
  make install SBINDIR="/bin" MANDIR="/share/man" DESTDIR=$PKG

  cp COPYING $PKGDOCS/COPYING.nand-utils

  mkfinalpkg
}
  
SHA512SUMS="
615b27f6c4c9f392715060467b5728aeb1e774256e661e2b84126464e69a5e1140646e2cf9d6e42d6279c6396c1b2204f545023e5be09d02afb1587d62c4399e  mtd-utils-2.1.1.tar.bz2
d8b28e9efbc8e3cae19db109491ec88a9b6fc3696b4aedd3b16a0352e9c640c711cf245995f3ffad1d75799b4f438ac23d276022a94948fa632c351f1d2b5af9  nand-utils-1.5.2.tar.gz
"
