summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/usbutils/APKBUILD39
-rw-r--r--user/usbutils/hwdata.patch20
2 files changed, 59 insertions, 0 deletions
diff --git a/user/usbutils/APKBUILD b/user/usbutils/APKBUILD
new file mode 100644
index 000000000..69287b8ff
--- /dev/null
+++ b/user/usbutils/APKBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=usbutils
+pkgver=010
+pkgrel=0
+pkgdesc="USB utilities"
+url="http://linux-usb.sourceforge.net/"
+arch="all"
+license="GPL-2.0+ AND GPL-2.0-only"
+subpackages="$pkgname-doc"
+depends="hwdata-usb"
+makedepends="libusb-dev eudev-dev"
+source="https://mirrors.kernel.org/pub/linux/utils/usb/usbutils/$pkgname-$pkgver.tar.xz
+ hwdata.patch
+ "
+
+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="8bc197307bc34b38c406c58c939be32f0b20ce9d3e7c977472fe4c3d47e791765432e381fd8d7393df621bbd4bf159ca24a08b22441770e7ae464e767f99a2e3 usbutils-010.tar.xz
+8e2839ec483797f6f97c0258f8fda0b3a56858787a69fe04ce7c0e8a98fd0f4d6640c68df9294d0e9bc36c57f7c6a44d74882176477ea3ffe44716d5bbb35a82 hwdata.patch"
diff --git a/user/usbutils/hwdata.patch b/user/usbutils/hwdata.patch
new file mode 100644
index 000000000..f7c081fd8
--- /dev/null
+++ b/user/usbutils/hwdata.patch
@@ -0,0 +1,20 @@
+--- a/lsusb.py.in
++++ b/lsusb.py.in
+@@ -96,7 +96,7 @@
+ return True
+
+ def parse_usb_ids():
+- "Parse /usr/share/usb.ids and fill usbvendors, usbproducts, usbclasses"
++ "Parse /usr/share/hwdata/usb.ids and fill usbvendors, usbproducts, usbclasses"
+ id = 0
+ sid = 0
+ mode = 0
+@@ -520,7 +520,7 @@
+ print(" -c use colors")
+ print(" -e display endpoint info")
+ print(" -w display warning if usb.ids is not sorted correctly")
+- print(" -f FILE override filename for /usr/share/usb.ids")
++ print(" -f FILE override filename for /usr/share/hwdata/usb.ids")
+ print("Use lsusb.py -ciu to get a nice overview of your USB devices.")
+ return 2
+