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 \
    --sbindir=/bin \
    --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
"
