File usbutils.spec of Package usbutils

#
# spec file for package usbutils (Version 0.73)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           usbutils
%if %suse_version > 1020
BuildRequires:  libusb-devel
%else
BuildRequires:  libusb
%endif
Url:            http://sourceforge.net/projects/linux-usb/
Version:        0.73
Release:        38
Provides:       usb
License:        GPL v2 or later
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Tools and libraries for USB devices
Group:          Hardware/Other
Source0:        usbutils-%{version}.tar.bz2
Source1:        http://www.linux-usb.org/usb.ids
Patch0:         usbutils.lsusb-t.patch
Patch2:         usbutils.lsusb-s.patch
Patch3:         usbutils.manpage.patch
Patch42:        usbutils.libusb0-1.patch

%description
This package contains a utility for inspecting devices connected to USB
ports.

It requires kernel version 2.3.99-pre7 or newer, or the USB backport
which was introduced in 2.2.18 (supporting the /proc/bus/usb
interface).



Authors:
--------
    Georg Acher <acher at in dot tum dot de>
    Detlef Fliegl <fliegl at lrz dot de>
    Thomas Sailer <t.sailer at alumni dot ethz dot ch>
    Roman Weissgaerber <weissg at vienna dot at>

%prep
%setup -q
%patch0 -p1
%patch2 -p1
%patch3 -p1
%patch42 -p1
cp -avL %{SOURCE1} .
exit 0

%build
autoreconf -fi
#
%configure
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -name "*usbmodules*" | xargs rm -fv
mkdir $RPM_BUILD_ROOT%{_prefix}/bin
ln -sv ../sbin/lsusb $RPM_BUILD_ROOT%{_prefix}/bin/lsusb

