]>
Commit | Line | Data |
---|---|---|
912a3b4b | 1 | # |
2 | # Conditional build: | |
45fc015c | 3 | %bcond_with tests # perform "make test" |
912a3b4b | 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 | |
45fc015c | 10 | Version: 0.29 |
912a3b4b | 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 | |
45fc015c | 16 | # Source0-md5: 34dff1d278c5496069ad73a1ef956bf4 |
912a3b4b | 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 | |
912a3b4b | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | This module provides a Perl interface to the C library libusb. This | |
28 | library supports a relatively full set of functionality to access a | |
29 | USB device. In addition to the libusb, functioality, Device::USB | |
30 | provides a few convenience features that are intended to produce a | |
31 | more Perl-ish interface. | |
32 | ||
33 | %prep | |
34 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
35 | ||
36 | %build | |
37 | %{__perl} Makefile.PL \ | |
38 | INSTALLDIRS=vendor | |
39 | %{__make} | |
40 | ||
41 | %{?with_tests:%{__make} test} | |
42 | ||
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
46 | %{__make} pure_install \ | |
47 | DESTDIR=$RPM_BUILD_ROOT | |
48 | ||
49 | %clean | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %files | |
53 | %defattr(644,root,root,755) | |
54 | %doc Changes README | |
55 | %{perl_vendorarch}/Device/*.pm | |
56 | %{perl_vendorarch}/Device/USB | |
57 | %attr(755,root,root) %{perl_vendorarch}/Device/dump_usb.pl | |
58 | %dir %{perl_vendorarch}/auto/Device/USB | |
59 | %{perl_vendorarch}/auto/Device/USB/*.bs | |
60 | %attr(755,root,root) %{perl_vendorarch}/auto/Device/USB/*.so | |
61 | %{_mandir}/man3/* |