]>
Commit | Line | Data |
---|---|---|
b10270af | 1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # perform "make test" | |
4 | # Text::TabularDisplay 1.21 not available yet | |
5 | # | |
b10270af | 6 | %define pdir Text |
7 | %define pnam RecordParser | |
8 | Summary: Text::RecordParser - read record-oriented files | |
8022b601 | 9 | Summary(pl.UTF-8): Text::RecordParser - odczyt plików rekordowych |
b10270af | 10 | Name: perl-Text-RecordParser |
0416745f | 11 | Version: 1.2.1 |
9b8f0fd8 | 12 | Release: 3 |
b10270af | 13 | # same as perl |
14 | License: GPL v1+ or Artistic | |
15 | Group: Development/Languages/Perl | |
a22f5730 | 16 | Source0: http://www.cpan.org/modules/by-module/Text/%{pdir}-%{pnam}-v%{version}.tar.gz |
0416745f | 17 | # Source0-md5: 65c2a85a2ed2a9bc791d377954bd5a44 |
a22f5730 | 18 | URL: http://search.cpan.org/dist/Text-RecordParser/ |
b10270af | 19 | BuildRequires: perl-devel >= 1:5.8.0 |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
21 | %if %{with tests} | |
22 | BuildRequires: perl-Text-TabularDisplay >= 1.21 | |
23 | BuildConflicts: perl-Text-TabularDisplay = 1.20 | |
24 | %endif | |
3bb89426 JB |
25 | # sigh... perl.prov can't handle version->new(...) -- Safe.pm |
26 | Provides: perl(Text::RecordParser) = %{version} | |
b10270af | 27 | BuildArch: noarch |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
9b8f0fd8 | 30 | %define _noautoreq 'perl(Text::RecordParser)' |
31 | ||
b10270af | 32 | %description |
bf715bba | 33 | This module is for reading record-oriented data. The most common |
34 | example have records separated by newlines and fields separated by | |
35 | commas or tabs, but this module aims to provide a consistent interface | |
36 | for handling sequential records in a file however they may be | |
37 | delimited. Typically this data lists the fields in the first line of | |
38 | the file, in which case you should call bind_header to bind the field | |
39 | name. If the first line contains data, you can still bind your own | |
40 | field names via bind_fields. Either way, you can then use many methods | |
41 | to get at the data as arrays or hashes. | |
b10270af | 42 | |
ca1008b4 JR |
43 | %description -l pl.UTF-8 |
44 | Ten moduł służy do czytania danych zorientowanych rekordowo. | |
45 | Najpopularniejszy przykład to rekordy oddzielone nowymi liniami i pola | |
46 | oddzielone przecinkami lub tabulatorami, ale celem tego modułu jest | |
47 | dostarczenie spójnego interfejsu do obsługi sekwencyjnych rekordów w | |
48 | pliku niezależnie od sposobu ich rozdzielenia. Typowo dane te | |
49 | określają pola w pierwszej linii pliku - w tym przypadku należy | |
50 | wywołać bind_header aby podpiąć nazwy pól. Jeśli pierwsza linia | |
51 | zawiera dane, nadal można podpiąć własne nazwy pól poprzez | |
52 | bind_fields. W każdym przypadku można potem używać wielu metod | |
403cdcff | 53 | pobierania danych jako tablice lub hasze. |
b10270af | 54 | |
55 | %prep | |
0416745f | 56 | %setup -q -n %{pdir}-%{pnam}-v%{version} |
b10270af | 57 | |
58 | %build | |
59 | %{__perl} Makefile.PL \ | |
60 | INSTALLDIRS=vendor | |
61 | %{__make} | |
62 | ||
63 | %{?with_tests:%{__make} test} | |
64 | ||
65 | %install | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %{__make} install \ | |
69 | DESTDIR=$RPM_BUILD_ROOT | |
70 | ||
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
74 | %files | |
75 | %defattr(644,root,root,755) | |
76 | %doc Changes INSTALL TODO | |
77 | %attr(755,root,root) %{_bindir}/* | |
78 | %{perl_vendorlib}/Text/*.pm | |
0416745f | 79 | %{perl_vendorlib}/Text/RecordParser |
b10270af | 80 | %{_mandir}/man?/* |