# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mtools
pkgver=4.0.18
pkgrel=2
pkgdesc="A collection of utilities to access MS-DOS disks from Unix without mounting them"
url="https://www.gnu.org/software/mtools/"
arch="all"
license="GPL"
depends=
makedepends="texinfo"
source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.bz2"
subpackages="$pkgname-doc"

builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$builddir"
	default_prepare
	update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--sysconfdir=/etc/mtools \
		--without-x
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make -j1 install DESTDIR="$pkgdir"
}

sha512sums="3981a4727aa4e2ec5c931201b236f52fcd1c9d55f888cb2fbdc5c4172402e2b229ede9a5005b972ffdad59bcb861e2fcc01404845e521116419079ae78239090  mtools-4.0.18.tar.bz2"
