3 %bcond_with tests # do perform "make test"
5 %include /usr/lib/rpm/macros.perl
7 Summary: Sane - Perl extension for the SANE (Scanner Access Now Easy) Project
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-authors/id/R/RA/RATCLIFFE/%{pdir}-%{version}.tar.gz
16 # Source0-md5: db83b8b07e1263b78187c4349a183082
17 URL: http://search.cpan.org/dist/Sane/
18 BuildRequires: perl-ExtUtils-Depends
19 BuildRequires: perl-ExtUtils-PkgConfig
20 BuildRequires: perl-devel >= 1:5.8.0
21 BuildRequires: rpm-perlprov >= 4.1-13
22 BuildRequires: sane-backends-devel
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 The Sane module allows a Perl developer to use SANE-compatible
27 scanners. Find out more about SANE at <http://www.sane-project.org>.
29 Most methods set $Sane::STATUS, which is overloaded to give either an
30 integer as dictated by the SANE standard, or the the corresponding
33 Returns an array with the SANE_VERSION_(MAJOR|MINOR|BUILD) versions:
34 - join('.',Sane->get_version)
36 # %description -l pl.UTF-8
40 %setup -q -n %{pdir}-%{version}
43 %{__perl} Makefile.PL \
47 OPTIMIZE="%{rpmcflags}"
49 %{?with_tests:%{__make} test}
52 rm -rf $RPM_BUILD_ROOT
54 %{__make} pure_install \
55 DESTDIR=$RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
58 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
61 rm -rf $RPM_BUILD_ROOT
64 %defattr(644,root,root,755)
66 %{perl_vendorarch}/Sane.pm
67 %dir %{perl_vendorarch}/auto/Sane/
68 %attr(755,root,root) %{perl_vendorarch}/auto/Sane/*.so
70 %{_examplesdir}/%{name}-%{version}