main/libusb: modernise, add check

This commit is contained in:
A. Wilcox 2018-02-11 00:00:56 -06:00 committed by William Pitcock
parent 145f8fbe4b
commit 1ccbed2830

View File

@ -2,7 +2,7 @@
pkgname=libusb
pkgver=1.0.21
_ver=${pkgver/_/-}
pkgrel=0
pkgrel=1
pkgdesc="Library to enable user space application programs to communicate with USB devices"
url="http://libusb.info/"
arch="all"
@ -13,32 +13,26 @@ makedepends="linux-headers"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
"
_builddir="$srcdir"/$pkgname-$_ver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
builddir="$srcdir"/$pkgname-$_ver
build() {
cd "$_builddir"
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--disable-udev \
|| return 1
make -j1 || return 1
--disable-udev
make -j1
}
check() {
cd "$builddir"
make check
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
cd "$builddir"
make DESTDIR="$pkgdir" install
}
md5sums="1da9ea3c27b3858fa85c5f4466003e44 libusb-1.0.21.tar.bz2"
sha256sums="7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b libusb-1.0.21.tar.bz2"
sha512sums="015ca07bdb559aa40af5db1302ab0b1c8a30d593699fe2f3c9f45162673dc7b608cecc58d60fde8f3bde2a68370794a045e8efa48fc55402eece11261e525762 libusb-1.0.21.tar.bz2"