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