perl-Test-Script/perl-Test-Script.spec

71 lines
2.0 KiB
RPMSpec
Raw Normal View History

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
%define with_MinimumVersion 0
Name: perl-Test-Script
Version: 1.07
Release: 1mamba
Summary: Test::Script - Basic cross-platform tests for scripts
Group: System/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.cpan.org
Source: http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Test-Script-%{version}.tar.gz
License: GPL, Artistic
## AUTOBUILDREQ-BEGIN
BuildRequires: libperl
BuildRequires: perl-IPC-Run3
BuildRequires: perl-Probe-Perl
BuildRequires: perl-Test-Simple
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(IPC::Run3)
BuildRequires: perl(Probe::Perl)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::CPAN::Meta)
BuildRequires: perl(Test::Pod)
%if %with_MinimumVersion
# TODO
BuildRequires: perl(Perl::MinimumVersion)
BuildRequires: perl(Test::MinimumVersion)
%endif
BuildRequires: perl-devel
Requires: perl >= %perl_major_ver
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
The intent of this module is to provide a series of basic tests for scripts in the bin directory of your Perl distribution.
%prep
%setup -q -n Test-Script-%{version}
%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor
%make
%if %with_MinimumVersion
%make test AUTOMATED_TESTING=1 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}/
#%{_mandir}/man3/*.3pm.gz
%doc LICENSE
%changelog
* Fri Feb 18 2011 gil <puntogil@libero.it> 1.07-1mamba
- package created by autospec