[arch-commits] Commit in hwids/trunk (PKGBUILD)

Tobias Powalowski tpowa at archlinux.org
Tue Aug 18 07:30:31 UTC 2020


    Date: Tuesday, August 18, 2020 @ 07:30:31
  Author: tpowa
Revision: 394359

upgpkg: hwids 20200813-2: fix #48446, #48445, #52397, add pnp.ids

Modified:
  hwids/trunk/PKGBUILD

----------+
 PKGBUILD |   22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-08-18 06:50:30 UTC (rev 394358)
+++ PKGBUILD	2020-08-18 07:30:31 UTC (rev 394359)
@@ -1,13 +1,27 @@
 # Maintainer: Tom Gundersen <teg at jklm.no>
 pkgname=hwids
 pkgver=20200813
-pkgrel=1
+pkgrel=2
 pkgdesc="hardware identification databases"
-makedepends=('git')
+makedepends=('git' 'unoconv')
 url=https://github.com/gentoo/hwids
 license=('GPL2')
 arch=('any')
-source=("git+https://github.com/gentoo/hwids.git#tag=${pkgname}-${pkgver}")
+source=("git+https://github.com/gentoo/hwids.git#tag=${pkgname}-${pkgver}"
+	http://download.microsoft.com/download/7/E/7/7E7662CF-CBEA-470B-A97E-CE7CE0D98DC2/ISA_PNPID_List.xlsx)
+md5sums=('SKIP'
+         'd333b8c34e8fda9456d60e8ab999e94d')
+prepare() {
+  # from https://github.com/vcrhonek/hwdata/blob/master/Makefile
+  unoconv --stdout -f csv ${srcdir}/ISA_PNPID_List.xlsx | \
+	    tr ' ' ' ' | \
+	    sed -n \
+		-e 's/^\s*"\s*\(.*\)\s*"/\1/' \
+		-e 's/\s\{2,\}/ /g' \
+		-e 's/\s*(used as 2nd pnpid)\s*//' \
+		-e 's:^\(.*\)\s*,\s*\([a-zA-Z@]\{3\}\)\s*,\s*\([0-9]\+/[0-9]\+/[0-9]\+\):\2\t\1:p' | \
+	    sed 's/\s*$$//' | sort -u >${srcdir}/pnp.ids
+}
 
 package() {
   cd hwids
@@ -15,5 +29,5 @@
   for ids in pci.ids usb.ids; do
     install -Dm644 "$ids" "${pkgdir}/usr/share/hwdata/${ids}"
   done
+  install -Dm644 "${srcdir}/pnp.ids" ${pkgdir}/usr/share/hwdata/pnp.ids 
 }
-md5sums=('SKIP')



More information about the arch-commits mailing list