mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
usbutils: update to 019, switch to meson
Update from 017 to 019. Version 019 dropped autoconf in favour of meson, so switch to include/meson.mk and drop PKG_FIXUP:=autoreconf and the autoconf CONFIGURE_ARGS. The binary lsusb no longer reads usb.ids directly; it now queries the udev hardware database. lsusb.py still searches /usr/share/hwdata/usb.ids for device name resolution. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Alexandru Ardelean
parent
3695f1dae5
commit
1f0bfd80c7
+7
-10
@@ -8,39 +8,36 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=usbutils
|
PKG_NAME:=usbutils
|
||||||
PKG_VERSION:=017
|
PKG_VERSION:=019
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
|
PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
|
||||||
PKG_HASH:=a6a25ffdcf9103e38d7a44732aca17073f4e602b92e4ae55625231a82702e05b
|
PKG_HASH:=659f40c440e31ba865c52c818a33d3ba6a97349e3353f8b1985179cb2aa71ec5
|
||||||
|
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||||
PKG_LICENSE:=GPL-2.0-only
|
PKG_LICENSE:=GPL-2.0-only
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=LICENSES/GPL-2.0-only.txt
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/meson.mk
|
||||||
|
|
||||||
define Package/usbutils
|
define Package/usbutils
|
||||||
SECTION:=utils
|
SECTION:=utils
|
||||||
CATEGORY:=Utilities
|
CATEGORY:=Utilities
|
||||||
DEPENDS:=+libusb-1.0 +libudev +librt +libpthread +usbids
|
DEPENDS:=+libusb-1.0 +libudev +usbids
|
||||||
TITLE:=USB devices listing utilities
|
TITLE:=USB devices listing utilities
|
||||||
URL:=http://www.linux-usb.org/
|
URL:=http://www.linux-usb.org/
|
||||||
ALTERNATIVES:=200:/usr/bin/lsusb:/usr/libexec/lsusb-usbutils
|
ALTERNATIVES:=200:/usr/bin/lsusb:/usr/libexec/lsusb-usbutils
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS+= \
|
|
||||||
--datadir=/usr/share/hwdata
|
|
||||||
|
|
||||||
define Package/usbutils/install
|
define Package/usbutils/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/libexec
|
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/libexec
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/libexec/lsusb-usbutils
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/libexec/lsusb-usbutils
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/usbreset $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt-build/usbreset $(1)/usr/bin/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,usbutils))
|
$(eval $(call BuildPackage,usbutils))
|
||||||
|
|||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ "$1" = "usbutils" ] || exit 0
|
||||||
|
|
||||||
|
# Binary accessible via alternatives
|
||||||
|
test -x /usr/libexec/lsusb-usbutils
|
||||||
|
|
||||||
|
# lsusb tree view runs without crashing (may be empty in test env)
|
||||||
|
lsusb -t 2>/dev/null; [ $? -ne 127 ]
|
||||||
|
|
||||||
|
# lsusb device listing runs without crashing
|
||||||
|
lsusb 2>/dev/null; [ $? -ne 127 ]
|
||||||
|
|
||||||
|
# usbreset is installed and shows usage when invoked without arguments
|
||||||
|
usbreset 2>&1 | grep -q "Usage:"
|
||||||
Reference in New Issue
Block a user