From e320d7c7372c1641a29f0c1e8867224afcd0815d Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Thu, 19 Jan 2012 15:24:39 +0000 Subject: [PATCH] Spec clean-up - Reinstate compatibility with older distributions like EL-5 - Run release tests as well as the regular test suite - BR: perl(Test::CPAN::Meta) and perl(Test::More) - Only drop perl(Test::MinimumVersion) as a buildreq when bootstrapping, and add a comment about why that's needed - Use DESTDIR rather than PERL_INSTALL_ROOT - Don't use macros for commands - Make %files list more explicit - No longer need to fix permissions of Tiny.pm - Use tabs --- .gitignore | 3 +- perl-Config-Tiny.spec | 146 +++++++++++++++++++++++------------------- 2 files changed, 81 insertions(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index 298aaaf..4feb901 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -Config-Tiny-2.12.tar.gz -/Config-Tiny-2.14.tar.gz +/Config-Tiny-[0-9.]*.tar.gz diff --git a/perl-Config-Tiny.spec b/perl-Config-Tiny.spec index 7067932..a8800f0 100644 --- a/perl-Config-Tiny.spec +++ b/perl-Config-Tiny.spec @@ -1,80 +1,94 @@ -Name: perl-Config-Tiny -Version: 2.14 -Release: 2%{?dist} -Summary: Perl module for reading and writing .ini style configuration files - -Group: Development/Libraries -License: GPL+ or Artistic -URL: http://search.cpan.org/dist/Config-Tiny/ -Source0: http://www.cpan.org/authors/id/A/AD/ADAMK/Config-Tiny-%{version}.tar.gz - -BuildArch: noarch -BuildRequires: perl(ExtUtils::MakeMaker) -%if !%{defined perl_bootstrap} -BuildRequires: perl(Test::Pod) -BuildRequires: perl(Test::MinimumVersion) +Name: perl-Config-Tiny +Version: 2.14 +Release: 3%{?dist} +Summary: Perl module for reading and writing .ini style configuration files +Group: Development/Libraries +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/Config-Tiny/ +Source0: http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Config-Tiny-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) +BuildArch: noarch +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::CPAN::Meta) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Pod) +# Test::MinimumVersion -> Perl::MinimumVersion -> Perl::Critic -> Config::Tiny +%if 0%{!?perl_bootstrap:1} +# Test::MinimumVersion not available for EPEL < 6 +%if "%{rhel}" != "4" && "%{rhel}" != "5" +BuildRequires: perl(Test::MinimumVersion) %endif -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +%endif +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description Config::Tiny is a Perl module designed for reading and writing .ini style configuration files. It is designed for simplicity and ease of use, and thus only supports the most basic operations. - %prep %setup -q -n Config-Tiny-%{version} -chmod a-x Changes lib/Config/Tiny.pm - %build -%{__perl} Makefile.PL INSTALLDIRS=vendor +perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} - %install -make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT -find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' -find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' -%{_fixperms} $RPM_BUILD_ROOT/* - +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 -%if !%{defined perl_bootstrap} -make test AUTOMATED_TESTING=1 -%endif +make test +make test TEST_FILES="xt/*.t" AUTOMATED_TESTING=1 +%clean +rm -rf %{buildroot} %files +%defattr(-,root,root,-) %doc Changes LICENSE README %{perl_vendorlib}/Config/ -%{_mandir}/man3/*.3pm* - +%{_mandir}/man3/Config::Tiny.3pm* %changelog +* Thu Jan 19 2012 Paul Howarth - 2.14-3 +- Reinstate compatibility with older distributions like EL-5 +- Run release tests as well as the regular test suite +- BR: perl(Test::CPAN::Meta) and perl(Test::More) +- Only drop perl(Test::MinimumVersion) as a buildreq when bootstrapping, and + add a comment about why that's needed +- Use DESTDIR rather than PERL_INSTALL_ROOT +- Don't use macros for commands +- Make %%files list more explicit +- No longer need to fix permissions of Tiny.pm +- Use tabs + * Fri Jan 13 2012 Fedora Release Engineering - 2.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild -* Sun Oct 02 2011 Iain Arnell 2.14-1 -- update to latest upstream version -- clean up spec for modern rpmbuild +* Sun Oct 02 2011 Iain Arnell - 2.14-1 +- Update to latest upstream version +- Clean up spec for modern rpmbuild * Tue Jun 28 2011 Marcela Mašláňová - 2.12-12 -- rebuild with Perl 5.14.1 -- use perl_bootstrap macro -- add missing BR ExtUtils::MakeMaker +- Rebuild with Perl 5.14.1 +- Use perl_bootstrap macro +- Add missing BR ExtUtils::MakeMaker * Tue Feb 08 2011 Fedora Release Engineering - 2.12-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Dec 15 2010 Marcela Maslanova - 2.12-10 -- 661697 rebuild for fixing problems with vendorach/lib +- Rebuild to fix problems with vendorarch/lib (#661697) * Fri Apr 30 2010 Marcela Maslanova - 2.12-9 - Mass rebuild with perl-5.12.0 * Fri Dec 4 2009 Stepan Kasal - 2.12-8 -- rebuild against perl 5.10.1 +- Rebuild against perl 5.10.1 * Sat Jul 25 2009 Fedora Release Engineering - 2.12-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild @@ -89,78 +103,78 @@ make test AUTOMATED_TESTING=1 - Rebuild for perl 5.10 (again), first pass * Mon Jan 14 2008 Tom "spot" Callaway - 2.12-3 -- rebuild normally, second pass +- Rebuild normally, second pass * Sun Jan 13 2008 Tom "spot" Callaway - 2.12-2.1 -- rebuild with TMV, tests disabled for first pass +- Rebuild with TMV, tests disabled for first pass * Fri Jan 11 2008 Tom "spot" Callaway - 2.12-2 - Rebuild for new perl * Thu Dec 13 2007 Ralf Corsépius - 2.12-1 -- Update to 2.12. +- Update to 2.12 * Mon Oct 2 2006 Jose Pedro Oliveira - 2.10-1 -- Updated to 2.10. +- Updated to 2.10 * Sun Jul 16 2006 Jose Pedro Oliveira - 2.08-1 -- Updated to 2.08. +- Updated to 2.08 * Wed May 10 2006 Jose Pedro Oliveira - 2.07-1 -- Updated to 2.07. +- Updated to 2.07 * Sat Apr 22 2006 Jose Pedro Oliveira - 2.06-1 -- Updated to 2.06. +- Updated to 2.06 * Mon Mar 6 2006 Jose Pedro Oliveira - 2.05-1 -- Updated to 2.05. +- Updated to 2.05 * Sat Feb 18 2006 Jose Pedro Oliveira - 2.04-2 -- Rebuild for FC5 (perl 5.8.8). +- Rebuild for FC5 (perl 5.8.8) * Sat Jan 28 2006 Jose Pedro Oliveira - 2.04-1 -- Updated to 2.04. +- Updated to 2.04 * Fri Dec 30 2005 Jose Pedro Oliveira - 2.03-1 -- Updated to 2.03. +- Updated to 2.03 * Mon Jun 27 2005 Jose Pedro Oliveira - 2.02-1 -- Updated to 2.02. +- Updated to 2.02 * Fri Apr 7 2005 Michael Schwendt - 2.01-2 -- rebuilt +- Rebuilt * Thu Mar 24 2005 Jose Pedro Oliveira - 2.01-1 -- Updated to 2.01. +- Updated to 2.01 * Sun Jul 25 2004 Marius L. Jøhndal - 0:2.00-0.fdr.1 -- Updated to 2.00. +- Updated to 2.00 * Sat Jul 10 2004 Marius L. Jøhndal - 0:1.9-0.fdr.1 -- Updated to 1.9. +- Updated to 1.9 * Fri Jul 2 2004 Marius L. Jøhndal - 0:1.8-0.fdr.1 -- Updated to 1.8. +- Updated to 1.8 * Tue Jun 29 2004 Marius L. Jøhndal - 0:1.7-0.fdr.1 -- Updated to 1.7. +- Updated to 1.7 * Sat Jun 5 2004 Marius L. Jøhndal - 0:1.6-0.fdr.3 -- Changed URL to canonical location (bug 1140). -- Added build req perl >= 1:5.6.1 and perl(Test::More) (bug 1140). -- Added missing req perl(:MODULE_COMPAT_...) (bug 1140). -- Updated to match most recent perl spec template (bug 1140). -- Removed unneeded optimization settings and find *.bs (bug 1140). +- Changed URL to canonical location (bug 1140) +- Added build req perl >= 1:5.6.1 and perl(Test::More) (bug 1140) +- Added missing req perl(:MODULE_COMPAT_...) (bug 1140) +- Updated to match most recent perl spec template (bug 1140) +- Removed unneeded optimization settings and find *.bs (bug 1140) * Thu Mar 18 2004 Marius L. Jøhndal - 0:1.6-0.fdr.2 -- Reduced directory ownership bloat. +- Reduced directory ownership bloat * Thu Mar 11 2004 Marius L. Jøhndal - 0:1.6-0.fdr.1 -- Updated to 1.6. +- Updated to 1.6 * Wed Jan 7 2004 Marius L. Jøhndal 0:1.5-0.fdr.1 -- Updated to 1.5. +- Updated to 1.5 * Sat Dec 13 2003 Marius L. Jøhndal 0:1.3-0.fdr.1 -- Initial RPM release. +- Initial RPM release