# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=usbutils
pkgver=009
pkgrel=0
pkgdesc="USB Device Utilities"
url="http://linux-usb.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later"
subpackages="$pkgname-doc"
depends="hwdata-usb"
makedepends="libusb-dev eudev-dev"
source="http://www.kernel.org/pub/linux/utils/usb/usbutils/$pkgname-$pkgver.tar.xz
	hwdata.patch
	"

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

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share/hwdata \
		--disable-usbids \
		--disable-zlib
	make
}

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

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

sha512sums="e5936a42615690c13e618655fc5eb4f414d9a84f85b860eaeb3bcf737258e05d299b09d1c5388d50c718626036ec8cac5d670ad567ceadfaab85f401f0744a8a  usbutils-009.tar.xz
951609353bdd2a2a6ac52028a1071698756f806f8bfd785fcae9d949e27e3f932a6fdd484859cba1258f617b553f3c72f7bbeaece3c2e7cdbc4e1c630ec8ce92  hwdata.patch"
