]>
Commit | Line | Data |
---|---|---|
c807ecde JR |
1 | # Conditional build: |
2 | %bcond_without tests # do not perform "make test" | |
3 | # | |
4 | %define pdir Spreadsheet | |
5 | %define pnam Read | |
c807ecde JR |
6 | Summary: Spreadsheet::Read - Read the data from a spreadsheet |
7 | Name: perl-Spreadsheet-Read | |
8 | Version: 0.47 | |
7abf5d48 | 9 | Release: 2 |
c807ecde JR |
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 | |
17 | %if %{with tests} | |
18 | BuildRequires: perl-Test-NoWarnings | |
19 | %endif | |
20 | BuildArch: noarch | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
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. | |
27 | ||
28 | For OpenOffice this module uses Spreadsheet::ReadSXC | |
29 | ||
30 | For Microsoft Excel this module uses Spreadsheet::ParseExcel or | |
31 | Spreadsheet::XLSX | |
32 | ||
33 | For CSV this module uses Text::CSV_XS or Text::CSV_PP. | |
34 | ||
35 | For SquirrelCalc there is a very simplistic built-in parser | |
36 | ||
37 | %prep | |
38 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
39 | ||
7abf5d48 JR |
40 | %{__sed} -i -e '/#!\/pro\/bin\/perl/d' Read.pm |
41 | %{__sed} -i -e 's|/pro/bin/perl|%{_bindir}/perl|' examples/* | |
42 | ||
c807ecde JR |
43 | %build |
44 | AUTOMATED_TESTING=1 \ | |
45 | %{__perl} Makefile.PL \ | |
46 | INSTALLDIRS=vendor | |
47 | ||
48 | %{__make} | |
49 | ||
50 | %{?with_tests:%{__make} test} | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %{__make} pure_install \ | |
56 | DESTDIR=$RPM_BUILD_ROOT | |
57 | ||
58 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
59 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
66 | %doc Changes README | |
67 | %{perl_vendorlib}/Spreadsheet/Read*.pm | |
68 | %{_mandir}/man3/* | |
69 | %{_examplesdir}/%{name}-%{version} |