]>
Commit | Line | Data |
---|---|---|
ed8b0321 JB |
1 | # |
2 | # Conditional build: | |
13c38653 | 3 | %bcond_with hwdata_check # check hwdata usb.ids freshness |
ed8b0321 | 4 | # |
4151b85a | 5 | Summary: Linux USB utilities |
7632e44d ER |
6 | Summary(pl.UTF-8): Linuksowe narzędzia do USB |
7 | Summary(pt_BR.UTF-8): Utilitários Linux USB | |
4151b85a | 8 | Name: usbutils |
13c38653 JB |
9 | Version: 007 |
10 | Release: 1 | |
87413353 | 11 | License: GPL v2+ |
4151b85a | 12 | Group: Applications/System |
13c38653 JB |
13 | Source0: http://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.xz |
14 | # Source0-md5: c9df5107ae9d26b10a1736a261250139 | |
0ccdd768 | 15 | Patch0: hwdata.patch |
4f12a1aa | 16 | URL: http://www.linux-usb.org/ |
b8a227eb JB |
17 | BuildRequires: autoconf >= 2.60 |
18 | BuildRequires: automake >= 1:1.9 | |
13c38653 | 19 | %{?with_hwdata_check:BuildRequires: hwdata >= 0.249} |
b8ee8dda | 20 | BuildRequires: libtool |
b8a227eb | 21 | BuildRequires: libusb-devel >= 1.0.0 |
1e351450 | 22 | BuildRequires: pkgconfig |
13c38653 JB |
23 | BuildRequires: tar >= 1:1.22 |
24 | BuildRequires: xz | |
87413353 | 25 | BuildRequires: zlib-devel |
13c38653 | 26 | Requires: hwdata >= 0.249 |
4151b85a | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
01497d80 | 29 | %define hwdatadir /lib/hwdata |
739abb6a | 30 | %define _datadir %{hwdatadir} |
4f12a1aa | 31 | |
0d2e5c75 | 32 | %description |
4151b85a | 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 | |
06e9c78b | 35 | (supporting the '/proc/bus/usb' interface) or patched PLD's 2.2 |
36 | kernel. | |
0d2e5c75 | 37 | |
6e35b378 JR |
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. | |
35fd7d7c | 42 | |
6e35b378 JR |
43 | %description -l pt_BR.UTF-8 |
44 | Este pacote contém utilitários para inspecionar dispositivos | |
06e9c78b | 45 | conectados a um barramento USB. |
46 | ||
0d2e5c75 | 47 | %prep |
4151b85a | 48 | %setup -q |
2717fa4a | 49 | %patch0 -p1 |
0d2e5c75 | 50 | |
ed8b0321 | 51 | %if %{with hwdata_check} |
0ccdd768 ER |
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 | |
55 | exit 1 | |
56 | fi | |
ed8b0321 | 57 | %endif |
0ccdd768 ER |
58 | %{__rm} usb.ids |
59 | ||
0d2e5c75 | 60 | %build |
fa2a1634 | 61 | %{__libtoolize} |
3463107b | 62 | %{__aclocal} |
f6b0fc1d | 63 | %{__autoconf} |
2717fa4a | 64 | %{__autoheader} |
7eacd412 | 65 | %{__automake} |
750845d9 | 66 | %configure \ |
0ccdd768 | 67 | --disable-usbids \ |
750845d9 | 68 | --disable-silent-rules |
4151b85a | 69 | %{__make} |
0d2e5c75 | 70 | |
71 | %install | |
72 | rm -rf $RPM_BUILD_ROOT | |
366faa4a | 73 | %{__make} install \ |
55e3c5e7 | 74 | pkgconfigdir=%{_pkgconfigdir} \ |
0ccdd768 | 75 | INSTALL="install -p" \ |
366faa4a | 76 | DESTDIR=$RPM_BUILD_ROOT |
4151b85a | 77 | |
ed8b0321 | 78 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/lsusb.py |
0ccdd768 | 79 | |
0d2e5c75 | 80 | %clean |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %files | |
4151b85a | 84 | %defattr(644,root,root,755) |
7eacd412 | 85 | %doc AUTHORS ChangeLog NEWS README |
a1ac6aa8 | 86 | %attr(755,root,root) %{_bindir}/lsusb |
55e3c5e7 | 87 | %attr(755,root,root) %{_bindir}/usb-devices |
b8a227eb | 88 | %attr(755,root,root) %{_bindir}/usbhid-dump |
55e3c5e7 | 89 | %{_mandir}/man1/usb-devices.1* |
87413353 | 90 | %{_mandir}/man8/lsusb.8* |
a0c31a27 | 91 | %{_mandir}/man8/usbhid-dump.8* |
cf402bbf PZ |
92 | # there is no devel package for now and the dir is part of filesystem |
93 | %{_pkgconfigdir}/usbutils.pc |