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