NAME="mtools"
DESC="A collection of utilities to access MS-DOS disks"
VERSION="4.0.43"
FILES=("https://ftp.gnu.org/gnu/mtools/mtools-$VERSION.tar.bz2")
HASHES=("b70e483688124a653dd333ab127494dab12d413809680a4846dc4ae5c166a0b9938a2ab290e518c1f1a5b18ed96d2c2a29d92d61b16b772a4ab5e495379fe410")
DEPENDS=("libx11" "libxau")
KEEP=("/etc/mtools.conf")

PACKAGE() {
  tar xf $NAME-$VERSION.tar.bz2
  cd $NAME-$VERSION

  sed -e '/^SAMPLE FILE$/s:^:# :' -i mtools.conf
  ./configure --prefix=/usr   \
    --infodir=/usr/share/info \
    --mandir=/usr/share/man   \
    --sysconfdir=/etc
  make && make DESTDIR="$ROOTDIR" install
  install -vDm 644 mtools.conf -t "$ROOTDIR/etc/"

  cd .. && rm -r $NAME-$VERSION
}
