]> git.pld-linux.org Git - packages/perl-Device-USB.git/blame - perl-Device-USB.spec
- release 2
[packages/perl-Device-USB.git] / perl-Device-USB.spec
CommitLineData
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
8Summary: Device::USB - Use libusb to access USB devices
9Name: perl-Device-USB
52a006a9 10Version: 0.33
23d38977 11Release: 2
912a3b4b 12# same as perl
13License: GPL v1+ or Artistic
14Group: Development/Languages/Perl
15Source0: http://search.cpan.org/CPAN/authors/id/G/GW/GWADEJ/Device-USB-%{version}.tar.gz
52a006a9 16# Source0-md5: a3a9e89c61093f428e1c2440d9187fb1
912a3b4b 17URL: http://search.cpan.org/dist/Device-USB/
685c6566 18%if "%{pld_release}" == "ac"
19BuildRequires: libusb-devel < 1.0
20%else
52bac288 21BuildRequires: libusb-compat-devel
685c6566 22%endif
912a3b4b 23BuildRequires: perl-Inline
24BuildRequires: perl-Inline-C
25BuildRequires: perl-Parse-RecDescent
26BuildRequires: perl-devel >= 1:5.8.0
27BuildRequires: rpm-perlprov >= 4.1-13
9254e820 28BuildRequires: sed >= 4.0
912a3b4b 29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32This module provides a Perl interface to the C library libusb. This
33library supports a relatively full set of functionality to access a
34USB device. In addition to the libusb, functioality, Device::USB
35provides a few convenience features that are intended to produce a
36more Perl-ish interface.
37
38%prep
39%setup -q -n %{pdir}-%{pnam}-%{version}
40
9254e820 41# function names conflict with libusb-1.0
42sed -e 's/libusb_/DeviceUSB_/g' -i lib/Device/USB.pm lib/Device/USB/Device.pm
43rm USB.pm
44ln -s lib/Device/USB.pm .
45
912a3b4b 46%build
52bac288 47export LIBUSB_LIBDIR="%{_libdir}"
912a3b4b 48%{__perl} Makefile.PL \
49 INSTALLDIRS=vendor
52bac288 50%{__make} -j1
912a3b4b 51
52%{?with_tests:%{__make} test}
53
54%install
55rm -rf $RPM_BUILD_ROOT
56
57%{__make} pure_install \
58 DESTDIR=$RPM_BUILD_ROOT
59
60%clean
61rm -rf $RPM_BUILD_ROOT
62
63%files
64%defattr(644,root,root,755)
65%doc Changes README
66%{perl_vendorarch}/Device/*.pm
67%{perl_vendorarch}/Device/USB
68%attr(755,root,root) %{perl_vendorarch}/Device/dump_usb.pl
69%dir %{perl_vendorarch}/auto/Device/USB
70%{perl_vendorarch}/auto/Device/USB/*.bs
71%attr(755,root,root) %{perl_vendorarch}/auto/Device/USB/*.so
72%{_mandir}/man3/*
This page took 0.082736 seconds and 4 git commands to generate.