]> git.pld-linux.org Git - packages/perl-Device-USB.git/blob - perl-Device-USB.spec
25552fb82e293862be68af6d15e8436259dd7564
[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 %include        /usr/lib/rpm/macros.perl
8 Summary:        Device::USB - Use libusb to access USB devices
9 Name:           perl-Device-USB
10 Version:        0.35
11 Release:        6
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:  8ce79b0c26336dafd3d29f8cb534a925
17 URL:            http://search.cpan.org/dist/Device-USB/
18 %if "%{pld_release}" == "ac"
19 BuildRequires:  libusb-devel < 1.0
20 %else
21 BuildRequires:  libusb-compat-devel
22 %endif
23 BuildRequires:  perl-Inline
24 BuildRequires:  perl-Inline-C
25 BuildRequires:  perl-Parse-RecDescent
26 BuildRequires:  perl-devel >= 1:5.8.0
27 BuildRequires:  rpm-perlprov >= 4.1-13
28 BuildRequires:  sed >= 4.0
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 This module provides a Perl interface to the C library libusb. This
33 library supports a relatively full set of functionality to access a
34 USB device. In addition to the libusb, functioality, Device::USB
35 provides a few convenience features that are intended to produce a
36 more Perl-ish interface.
37
38 %prep
39 %setup -q -n %{pdir}-%{pnam}-%{version}
40
41 # function names conflict with libusb-1.0
42 sed -e 's/libusb_/DeviceUSB_/g' -i lib/Device/USB.pm lib/Device/USB/Device.pm
43 rm USB.pm
44 ln -s lib/Device/USB.pm .
45
46 %build
47 export LIBUSB_LIBDIR="%{_libdir}"
48 %{__perl} Makefile.PL \
49         INSTALLDIRS=vendor
50 %{__make} -j1
51
52 %{?with_tests:%{__make} test}
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56
57 %{__make} pure_install \
58         DESTDIR=$RPM_BUILD_ROOT
59
60 %clean
61 rm -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 %attr(755,root,root) %{perl_vendorarch}/auto/Device/USB/*.so
71 %{_mandir}/man3/*
This page took 0.036472 seconds and 2 git commands to generate.