[packages/lshw] use hwdata package for pci.ids/usb.ids (uncompressed)
glen
glen at pld-linux.org
Wed Jan 23 22:52:06 CET 2013
commit 3fa31a4e7986852e1ffc8558440da9a5656ae9a4
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Jan 23 23:51:00 2013 +0200
use hwdata package for pci.ids/usb.ids (uncompressed)
hwdata.patch | 22 ++++++++++++++++++++++
lshw.spec | 10 +++++++---
2 files changed, 29 insertions(+), 3 deletions(-)
---
diff --git a/lshw.spec b/lshw.spec
index cf89a13..07ec2fe 100644
--- a/lshw.spec
+++ b/lshw.spec
@@ -1,4 +1,6 @@
-#
+# TODO
+# - support compressed pci.ids.gz/usb.ids.gz
+
# Conditional build:
%bcond_without gui # build without GTK gui
%bcond_without sqlite # build without sqlite support (saving hardware tree to sqlite db)
@@ -7,19 +9,20 @@ Summary: Hardware Lister
Summary(pl.UTF-8): Narzędzie wypisujące sprzęt
Name: lshw
Version: B.02.16
-Release: 1
+Release: 2
License: GPL v2
Group: Applications/System
Source0: http://ezix.org/software/files/%{name}-%{version}.tar.gz
# Source0-md5: 67479167add605e8f001097c30e96d0d
Patch0: %{name}-gcc.patch
Patch1: sanity.patch
+Patch2: hwdata.patch
URL: http://ezix.org/project/wiki/HardwareLiSter
%{?with_gui:BuildRequires: gtk+2-devel >= 1:2.0}
BuildRequires: libstdc++-devel
BuildRequires: pkgconfig
%{?with_sqlite:BuildRequires: sqlite3-devel}
-Requires: pciutils
+Requires: hwdata >= 0.243-2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -66,6 +69,7 @@ lshw w wersji GTK+.
%setup -q
%patch0 -p0
%patch1 -p1
+%patch2 -p1
%build
%{__make} -C src \
diff --git a/hwdata.patch b/hwdata.patch
new file mode 100644
index 0000000..b208f77
--- /dev/null
+++ b/hwdata.patch
@@ -0,0 +1,22 @@
+--- lshw-B.02.16.orig/src/core/pci.cc
++++ lshw-B.02.16/src/core/pci.cc
+@@ -17,7 +17,7 @@ __ID("@(#) $Id: pci.cc 2433 2012-01-10 2
+
+ #define PROC_BUS_PCI "/proc/bus/pci"
+ #define SYS_BUS_PCI "/sys/bus/pci"
+-#define PCIID_PATH DATADIR"/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids"
++#define PCIID_PATH "/lib/hwdata/pci.ids"
+
+ #define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
+ #define PCI_VENDOR_ID 0x00 /* 16 bits */
+--- lshw-B.02.16.orig/src/core/usb.cc
++++ lshw-B.02.16/src/core/usb.cc
+@@ -27,7 +27,7 @@
+
+ #define PROCBUSUSBDEVICES "/proc/bus/usb/devices"
+ #define SYSBUSUSBDEVICES "/sys/bus/usb/devices"
+-#define USBID_PATH DATADIR"/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids"
++#define USBID_PATH "/lib/hwdata/usb.ids"
+
+ #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
+ #define USB_CLASS_AUDIO 1
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lshw.git/commitdiff/3fa31a4e7986852e1ffc8558440da9a5656ae9a4
More information about the pld-cvs-commit
mailing list