# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify CentOS Linux and Scientific Linux as rhel %if "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "sl" || "%{__distinit}" == "sls" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Name: perl-Test-Most Version: 0.11 Release: 2.%{__distinit}%{__distvers} Summary: Perl module with test functions and features License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Test-Most/ Source0: http://search.cpan.org/CPAN/authors/id/O/OV/OVID/Test-Most-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::Builder::Module) BuildRequires: perl(Test::Deep) BuildRequires: perl(Test::Differences) BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::Harness) BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Warn) >= 0.1 BuildRequires: perl(Test::Pod::Coverage) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description Most commonly needed test functions and features. This module provides you with the most commonly used testing functions and gives you a bit more fine-grained control over your test suite. %prep %setup -q -n Test-Most-%{version} %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null %{_fixperms} %{buildroot} %check make test %clean rm -rf %{buildroot} %files %doc Changes README %{perl_vendorlib}/Test/ %{_mandir}/man3/Test::Most.3pm* %changelog * Thu Aug 18 2011 Paul Howarth - 0.11-2 - Specifying %%defattr(-,root,root,-) in %%files list not needed from rpm 4.4 in FC-4 - Use DESTDIR rather than PERL_INSTALL_ROOT - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Mon Jun 28 2010 Paul Howarth - 0.11-1 - Initial RPM version