3 %bcond_with hwdata_check # check hwdata usb.ids freshness
5 Summary: Linux USB utilities
6 Summary(pl.UTF-8): Linuksowe narzędzia do USB
7 Summary(pt_BR.UTF-8): Utilitários Linux USB
12 Group: Applications/System
13 Source0: http://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.xz
14 # Source0-md5: c9df5107ae9d26b10a1736a261250139
16 URL: http://www.linux-usb.org/
17 BuildRequires: autoconf >= 2.60
18 BuildRequires: automake >= 1:1.9
19 %{?with_hwdata_check:BuildRequires: hwdata >= 0.249}
20 BuildRequires: libtool
21 BuildRequires: libusb-devel >= 1.0.0
22 BuildRequires: pkgconfig
23 BuildRequires: tar >= 1:1.22
25 BuildRequires: zlib-devel
26 Requires: hwdata >= 0.249
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define hwdatadir /lib/hwdata
30 %define _datadir %{hwdatadir}
33 usbutils contains a utility for inspecting devices connected to the
34 USB bus. It requires a Linux kernel version 2.3.15 or newer
35 (supporting the '/proc/bus/usb' interface) or patched PLD's 2.2
38 %description -l pl.UTF-8
39 Pakiet usbutils zawiera narzędzie do przeglądania urządzeń
40 podłączonych do szyny USB. Wymaga jądra w werji 2.3.15 lub nowszej (z
41 obsługą interfejsu /proc/bus/usb) lub jądra 2.2 z PLD.
43 %description -l pt_BR.UTF-8
44 Este pacote contém utilitários para inspecionar dispositivos
45 conectados a um barramento USB.
51 %if %{with hwdata_check}
52 # paranoid check whether usb.ids in system isn't too old
53 if [ usb.ids -nt %{hwdatadir}/usb.ids ]; then
54 : usb.ids needs to be updated
68 --disable-silent-rules
72 rm -rf $RPM_BUILD_ROOT
74 pkgconfigdir=%{_pkgconfigdir} \
75 INSTALL="install -p" \
76 DESTDIR=$RPM_BUILD_ROOT
78 %{__rm} $RPM_BUILD_ROOT%{_bindir}/lsusb.py
81 rm -rf $RPM_BUILD_ROOT
84 %defattr(644,root,root,755)
85 %doc AUTHORS ChangeLog NEWS README
86 %attr(755,root,root) %{_bindir}/lsusb
87 %attr(755,root,root) %{_bindir}/usb-devices
88 %attr(755,root,root) %{_bindir}/usbhid-dump
89 %{_mandir}/man1/usb-devices.1*
90 %{_mandir}/man8/lsusb.8*
91 %{_mandir}/man8/usbhid-dump.8*
92 # there is no devel package for now and the dir is part of filesystem
93 %{_pkgconfigdir}/usbutils.pc