File perl-Pod-Readme.spec of Package perl-Pod-Readme

#
# spec file for package perl-Pod-Readme
#
# Copyright (c) 2014 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-Pod-Readme
Version:        0.11
Release:        0
%define cpan_name Pod-Readme
Summary:        Convert POD to README file
License:        GPL-1.0+ or Artistic-1.0
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/Pod-Readme/
#Source:         http://www.cpan.org/authors/id/B/BI/BIGPRESH/Pod-Readme-0.11.tar.gz
Source:         %{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Carp)
BuildRequires:  perl(File::Copy)
BuildRequires:  perl(IO::File)
%if 0%{?suse_version} >= 1110
BuildRequires:  perl(Pod::Text) >= 3.0
%else
BuildRequires:  perl(Pod::Text)
%endif
BuildRequires:  perl(Regexp::Common)
BuildRequires:  perl(Test::More)
Requires:       perl(Carp)
Requires:       perl(File::Copy)
Requires:       perl(IO::File)
%if 0%{?suse_version} >= 1110
Requires:       perl(Pod::Text) >= 3.0
%else
Requires:       perl(Pod::Text)
%endif
Requires:       perl(Regexp::Common)
Requires:       perl(Test::More)
%{perl_requires}

%description
This module is a subclass of L<Pod::PlainText> which provides additional
POD markup for generating F<README> files.

Why should one bother with this? One can simply use

  pod2text Module.pm > README

A problem with doing that is that the default L<pod2text> converter will
add text to links, so that "LZ<><Module>" is translated to "the Module
manpage".

Another problem is that the F<README> includes the entirety of the module
documentation! Most people browsing the F<README> file do not need all of
this information.

Likewise, including installation and requirement information in the module
documentation is not necessary either, since the module is already
installed.

This module allows authors to mark portions of the POD to be included only
in, or to be excluded from the F<README> file. It also allows you to
include portions of another file (such as a separate F<ChangeLog>).

%prep
%setup -q -n %{cpan_name}-%{version}
perl -p -i -e 's|\r\n|\n|' bin/pod2readme

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%clean
%{__rm} -rf %{buildroot}

%files -f %{name}.files
%defattr(644,root,root,755)
%doc Changes README
%attr(0755,root,root) %{_bindir}/pod2readme

%changelog
openSUSE Build Service is sponsored by