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