# 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-Array-Compare Version: 1.18 Release: 4.%{__distinit}%{__distvers} Summary: Perl extension for comparing arrays Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/Array-Compare/ Source0: http://search.cpan.org/CPAN/authors/id/D/DA/DAVECROSS/Array-Compare-%{version}.tar.gz Patch0: perl-Array-Compare-1.18-build.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod::Coverage) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description If you have two arrays and you want to know if they are the same or different, then Array::Compare will be useful to you. %prep %setup -q -n Array-Compare-%{version} chmod -c -x lib/Array/Compare.pm # "make" tries to use Build.PL on perl 5.8.6 or older (FC4 and older), and fails horribly. # This appears to be due to a change in the way recent Module::Build versions create # Makefile.PL, omitting an empty PL_FILES section. %if %(perl -e 'print $] > 5.008006 ? 0 : 1;') %patch0 -p1 %endif %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 %{_fixperms} %{buildroot} %check make test %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc Changes README %{perl_vendorlib}/Array/ %{_mandir}/man3/Array::Compare.3pm* %changelog * Thu Oct 6 2011 Paul Howarth 1.18-4 - Fix dist tag for CentOS 6 and Scientific Linux - Nobody else likes macros for commands * Thu Jun 3 2010 Paul Howarth 1.18-3 - Fix dist tag for RHEL-6 Beta * Fri Feb 26 2010 Paul Howarth 1.18-2 - Dist tag for Rawhide no longer needs special-casing - Use %%{_fixperms} macro instead of our own %%{__chmod} incantation * Mon Jun 15 2009 Paul Howarth 1.18-1 - Update to 1.18 (fix uninitialized variable in simple_compare - RT#45145) - Update to SLES-compatible dist tag macros - Add patch to fix builds on old perls * Fri Dec 19 2008 Paul Howarth 1.17-1 - Update to 1.17 * Mon Jun 30 2008 Paul Howarth 1.16-1 - Update to 1.16 - Tweak dist tag macros to work on current Rawhide with three-part releasenum * Fri Mar 7 2008 Paul Howarth 1.15-1 - Update to 1.15 - Clarify license as GPL version 1 or later, or Artistic (i.e. same as perl) - Use ExtUtils::MakeMaker instead of Module::Build (works better on RHL9) * Mon Apr 2 2007 Paul Howarth 1.14-1 - Update to 1.14 - Fix dist tag for Fedora 7 onwards - Fix permissions of installed perl module * Fri Sep 1 2006 Paul Howarth 1.13-2 - Fix distribution tags for development releases - Define %%{__id_u} in a more portable way - Remove buildroot unconditionally in %%clean and %%install - Use search.cpan.org download URL * Tue Oct 4 2005 Paul Howarth 1.13-1 - Update to 1.13 * Fri Aug 26 2005 Paul Howarth 1.12-4 - Import from Fedora Extras * Fri Jul 1 2005 Jose Pedro Oliveira 1.12-3 - Dist tag. * Wed Apr 20 2005 Jose Pedro Oliveira 0:1.12-0.fdr.2 - Avoid .packlist creation with Module::Build >= 0.2609. * Tue Mar 1 2005 Jose Pedro Oliveira 0:1.12-0.fdr.1 - Update to 1.12. * Fri Nov 5 2004 Jose Pedro Oliveira 0:1.11-0.fdr.1 - Update to 1.11. * Sun Jul 04 2004 Jose Pedro Oliveira 0:1.09-0.fdr.1 - First build.