File perl-PPIx-Regexp.spec of Package perl-PPIx-Regexp
#
# spec file for package perl-PPIx-Regexp (Version 0.008)
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: perl-PPIx-Regexp
%define cpan_name PPIx-Regexp
Summary: Represent a regular expression of some sort
Version: 0.008
Release: 1
License: GPL+ or Artistic
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/PPIx-Regexp/
#Source: http://www.cpan.org/modules/by-module/PPIx/PPIx-Regexp-%{version}.tar.gz
Source: %{cpan_name}-%{version}.tar.bz2
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl
BuildRequires: perl(Module::Build)
BuildRequires: perl-macros
BuildRequires: perl(List::MoreUtils)
BuildRequires: perl(List::Util)
BuildRequires: perl(Params::Util) >= 0.25
BuildRequires: perl(PPI::Document)
BuildRequires: perl(Readonly)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(Task::Weaken)
#
Requires: perl(List::MoreUtils)
Requires: perl(List::Util)
Requires: perl(Params::Util) >= 0.25
Requires: perl(PPI::Document)
Requires: perl(Readonly)
Requires: perl(Scalar::Util)
Requires: perl(Task::Weaken)
%description
The purpose of the PPIx-Regexp package is to parse regular expressions in a
manner similar to the way the PPI package parses Perl. This class forms the
root of the parse tree, playing a role similar to PPI::Document.
The PPIx::Regexp object is instantiated using either new() or
new_from_cache(). Either way, you must pass it a regular expression,
either as a string or as one of the three relevant PPI objects:
PPI::Token::StringLike::Regexp, PPI::Token::Regexp::Match, or
PPI::Token::Regexp::Substitute. In the case of new_from_cache(), only
one PPIx::Regexp object will be generated from a given PPI object;
subsequent calls with the same PPI object will return the same
PPIx::Regexp object.
Authors:
--------
%prep
%setup -q -n %{cpan_name}-%{version}
# replace rest of /usr/local/bin/perl with /usr/bin/perl
for f in $(find . -type f -exec grep -l "/usr/local/bin/perl" {} \; ); do
%{__sed} -i -e "s@/usr/local/bin/perl@%{__perl}@g" $f
done
# fix perm
pushd eg
%{__chmod} 0644 *
popd
%build
%{__perl} Build.PL installdirs=vendor
./Build
%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 eg LICENSES README xt
%changelog