]> git.pld-linux.org Git - packages/perl-Text-RecordParser.git/blob - perl-Text-RecordParser.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Text-RecordParser.git] / perl-Text-RecordParser.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # perform "make test"
4                                 # Text::TabularDisplay 1.21 not available yet
5 #
6 %define pdir    Text
7 %define pnam    RecordParser
8 Summary:        Text::RecordParser - read record-oriented files
9 Summary(pl.UTF-8):      Text::RecordParser - odczyt plików rekordowych
10 Name:           perl-Text-RecordParser
11 Version:        1.2.1
12 Release:        3
13 # same as perl
14 License:        GPL v1+ or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://www.cpan.org/modules/by-module/Text/%{pdir}-%{pnam}-v%{version}.tar.gz
17 # Source0-md5:  65c2a85a2ed2a9bc791d377954bd5a44
18 URL:            http://search.cpan.org/dist/Text-RecordParser/
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 # sigh... perl.prov can't handle version->new(...) -- Safe.pm
26 Provides:       perl(Text::RecordParser) = %{version}
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _noautoreq      'perl(Text::RecordParser)'
31
32 %description
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.
42
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
53 pobierania danych jako tablice lub hasze.
54
55 %prep
56 %setup -q -n %{pdir}-%{pnam}-v%{version}
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
79 %{perl_vendorlib}/Text/RecordParser
80 %{_mandir}/man?/*
This page took 0.119093 seconds and 4 git commands to generate.