File perl-Text-RecordParser.spec of Package perl-Text-RecordParser

#
# spec file for package perl-Text-RecordParser
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           perl-Text-RecordParser
%define cpan_name Text-RecordParser
Summary:        Read record-oriented files
License:        GPL-2.0
Group:          Development/Libraries/Perl
Version:        1.5.0
Release:        0
Url:            http://search.cpan.org/dist/Text-RecordParser/
Source:         http://www.cpan.org/authors/id/K/KC/KCLARK/Text-RecordParser-v%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires:  cairo
BuildRequires:  ghostscript-fonts-std
BuildRequires:  graphviz-gnome
BuildRequires:  pango
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Class::Accessor)
BuildRequires:  perl(GraphViz)
BuildRequires:  perl(IO::Scalar)
BuildRequires:  perl(List::MoreUtils)
BuildRequires:  perl(List::Util)
BuildRequires:  perl(Module::Build)
BuildRequires:  perl(Readonly)
BuildRequires:  perl(Readonly::XS)
BuildRequires:  perl(Test::Exception)
BuildRequires:  perl(Text::TabularDisplay) >= 1.22
BuildRequires:  perl(version)
Requires:       perl(Class::Accessor)
Requires:       perl(GraphViz)
Requires:       perl(IO::Scalar)
Requires:       perl(List::MoreUtils)
Requires:       perl(List::Util)
Requires:       perl(Readonly)
Requires:       perl(Readonly::XS)
Requires:       perl(Text::TabularDisplay) >= 1.22
Requires:       perl(version)
Requires:       cairo pango graphviz-gnome ghostscript-fonts-std

%description
This module is for reading record-oriented data in a delimited text file.
The most common example have records separated by newlines and fields
separated by commas or tabs, but this module aims to provide a consistent
interface for handling sequential records in a file however they may be
delimited. Typically this data lists the fields in the first line of the
file, in which case you should call bind_header to bind the field name (or
not, and it will be called implicitly). If the first line contains data,
you can still bind your own field names via bind_fields. Either way, you
can then use many methods to get at the data as arrays or hashes.

%prep
%setup -q -n %{cpan_name}-v%{version}

%build
%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}

%check
./Build test

%install
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
%perl_gen_filelist

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes README TODO

%changelog
openSUSE Build Service is sponsored by