perl-PPI/perl-PPI.spec

84 lines
2.4 KiB
RPMSpec

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
%define with_MinimumVersion 0
Name: perl-PPI
Version: 1.215
Release: 1mamba
Summary: PPI - Parse, Analyze and Manipulate Perl (without perl)
Group: System/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: gil <puntogil@libero.it>
URL: http://www.cpan.org
Source: http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/PPI-%{version}.tar.gz
License: GPL, Artistic
BuildRequires: perl(Clone)
BuildRequires: perl(Digest::MD5)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Find::Rule)
BuildRequires: perl(File::Remove)
BuildRequires: perl(IO::String)
BuildRequires: perl(List::MoreUtils)
BuildRequires: perl(List::Util)
BuildRequires: perl(Params::Util)
BuildRequires: perl(Storable)
BuildRequires: perl(Task::Weaken)
BuildRequires: perl(Test::ClassAPI)
BuildRequires: perl(Test::CPAN::Meta)
%if %with_MinimumVersion
# TODO
BuildRequires: perl(Perl::MinimumVersion)
BuildRequires: perl(Test::MinimumVersion)
%endif
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::NoWarnings)
BuildRequires: perl(Test::Object)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::SubCalls)
BuildRequires: perl-devel
Requires: perl >= %perl_major_ver
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
PPI - Parse, Analyze and Manipulate Perl (without perl)
%prep
%setup -q -n PPI-%{version}
iconv -f iso8859-1 -t utf-8 < Changes > Changes.1
mv Changes.1 Changes
chmod -c 644 lib/PPI/Document/File.pm
%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor
%make
%if %with_MinimumVersion
%make test TEST_FILES="xt/*.t" RELEASE_TESTING=1
%else
%make test
%endif
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall_perl
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
chmod -R u+w %{buildroot}/*
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{perl_vendorlib}/PPI.pm
%{perl_vendorlib}/PPI/
%{_mandir}/man3/*.3pm.gz
%doc Changes LICENSE README inline2test.conf inline2test.tpl
%changelog
* Mon May 02 2011 Automatic Build System <autodist@mambasoft.it> 1.215-1mamba
- automatic update by autodist
* Thu Feb 17 2011 gil <puntogil@libero.it> 1.213-1mamba
- package created by autospec