# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'usbutils'
setvar pkgver = '008'
setvar pkgrel = '2'
setvar pkgdesc = ""USB Device Utilities""
setvar url = ""http://linux-usb.sourceforge.net/""
setvar arch = ""all""
setvar license = ""GPL2+""
setvar subpackages = ""$pkgname-doc""
setvar depends = ""hwdata-usb""
setvar makedepends = ""libusb-dev eudev-dev""
setvar source = ""http://www.kernel.org/pub/linux/utils/usb/usbutils/$pkgname-$pkgver.tar.xz
	usbutils-006-hwdata.patch
	""

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

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

proc check {
	cd $builddir
	make check
}

proc package {
	cd $builddir
	make DESTDIR="$pkgdir" install
	mkdir -p "$pkgdir"/usr/lib/
	mv "$pkgdir"/usr/share/pkgconfig \
		"$pkgdir"/usr/lib/
}

setvar sha512sums = ""ab1ad36467ff79ff5ab0b924620001612cae44def58c05ade01a4e58d8a4d48df61c09faba49a20497b7d6314045bbaf137b51a9f4e6b65ed0ea3bb339bf1c45  usbutils-008.tar.xz
681894f85f4abe1593ca00cfa5be7d57e44d4aa90e69f94f6fc621d265c6d6c492622710f3bed3c75ee5459a634848516ad0ef1e3830075c5a55b8172c53af1e  usbutils-006-hwdata.patch""