[packages/usbutils] use system hwdata package

glen glen at pld-linux.org
Tue Jan 22 17:35:17 CET 2013


commit 0ccdd7689199bc05e87e867ec19b3c42c4e7266d
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Jan 20 00:09:25 2013 +0200

    use system hwdata package
    
    usbutils-ids.patch, last update in 2003, if really needed apply in
    hwdata pacakge

 usbutils-ids.patch | 12 ------------
 usbutils.spec      | 22 ++++++++++++++++------
 2 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/usbutils.spec b/usbutils.spec
index d80d90f..e4ddef3 100644
--- a/usbutils.spec
+++ b/usbutils.spec
@@ -3,22 +3,24 @@ Summary(pl.UTF-8):	Linuksowe narzędzia do USB
 Summary(pt_BR.UTF-8):	Utilitários Linux USB
 Name:		usbutils
 Version:	006
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Applications/System
 Source0:	http://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.bz2
 # Source0-md5:	9d13954981f4adbe3fd02aae6dbfafa9
-Patch0:		%{name}-ids.patch
+Patch0:		hwdata.patch
 URL:		http://www.linux-usb.org/
 BuildRequires:	autoconf >= 2.60
 BuildRequires:	automake >= 1:1.9
+BuildRequires:	hwdata >= 0.243
 BuildRequires:	libtool
 BuildRequires:	libusb-devel >= 1.0.0
 BuildRequires:	pkgconfig
 BuildRequires:	zlib-devel
+Requires:	hwdata >= 0.243
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_datadir	/etc
+%define		hwdatadir	/usr/share/hwdata
 
 %description
 usbutils contains a utility for inspecting devices connected to the
@@ -39,6 +41,13 @@ conectados a um barramento USB.
 %setup -q
 %patch0 -p1
 
+# paranoid check whether usb.ids in system isn't too old
+if [ usb.ids -nt %{hwdatadir}/usb.ids ]; then
+	: usb.ids needs to be updated
+	exit 1
+fi
+%{__rm} usb.ids
+
 %build
 %{__libtoolize}
 %{__aclocal}
@@ -46,29 +55,30 @@ conectados a um barramento USB.
 %{__autoheader}
 %{__automake}
 %configure \
+	--disable-usbids \
 	--disable-silent-rules
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} install \
 	pkgconfigdir=%{_pkgconfigdir} \
+	INSTALL="install -p" \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%{__rm} $RPM_BUILD_ROOT/usr/bin/lsusb.py
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README
-%attr(755,root,root) %{_sbindir}/update-usbids.sh
 %attr(755,root,root) %{_bindir}/lsusb
 %attr(755,root,root) %{_bindir}/usb-devices
 %attr(755,root,root) %{_bindir}/usbhid-dump
 %{_mandir}/man1/usb-devices.1*
 %{_mandir}/man8/lsusb.8*
 %{_mandir}/man8/usbhid-dump.8*
-%{_datadir}/usb.ids
 # there is no devel package for now and the dir is part of filesystem
 %{_pkgconfigdir}/usbutils.pc
diff --git a/usbutils-ids.patch b/usbutils-ids.patch
deleted file mode 100644
index 78bad50..0000000
--- a/usbutils-ids.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- usbutils-0.11/usb.ids.orig	Fri Feb  7 11:10:11 2003
-+++ usbutils-0.11/usb.ids	Fri Feb  7 11:34:36 2003
-@@ -2904,6 +2906,9 @@
- 3538  Power Quotient International Co., Ltd
- 	0001  Travel Flash
- 3636  InVibro
-+3823  eGalax
-+	0001  eGalax Touchkit
-+	0002  eGalax Touchkit
- 3838  WEM
- 	0001  5-in-1 Card Reader
- 3923  National Instruments Corp.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/usbutils.git/commitdiff/0ccdd7689199bc05e87e867ec19b3c42c4e7266d



More information about the pld-cvs-commit mailing list