]> git.pld-linux.org Git - packages/perl-Text-RecordParser.git/blame - perl-Text-RecordParser.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Text-RecordParser.git] / perl-Text-RecordParser.spec
CommitLineData
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
8Summary: Text::RecordParser - read record-oriented files
8022b601 9Summary(pl.UTF-8): Text::RecordParser - odczyt plików rekordowych
b10270af 10Name: perl-Text-RecordParser
0416745f 11Version: 1.2.1
9b8f0fd8 12Release: 3
b10270af 13# same as perl
14License: GPL v1+ or Artistic
15Group: Development/Languages/Perl
a22f5730 16Source0: http://www.cpan.org/modules/by-module/Text/%{pdir}-%{pnam}-v%{version}.tar.gz
0416745f 17# Source0-md5: 65c2a85a2ed2a9bc791d377954bd5a44
a22f5730 18URL: http://search.cpan.org/dist/Text-RecordParser/
b10270af 19BuildRequires: perl-devel >= 1:5.8.0
20BuildRequires: rpm-perlprov >= 4.1-13
21%if %{with tests}
22BuildRequires: perl-Text-TabularDisplay >= 1.21
23BuildConflicts: perl-Text-TabularDisplay = 1.20
24%endif
3bb89426
JB
25# sigh... perl.prov can't handle version->new(...) -- Safe.pm
26Provides: perl(Text::RecordParser) = %{version}
b10270af 27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
9b8f0fd8 30%define _noautoreq 'perl(Text::RecordParser)'
31
b10270af 32%description
bf715bba 33This module is for reading record-oriented data. The most common
34example have records separated by newlines and fields separated by
35commas or tabs, but this module aims to provide a consistent interface
36for handling sequential records in a file however they may be
37delimited. Typically this data lists the fields in the first line of
38the file, in which case you should call bind_header to bind the field
39name. If the first line contains data, you can still bind your own
40field names via bind_fields. Either way, you can then use many methods
41to get at the data as arrays or hashes.
b10270af 42
ca1008b4
JR
43%description -l pl.UTF-8
44Ten moduł służy do czytania danych zorientowanych rekordowo.
45Najpopularniejszy przykład to rekordy oddzielone nowymi liniami i pola
46oddzielone przecinkami lub tabulatorami, ale celem tego modułu jest
47dostarczenie spójnego interfejsu do obsługi sekwencyjnych rekordów w
48pliku niezależnie od sposobu ich rozdzielenia. Typowo dane te
49określają pola w pierwszej linii pliku - w tym przypadku należy
50wywołać bind_header aby podpiąć nazwy pól. Jeśli pierwsza linia
51zawiera dane, nadal można podpiąć własne nazwy pól poprzez
52bind_fields. W każdym przypadku można potem używać wielu metod
403cdcff 53pobierania 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
66rm -rf $RPM_BUILD_ROOT
67
68%{__make} install \
69 DESTDIR=$RPM_BUILD_ROOT
70
71%clean
72rm -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?/*
This page took 0.582492 seconds and 4 git commands to generate.