diff --git a/README.md b/README.md index ddbe90c..7961175 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # usbutils +The "usbutils" package is most useful for the "lsusb" utility, which can provide considerable detail about the USB devices connected to your Linux system. +(It's like "pciutils" is for PCI.) + diff --git a/usbutils-0.86-hwdata.patch b/usbutils-0.86-hwdata.patch new file mode 100644 index 0000000..a4638d4 --- /dev/null +++ b/usbutils-0.86-hwdata.patch @@ -0,0 +1,70 @@ +diff -Nru usbutils-0.86.orig/Makefile.am usbutils-0.86/Makefile.am +--- usbutils-0.86.orig/Makefile.am 2009-08-18 00:23:35.000000000 +0200 ++++ usbutils-0.86/Makefile.am 2011-10-31 18:26:36.444897471 +0100 +@@ -1,18 +1,9 @@ + AM_LDFLAGS = \ + -Wl,--as-needed + +-data_DATA = \ +- usb.ids +-if HAVE_ZLIB +-data_DATA += usb.ids.gz +-endif +- + sbin_PROGRAMS = \ + lsusb + +-sbin_SCRIPTS = \ +- update-usbids.sh +- + bin_SCRIPTS = \ + usb-devices + +@@ -26,7 +17,7 @@ + + lsusb_CPPFLAGS = \ + $(AM_CPPFLAGS) \ +- -DDATADIR=\"$(datadir)\" ++ -DDATADIR=\"$(datadir)/hwdata\" + + lsusb_LDADD = \ + $(LIBUSB_LIBS) +@@ -36,22 +27,13 @@ + usb-devices.1 + + EXTRA_DIST = \ +- usb.ids \ +- update-usbids.sh.in \ + lsusb.8.in \ + usb-devices.1.in \ + usb-devices \ + usbutils.pc.in + +-usb.ids.gz: $(srcdir)/usb.ids +- gzip -c -9 $< > $@ +- +-update-usbids.sh: $(srcdir)/update-usbids.sh.in +- sed 's|@usbids@|$(datadir)/usb.ids|g' $< >$@ +- chmod 755 $@ +- + lsusb.8: $(srcdir)/lsusb.8.in +- sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@ ++ sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/hwdata/usb.ids|g' $< >$@ + + usb-devices.1: $(srcdir)/usb-devices.1.in + sed 's|VERSION|$(VERSION)|g' $< >$@ +@@ -60,13 +42,11 @@ + pkgconfig_DATA = usbutils.pc + + usbutils.pc: $(srcdir)/usbutils.pc.in +- sed 's|@usbids@|$(datadir)/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@ ++ sed 's|@usbids@|$(datadir)/hwdata/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@ + + DISTCLEANFILES = \ +- usb.ids.gz \ + lsusb.8 \ + usb-devices.1 \ +- update-usbids.sh \ + usbutils.pc + + distclean-local: diff --git a/usbutils.spec b/usbutils.spec new file mode 100644 index 0000000..fa3a776 --- /dev/null +++ b/usbutils.spec @@ -0,0 +1,107 @@ +Name: usbutils +Version: 007 +Release: 1mamba +Summary: Utilities for handling USB devices +Group: System/Kernel and Hardware +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://usb.cs.tum.edu/ +Source: http://ftp.kernel.org/pub/linux/utils/usb/usbutils/usbutils-%{version}.tar.xz +#Source: http://downloads.sourceforge.net/sourceforge/linux-usb/%{name}-%{version}.tar.gz +Patch0: %{name}-0.86-hwdata.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libusb-devel +## AUTOBUILDREQ-END +Provides: usbutils-devel = %{version} +Obsoletes: usbutils-devel +Requires: hwdata +BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot + +%description +The "usbutils" package is most useful for the "lsusb" utility, which can provide considerable detail about the USB devices connected to your Linux system. +(It's like "pciutils" is for PCI.) + +%prep +%setup -q +#%patch0 -p1 + +%build +autoreconf -i +%configure \ + --disable-zlib \ + --disable-usbids \ + --datadir=%{_datadir}/hwdata + +%make + +## do update `usb.ids' from +#./update-usbids.sh + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +%makeinstall + +#ln -s ../sbin/lsusb %{buildroot}%{_bindir}/lsusb + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_bindir}/lsusb +%{_bindir}/lsusb.py +%{_bindir}/usbhid-dump +%{_bindir}/usb-devices +%{_mandir}/man1/usb-devices.1* +%{_mandir}/man8/* +%{_datadir}/pkgconfig/usbutils.pc +%doc AUTHORS COPYING +#%doc NEWS README ChangeLog + +%changelog +* Tue Jun 11 2013 Automatic Build System 007-1mamba +- automatic version update by autodist + +* Wed Feb 06 2013 Silvan Calarco 006-2mamba +- fix usb.ids location + +* Thu Jan 31 2013 Automatic Build System 006-1mamba +- update to 006 + +* Mon Oct 31 2011 Silvan Calarco 0.86-4mamba +- added patch to read ids db from /usr/share/hwdata; added requirement for hwdata + +* Fri Oct 07 2011 Silvan Calarco 0.86-3mamba +- added updated usb.ids from linux-usb.org + +* Wed Aug 31 2011 Silvan Calarco 0.86-2mamba +- added /usr/bin/lsusb symlink pointing to /usr/sbin/lsusb + +* Fri Aug 21 2009 Automatic Build System 0.86-1mamba +- automatic update by autodist + +* Sat Jun 27 2009 Silvan Calarco 0.84-1mamba +- update to 0.84 + +* Mon Dec 03 2007 Silvan Calarco 0.73-2mamba +- don't compress usb.ids database file + +* Tue Nov 13 2007 Aleph0 0.73-1mamba +- update to 0.73 + +* Mon Jul 24 2006 Silvan Calarco 0.72-1qilnx +- update to version 0.72 by autospec + +* Thu Apr 14 2005 Davide Madrisan 0.70-2qilnx +- provides usbutils-devel to avoid errors during upgrade from QiLinux 1.1 + +* Wed Feb 02 2005 Davide Madrisan 0.70-1qilnx +- update to version 0.70 by autospec +- removed devel package (usbutils uses now the system library libusb to + access USB devices, not a private (old) copy of that library.) + +* Mon Jul 02 2003 Silvan Calarco 0.11-1qilnx +- first build of USB-utils