Introduce the hwdata package. It's a maintained set of the classic .ids files provided by several packages (usbutils, pciutils etc). It uses /usr/share/ for now, as a smaller changeset for the introduction. After this has settled, one can move packages collectively to /usr/share/hwdata.
This means: * Packages need to stop providing their own set of these files. * Packages now select hwdata as a dependency. * Packages need to stop updating these files. It's done by updating the hwdata package. * Packages can't assume that other packages can read compressed variants of the text database. hwdata will probably be replaced by systemd-hwdb in the long run. Signed-off-by: Christian Melki <[email protected]> --- rules/hwdata.in | 47 ++++++++++++++++++++++++++ rules/hwdata.make | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 rules/hwdata.in create mode 100644 rules/hwdata.make diff --git a/rules/hwdata.in b/rules/hwdata.in new file mode 100644 index 000000000..c4e624b7f --- /dev/null +++ b/rules/hwdata.in @@ -0,0 +1,47 @@ +## SECTION=shell_and_console + +menuconfig HWDATA + tristate + prompt "hwdata " + help + Hwdata package. + This package contains identity files for pci and usb etc. + Various packages that have not been ported to systemd's binary + hwdb may use this instead. + +if HWDATA + +config HWDATA_PCI + bool + prompt "hwdata PCI" + help + The hwdata PCI (Vendor and product id) data set. + +config HWDATA_USB + bool + prompt "hwdata USB" + help + The hwdata USB (Vendor and product id) data set. + +config HWDATA_PNP + bool + prompt "hwdata PNP" + help + The hwdata PNP (Vendor names and vendor acronyms) + data set. + +config HWDATA_OUI + bool + prompt "hwdata OUI" + help + The hwdata OUI (IEEE Organizationally Unique Identifier) + data set. + +config HWDATA_IAB + bool + prompt "hwdata IAB" + help + The hwdata IAB (IEEE Individual Address Block) + data set. + +endif diff --git a/rules/hwdata.make b/rules/hwdata.make new file mode 100644 index 000000000..5d09b6c81 --- /dev/null +++ b/rules/hwdata.make @@ -0,0 +1,84 @@ +# -*-makefile-*- +# +# Copyright (C) 2021 by Christian Melki +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_HWDATA) += hwdata + +# +# Paths and names +# +HWDATA_VERSION := 0.355 +HWDATA_MD5 := ee30c73571b9392a7b2d77619a6842a5 +HWDATA := hwdata-$(HWDATA_VERSION) +HWDATA_SUFFIX := tar.gz +HWDATA_URL := https://github.com/vcrhonek/hwdata/archive/refs/tags/v$(HWDATA_VERSION).$(HWDATA_SUFFIX) +HWDATA_SOURCE := $(SRCDIR)/$(HWDATA).$(HWDATA_SUFFIX) +HWDATA_DIR := $(BUILDDIR)/$(HWDATA) +HWDATA_LICENSE := GPL-2.0-or-later OR XFree86-1.0 +HWDATA_LICENSE_FILES := \ + file://LICENSE;md5=1556547711e8246992b999edd9445a57 \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +HWDATA_PATH := PATH=$(CROSS_PATH) +HWDATA_ENV := $(CROSS_ENV) + +# Package is not really using autoconf, so skip normal cross declaration. +# Only text files are processed. Just prefix setting here. +HWDATA_CONF_TOOL := autoconf +HWDATA_CONF_OPT := \ + --prefix=/usr + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/hwdata.targetinstall: + @$(call targetinfo) + + @$(call install_init, hwdata) + @$(call install_fixup, hwdata,PRIORITY,optional) + @$(call install_fixup, hwdata,SECTION,base) + @$(call install_fixup, hwdata,AUTHOR,"Christian Melki <[email protected]>") + @$(call install_fixup, hwdata,DESCRIPTION,missing) + +ifdef PTXCONF_HWDATA_PCI + @$(call install_copy, hwdata, 0, 0, 0644, \ + $(HWDATA_PKGDIR)/usr/share/hwdata/pci.ids, /usr/share/pci.ids) +endif + +ifdef PTXCONF_HWDATA_USB + @$(call install_copy, hwdata, 0, 0, 0644, \ + $(HWDATA_PKGDIR)/usr/share/hwdata/usb.ids, /usr/share/usb.ids) +endif + +ifdef PTXCONF_HWDATA_PNP + @$(call install_copy, hwdata, 0, 0, 0644, \ + $(HWDATA_PKGDIR)/usr/share/hwdata/pnp.ids, /usr/share/pnp.ids) +endif + +ifdef PTXCONF_HWDATA_OUI + @$(call install_copy, hwdata, 0, 0, 0644, \ + $(HWDATA_PKGDIR)/usr/share/hwdata/oui.txt, /usr/share/oui.txt) +endif + +ifdef PTXCONF_HWDATA_IAB + @$(call install_copy, hwdata, 0, 0, 0644, \ + $(HWDATA_PKGDIR)/usr/share/hwdata/iab.txt, /usr/share/iab.txt) +endif + + @$(call install_finish, hwdata) + + @$(call touch) + +# vim: syntax=make -- 2.30.2 _______________________________________________ ptxdist mailing list [email protected] To unsubscribe, send a mail with subject "unsubscribe" to [email protected]
