mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] hwdata: New package.
@ 2022-01-07 11:15 Christian Melki
  0 siblings, 0 replies; only message in thread
From: Christian Melki @ 2022-01-07 11:15 UTC (permalink / raw)
  To: ptxdist

Introduce the hwdata package.
It's a maintained set of the classic .ids files provided
by several packages (usbutils, pciutils etc).
So instead of packages having to distribute their own copy,
use hwdata instead.

hwdata will probably be replaced by systemd-hwdb in the long run.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 rules/hwdata.in   | 47 +++++++++++++++++++++++++++
 rules/hwdata.make | 81 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 128 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..17f0d4cfa
--- /dev/null
+++ b/rules/hwdata.make
@@ -0,0 +1,81 @@
+# -*-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 <christian.melki@t2data.com>")
+	@$(call install_fixup, hwdata,DESCRIPTION,missing)
+
+	@$(call install_copy, hwdata, 0, 0, 0755, /usr/share/hwdata)
+
+ifdef PTXCONF_HWDATA_PCI
+	@$(call install_copy, hwdata, 0, 0, 0644, -, /usr/share/hwdata/pci.ids)
+endif
+
+ifdef PTXCONF_HWDATA_USB
+	@$(call install_copy, hwdata, 0, 0, 0644, -, /usr/share/hwdata/usb.ids)
+endif
+
+ifdef PTXCONF_HWDATA_PNP
+	@$(call install_copy, hwdata, 0, 0, 0644, -, /usr/share/hwdata/pnp.ids)
+endif
+
+ifdef PTXCONF_HWDATA_OUI
+	@$(call install_copy, hwdata, 0, 0, 0644, -, /usr/share/hwdata/oui.txt)
+endif
+
+ifdef PTXCONF_HWDATA_IAB
+	@$(call install_copy, hwdata, 0, 0, 0644, -, /usr/share/hwdata/iab.txt)
+endif
+
+	@$(call install_finish, hwdata)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-07 11:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 11:15 [ptxdist] [PATCH] hwdata: New package Christian Melki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox