hwdata: add package
authorRosen Penev <rosenp@gmail.com>
Wed, 30 Dec 2020 02:58:27 +0000 (18:58 -0800)
committerRosen Penev <rosenp@gmail.com>
Wed, 30 Dec 2020 05:03:54 +0000 (21:03 -0800)
Several packages use files from this project. Added package to
consolidate. Packages will be adjusted to depend on this.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/hwdata/Makefile [new file with mode: 0644]

diff --git a/utils/hwdata/Makefile b/utils/hwdata/Makefile
new file mode 100644 (file)
index 0000000..1524fae
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hwdata
+PKG_VERSION:=0.342
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/vcrhonek/hwdata/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=f1e79131c870dce4a3b4b75edeefc5c9aef416d488a131c66cb6893be743be63
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=GPL-2.0-or-later  XFree86-1.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/pciids
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=USB ID list
+  URL:=https://github.com/vcrhonek/hwdata
+endef
+
+define Package/usbids
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=PCI ID list
+  URL:=https://github.com/vcrhonek/hwdata
+endef
+
+define Package/pciids/install
+       $(INSTALL_DIR) $(1)/usr/share/hwdata
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/hwdata/pci.ids $(1)/usr/share/hwdata
+endef
+
+define Package/usbids/install
+       $(INSTALL_DIR) $(1)/usr/share/hwdata
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/hwdata/usb.ids $(1)/usr/share/hwdata
+endef
+
+$(eval $(call BuildPackage,pciids))
+$(eval $(call BuildPackage,usbids))