]>
Commit | Line | Data |
---|---|---|
912a3b4b | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Device | |
7 | %define pnam USB | |
8 | Summary: Device::USB - Use libusb to access USB devices | |
9 | Name: perl-Device-USB | |
10 | Version: 0.27 | |
11 | Release: 1 | |
12 | # same as perl | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://search.cpan.org/CPAN/authors/id/G/GW/GWADEJ/Device-USB-%{version}.tar.gz | |
16 | # Source0-md5: bc341793a6ec5ffcce4380cbee6e35ba | |
17 | URL: http://search.cpan.org/dist/Device-USB/ | |
18 | BuildRequires: libusb-devel | |
19 | BuildRequires: perl-Inline | |
20 | BuildRequires: perl-Inline-C | |
21 | BuildRequires: perl-Parse-RecDescent | |
22 | BuildRequires: perl-devel >= 1:5.8.0 | |
23 | BuildRequires: rpm-perlprov >= 4.1-13 | |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | This module provides a Perl interface to the C library libusb. This | |
29 | library supports a relatively full set of functionality to access a | |
30 | USB device. In addition to the libusb, functioality, Device::USB | |
31 | provides a few convenience features that are intended to produce a | |
32 | more Perl-ish interface. | |
33 | ||
34 | %prep | |
35 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
36 | ||
37 | %build | |
38 | %{__perl} Makefile.PL \ | |
39 | INSTALLDIRS=vendor | |
40 | %{__make} | |
41 | ||
42 | %{?with_tests:%{__make} test} | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | ||
47 | %{__make} pure_install \ | |
48 | DESTDIR=$RPM_BUILD_ROOT | |
49 | ||
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
55 | %doc Changes README | |
56 | %{perl_vendorarch}/Device/*.pm | |
57 | %{perl_vendorarch}/Device/USB | |
58 | %attr(755,root,root) %{perl_vendorarch}/Device/dump_usb.pl | |
59 | %dir %{perl_vendorarch}/auto/Device/USB | |
60 | %{perl_vendorarch}/auto/Device/USB/*.bs | |
61 | %attr(755,root,root) %{perl_vendorarch}/auto/Device/USB/*.so | |
62 | %{_mandir}/man3/* |