%files
%defattr(0644, root, root, 0755)
%attr(0644, root, root) %{_mandir}/man8/*
%attr(0755, root, root) %{_prefix}/bin/*
%attr(0755, root, root) %{_prefix}/sbin/*
%config %{_datadir}/usb.ids*
%doc AUTHORS ChangeLog

%changelog
* Mon Nov 24 2008 olh@suse.de
- update usb.ids to 2008/09/21 status
* Fri Oct 24 2008 olh@suse.de
- use built-in libusb-0.1.2 until lsusb uses libusb1,
  libusb-compat is not compatible enough (bnc#435799)
* Thu Oct 23 2008 olh@suse.de
- update usb.ids to 2008/08/29 status
* Tue May 27 2008 olh@suse.de
- update usb.ids to 2008/05/12 status
* Sat Apr 05 2008 bwalle@suse.de
- update usbutils to 0.73
  o Stop hiding unrecognized/misplaced class specific descriptors.
  Don't require compressed format for usb.ids files; when an
  uncompressed one is there (probably installed by hand), prefer
  it.
  o Fix the offsets for the video class descriptors.
  o use correct endpoint maxpacket mask
  o bugfix GUID printing; byteorder matches rfc 4122
  o handle another cdc descriptor type; endianness fix for config
  descriptor length and endpoint maxpacket
- update usb.ids to 2008/04/05 status
* Wed Mar 19 2008 olh@suse.de
- update usb.ids to 2008/03/11 status
  lsusb.c: fix minor layout glitch
* Tue Nov 27 2007 olh@suse.de
- update usb.ids to 2007/11/27 status
  lsusb.c: Stop hiding unrecognized/misplaced class specific
  descriptors.  Don't require compressed format for usb.ids
  files; when an uncompressed one is there (probably installed
  by hand), prefer it.
  lsusb.c: Fix the offsets for the video class descriptors.
  lsusb.c: use correct endpoint maxpacket mask
* Mon Nov 26 2007 olh@suse.de
- update usb.ids to 2007/11/19 status
  remove references to /proc from lsusb.8 (343938)
* Thu Jun 21 2007 olh@suse.de
- fix string parsing with -s (285934)
* Thu Jun 21 2007 olh@suse.de
- do not open /usr/share/usb.ids.gz twice
- remove COPYING file, read licenses.rpm to get the idea
* Thu Jun 21 2007 olh@suse.de
- lsusb.c: bugfix GUID printing; byteorder matches rfc 4122
- lsusb.c: handle another cdc descriptor type; endianness fix
  for config descriptor length and endpoint maxpacket
- usb.ids: update to current version
* Wed May 16 2007 olh@suse.de
- Buildrequires libusb -> libusb-devel
* Wed Aug 16 2006 olh@suse.de
- new lsusb -t output (186897)
- run autoreconf -fi
* Sun Jul 23 2006 olh@suse.de
- update usb.ids to 2006/07/13 status
* Sun Mar 05 2006 olh@suse.de
- version to 0.72
  (HID) prettyprinting of Unit and Unit Exponent Global items
  update video support, show camera info
  allow longer variable length bitfields in hub descriptors;
  ignore all clearly-broken hub descriptors
- use usb.ids from package
* Fri Feb 03 2006 olh@suse.de
- lsusb.c (dump_hub): Format string fix.
  (do_hub): Allocate enough space for the hub descriptor.
  Check return value in different way.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Dec 09 2005 olh@suse.de
- remove resmgr from neededforbuild
* Thu Dec 08 2005 olh@suse.de
- update usb.ids to 2005/11/19 status
  provide lsusb also in /usr/bin/
  lsusb.c: better diagnostics for invalid CDC descriptors
  lsusb.c: add Video Class support, standard GUID printing
  lsusb.c: dump device status; start dumping wireless info.  don't
  yet dump security, BOS, "endpoint companion", or other new
  descriptors.  (Security can work without wireles support...)
* Mon Sep 05 2005 olh@suse.de
- update usb.ids to 2005/09/04 status (#115202)
* Wed Aug 24 2005 olh@suse.de
- remove duplicate line (#112649)
* Wed Aug 10 2005 olh@suse.de
- update usb.ids to 2005/08/05 status
* Thu Jun 23 2005 olh@suse.de
- update usb.ids to 2005/06/20 status
  lsusb is now in /usr/sbin, libusb is also in /usr/lib
  lsusb.c: correct dump of CCID supported voltages
* Tue May 17 2005 olh@suse.de
- bump version to 0.71
* Fri Apr 29 2005 olh@suse.de
- update usb.ids to 2005/04/08 status
  lsusb.c: add some more CDC WHCM dumping, matching a Sony 3G phone
  lsusb.c: disallow decimal product and vendor codes (hex only)
- add patch to make lsusb read /proc entries correctly
  directories in /proc/bus/usb/ are all decimal,
  but lsusb parses them as octal. (#77718)
- fix a few compile warnings
* Mon Mar 14 2005 olh@suse.de
- update usb.ids to 2005/03/13 status
* Mon Mar 07 2005 olh@suse.de
- update usb.ids to 2005/02/24 status
  add simple CDC MDLM descriptor dumping to lsusb
* Thu Feb 17 2005 olh@suse.de
- update usb.ids to 2005/02/09 status
* Mon Jan 31 2005 olh@suse.de
- update to 0.70 final
* Thu Jan 27 2005 olh@suse.de
- update to current cvs, automake fixes
* Sun Jan 23 2005 olh@suse.de
- update to current cvs, version 0.70
* Mon Jan 10 2005 olh@suse.de
- update usb.ids to 2005/01/06 status
  update lsusb to current cvs
  * handle more descriptors;
  misplaced comm descriptors get interpreted;
  minor formatting updates;
  bugfixes for reading HID descriptors
  add a warning when those HID descriptors aren't available.
* Sun Oct 17 2004 olh@suse.de
- update usb.ids to 2004/09/23 status
  update lsusb to current cvs
* Fri Aug 27 2004 olh@suse.de
- update usb.ids to 2004/04/30 status
* Wed Apr 21 2004 olh@suse.de
- update to current cvs, drop usbmodules, build with libusb
* Sun Jan 11 2004 adrian@suse.de
- build as user
* Sun Sep 07 2003 olh@suse.de
- introduce /etc/usbmodules.blacklist.conf
  skip poking in /proc/bus/usb/*/* if a matching entry exists
  add usbmodules --showdriver /proc/bus/usb/*/*
* Sat Sep 06 2003 olh@suse.de
- update usb.ids to 2003/09/04 status
* Mon Aug 25 2003 adrian@suse.de
- Provide usb for update
* Sat Aug 09 2003 olh@suse.de
- update usb.ids to 2003/06/20 status
  use kernel headers for module information
* Thu Jun 05 2003 ro@suse.de
- include linux/types.h before linux/usb.h
* Sat May 17 2003 olh@suse.de
- update usb.ids to 2003/03/13 status
  workaound broken rpm4 checks
* Mon Mar 17 2003 olh@suse.de
- update usb.ids to 2003/03/13 status
* Fri Feb 07 2003 olh@suse.de
- update usb.ids to 2003/02/05 status
* Sat Feb 01 2003 olh@suse.de
- update usb.ids to 20030114 status
* Tue Dec 10 2002 schwab@suse.de
- Only swap usb device descriptor read from /proc, not the raw usb
  packets.
* Sat Sep 28 2002 olh@suse.de
- update to 0.11
  byswap bcdUSB,idVendor,idProduct,bcdDevice on big endian
* Sun Aug 04 2002 olh@suse.de
- update usb.ids, dont mark it as config in specfile
* Tue Jul 23 2002 olh@suse.de
- fix usb.ids
  reenable usbmodules, might be useable with new hotplug
* Thu Jul 11 2002 olh@suse.de
- rename usbmodules to usbmodules.obsolete
* Wed Jul 10 2002 olh@suse.de
- update to version 0.10, update usb.ids
* Sat May 04 2002 olh@suse.de
- workaround broken lib64 detection
  update usb.ids
* Thu Feb 28 2002 olh@suse.de
- update to latest http://www.linux-usb.org/usb.ids (#14046)
  update url in specfile
* Mon Sep 24 2001 olh@suse.de
- update usb.ids from http://www.linux-usb.org/
* Mon Sep 24 2001 olh@suse.de
- fix usb.ids (#11201)
* Mon Sep 03 2001 olh@suse.de
- readd to distribution for series ap
  update to 0.8 for hotplug, usbmodules is needed
  dont use libs, they are in libusb
  add current usb.ids from linux-usb.org
* Tue Dec 05 2000 schwab@suse.de
- Add %%suse_update_config.
* Thu Nov 30 2000 olaf@suse.de
- add usbutils 0.7 to SuSE dist, will replace the usb.rpm
openSUSE Build Service is sponsored by