# 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 # perl_vendorlib/perl_vendorarch not defined by default prior to F-2 %{!?perl_vendorlib: %global perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)} Name: perl-Perl-MinimumVersion Version: 1.20 Release: 3.%{__distinit}%{__distvers} Summary: Find a minimum required version of perl for Perl code License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Perl-MinimumVersion/ Source0: http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Perl-MinimumVersion-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(List::Util) BuildRequires: perl(File::Find::Rule) >= 0.30 BuildRequires: perl(File::Find::Rule::Perl) >= 1.04 BuildRequires: perl(File::Spec) >= 0.80 BuildRequires: perl(Params::Util) BuildRequires: perl(PPI) >= 1.201 BuildRequires: perl(Test::CPAN::Meta) >= 0.12 BuildRequires: perl(Test::MinimumVersion) BuildRequires: perl(Test::More) >= 0.47 BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Test::Script) >= 1.02 BuildRequires: perl(version) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description Find a minimum required version of perl for Perl code. %prep %setup -q -n Perl-MinimumVersion-%{version} %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install PERL_INSTALL_ROOT=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';' chmod -R u+w %{buildroot} %check make test AUTOMATED_TESTING=1 %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc Changes LICENSE %{_bindir}/perlver %{perl_vendorlib}/Perl/ %{_mandir}/man1/perlver.1* %{_mandir}/man3/Perl::MinimumVersion.3pm* %changelog * Tue Oct 18 2011 Paul Howarth - 1.20-3 - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Wed Nov 25 2009 Paul Howarth - 1.20-2 - Dist tag for Rawhide no longer needs special-casing - P::MV 1.20 is the last version compatible with perl < 5.8.8 due to the Perl::Critic dependency in P::MV ≥ 1.21 * Mon Apr 6 2009 Paul Howarth - 1.20-1 - Update to 1.20 - BR: perl(Test::CPAN::Meta) ≥ 0.12 - Update to SLES-compatible dist tag macros * Mon Sep 15 2008 Paul Howarth - 1.19-1 - Update to 1.19 - Update version requirements for File::Find::Rule (0.30), PPI (1.201) - Add buildreq perl(ExtUtils::MakeMaker) - Add buildreq perl(File::Find::Rule::Perl) ≥ 1.04 - Add buildreq perl(Params::Util), unversioned for old distribution support - Add buildreq perl(Test::MinimumVersion) - yes, a circular dep :-( * Mon Sep 1 2008 Paul Howarth - 1.18-2 - Import from Fedora - Drop version requirement for perl(List::Util) to support building on older distributions * Mon Aug 25 2008 Ralf Corsépius - 1.18-1 - Upstream update * Wed Feb 27 2008 Tom "spot" Callaway - 0.15-5 - Rebuild for perl 5.10 (again) * Sun Jan 13 2008 Tom "spot" Callaway 0.15-4 - Correct List::Util version, perl 5.10.0 has 1.19 * Fri Jan 11 2008 Tom "spot" Callaway 0.15-3 - Rebuild for new perl * Thu Jan 10 2008 Ralf Corsépius - 0.15.2 - Use unversioned BR: perl(version) to circumvent perl vs. rpm versioning conflicts * Tue Nov 20 2007 Ralf Corsépius - 0.15-1 - Initial version