2 %bcond_without tests # do not perform "make test"
4 %define pdir Spreadsheet
6 Summary: Spreadsheet::Read - Read the data from a spreadsheet
7 Name: perl-Spreadsheet-Read
10 License: GPL v1+ or Artistic
11 Group: Development/Languages/Perl
12 Source0: http://www.cpan.org/modules/by-module/Spreadsheet/%{pdir}-%{pnam}-%{version}.tgz
13 # Source0-md5: 84fe60094d79a6e85c6ed414a77e89cb
14 URL: http://search.cpan.org/~hmbrand/Spreadsheet-Read/
15 BuildRequires: perl-devel >= 1:5.8.0
16 BuildRequires: rpm-perlprov >= 4.1-13
18 BuildRequires: perl-Test-NoWarnings
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Spreadsheet::Read tries to transparently read *any* spreadsheet and
25 return its content in a universal manner independent of the parsing
26 module that does the actual spreadsheet scanning.
28 For OpenOffice this module uses Spreadsheet::ReadSXC
30 For Microsoft Excel this module uses Spreadsheet::ParseExcel or
33 For CSV this module uses Text::CSV_XS or Text::CSV_PP.
35 For SquirrelCalc there is a very simplistic built-in parser
38 %setup -q -n %{pdir}-%{pnam}-%{version}
40 %{__sed} -i -e '/#!\/pro\/bin\/perl/d' Read.pm
41 %{__sed} -i -e 's|/pro/bin/perl|%{_bindir}/perl|' examples/*
45 %{__perl} Makefile.PL \
50 %{?with_tests:%{__make} test}
53 rm -rf $RPM_BUILD_ROOT
55 %{__make} pure_install \
56 DESTDIR=$RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
59 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
67 %{perl_vendorlib}/Spreadsheet/Read*.pm
69 %{_examplesdir}/%{name}-%{version}