config BR2_PACKAGE_HWDATA
bool "hwdata"
help
- Various hardware identification and configuration data,
- such as the pci.ids database, or the XFree86/xorg Cards
- database.
+ Various hardware identification and configuration data
+
+ - Individual Address Block (IAB) and Organizationally Unique
+ Identifier (OUI) databases, from IEEE Registration Authority
+ - PCI ID database
+ - PNP ID database (from Microsoft)
+ - USB ID database
+
+ https://github.com/vcrhonek/hwdata
+
+if BR2_PACKAGE_HWDATA
+
+config BR2_PACKAGE_HWDATA_IAB_OUI_TXT
+ bool "install iab.txt and oui.txt"
+ help
+ Install iab.txt and oui.txt
+
+config BR2_PACKAGE_HWDATA_PCI_IDS
+ bool "install pci.ids"
+ default y
+ help
+ Install pci.ids
+
+config BR2_PACKAGE_HWDATA_PNP_IDS
+ bool "install pnp.ids"
+ help
+ Install pnp.ids
+
+config BR2_PACKAGE_HWDATA_USB_IDS
+ bool "install usb.ids"
+ default y
+ help
+ Install usb.ids
+
+endif
-# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/hwdata/hwdata_0.267-1.dsc
-sha256 d77f2b3f3d6e278be669141ffa5dac01b64cab02f7b2c744bbabc500a45263f4 hwdata_0.267.orig.tar.gz
-sha256 055d2f168de9333562a04f6a230c43dc19c4975882935d8b2f0ab17f64f57275 hwdata_0.267-1.diff.gz
+# Locally calculated
+sha256 986d919c20a0c7f8b669a63830f6d2f4cb5c4cddcfc944c5e2ae05c2e9e5ec9f hwdata-v0.308.tar.gz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
+sha256 21d0406f93e884a050426ebc21931839a45d56bfcbcbfdda7686d583f36f107f LICENSE
#
################################################################################
-HWDATA_VERSION = 0.267
-HWDATA_SOURCE = hwdata_$(HWDATA_VERSION).orig.tar.gz
-HWDATA_PATCH = hwdata_$(HWDATA_VERSION)-1.diff.gz
-HWDATA_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/hwdata
-HWDATA_LICENSE = GPL-2.0+ or XFree86 1.0 license
+HWDATA_VERSION = v0.308
+HWDATA_SITE = $(call github,vcrhonek,hwdata,$(HWDATA_VERSION))
+HWDATA_LICENSE = GPL-2.0+, BSD-3-Clause, XFree86 1.0
HWDATA_LICENSE_FILES = COPYING LICENSE
+HWDATA_FILES = \
+ $(if $(BR2_PACKAGE_HWDATA_IAB_OUI_TXT),iab.txt oui.txt) \
+ $(if $(BR2_PACKAGE_HWDATA_PCI_IDS),pci.ids) \
+ $(if $(BR2_PACKAGE_HWDATA_PNP_IDS),pnp.ids) \
+ $(if $(BR2_PACKAGE_HWDATA_USB_IDS),usb.ids)
+
+ifneq ($(strip $(HWDATA_FILES)),)
define HWDATA_INSTALL_TARGET_CMDS
- $(INSTALL) -D -m 644 $(@D)/pci.ids $(TARGET_DIR)/usr/share/hwdata/pci.ids
- $(INSTALL) -D -m 644 $(@D)/usb.ids $(TARGET_DIR)/usr/share/hwdata/usb.ids
+ $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/share/hwdata
+ $(INSTALL) -m 644 -t $(TARGET_DIR)/usr/share/hwdata \
+ $(addprefix $(@D)/,$(HWDATA_FILES))
endef
+endif
$(eval $(generic-package))