# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="mtx"
pkgver=1.3.12
pkgrel=2
pkgdesc="SCSI Media Changer and Backup Device Control"
url="http://mtx.opensource-sw.net/"
arch="all"
license="GPL-2.0"
depends=""
makedepends=""
install=""
subpackages=""
source="http://downloads.sourceforge.net/mtx/$pkgname-$pkgver.tar.gz"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make prefix="$pkgdir" install
}

sha512sums="d54c360608a2c25bd4d31af3e659de0557ed355fbe45d2dbf1341cfc7e468515eb07eb89200b77ee1fe2618139295ba3c3f4340cc43a7c506ced26aab2652028  mtx-1.3.12.tar.gz"
