commit eacfd23b98d828a00d81106b1a73adb80f25f052 Author: Paul Howarth <paul@xxxxxxxxxxxx> Date: Thu Jan 12 01:28:10 2012 +0000 Spec clean-up - Nobody else likes macros for commands - Use DESTDIR rather than PERL_INSTALL_ROOT - Use %{_fixperms} macro rather than our own chmod incantation - Update provides filter to work with rpm ≥ 4.9 perl-File-Comments.spec | 50 ++++++++++++++++++++++++++++++---------------- 1 files changed, 32 insertions(+), 18 deletions(-) --- diff --git a/perl-File-Comments.spec b/perl-File-Comments.spec index d33402f..46e05ac 100644 --- a/perl-File-Comments.spec +++ b/perl-File-Comments.spec @@ -1,13 +1,15 @@ +# Need to tweak provides filter differently if we have rpm 4.9 onwards +%global rpm49 %(rpm --version | perl -pi -e 's/^.* (\\d+)\\.(\\d+)\\.(\\d+).*/sprintf("%d.%03d%03d",$1,$2,$3) ge 4.009 ? 1 : 0/e') + Summary: Recognizes file formats and extracts format-specific comments Name: perl-File-Comments Version: 0.08 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL+ or Artistic Group: Development/Libraries Url: http://search.cpan.org/dist/File-Comments/ Source0: http://search.cpan.org/CPAN/authors/id/M/MS/MSCHILLI/File-Comments-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch BuildRequires: perl(Archive::Tar) >= 1.22 BuildRequires: perl(ExtUtils::MakeMaker) @@ -21,6 +23,7 @@ BuildRequires: perl(Sysadm::Install) >= 0.11 # For test suite BuildRequires: perl(Test::More) # Runtime requirements not automatically picked up +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(HTML::TreeBuilder) Requires: perl(Module::Pluggable) >= 2.4 Requires: perl(Pod::Parser) >= 1.14 @@ -43,25 +46,29 @@ JavaScript, Python and PHP. # are not satisfied by packages that are already required) # Remove provide for local package not in regular search path -%global provfilt /bin/sh -c "%{__perl_provides} | %{__grep} -Fvx 'perl(PodExtractor)'" +%if %{rpm49} +%global __provides_exclude ^perl\\(PodExtractor\\) +%else +%global provfilt /bin/sh -c "%{__perl_provides} | grep -Fvx 'perl(PodExtractor)'" %define __perl_provides %{provfilt} +%endif %build -%{__perl} Makefile.PL INSTALLDIRS=vendor -%{__make} %{?_smp_mflags} - -%check -%{__make} test TEST_VERBOSE=1 +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} %install -%{__rm} -rf %{buildroot} -%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot} -/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';' -/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} ';' 2>/dev/null -%{__chmod} -R u+w %{buildroot} +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 TEST_VERBOSE=1 %clean -%{__rm} -rf %{buildroot} +rm -rf %{buildroot} %files %defattr(-,root,root,-) @@ -80,14 +87,21 @@ JavaScript, Python and PHP. %{_mandir}/man3/File::Comments::Plugin::Shell.3pm* %changelog +* Thu Jan 12 2012 Paul Howarth <paul@xxxxxxxxxxxx> - 0.08-5 +- Spec clean-up: + - Nobody else likes macros for commands + - Use DESTDIR rather than PERL_INSTALL_ROOT + - Use %%{_fixperms} macro rather than our own chmod incantation + - Update provides filter to work with rpm ≥ 4.9 + * Tue Jul 19 2011 Petr Sabata <contyk@xxxxxxxxxx> - 0.08-4 - Perl mass rebuild -* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 0.08-3 +* Tue Feb 8 2011 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 0.08-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Dec 16 2010 Marcela Maslanova <mmaslano@xxxxxxxxxx> - 0.08-2 -- 661697 rebuild for fixing problems with vendorach/lib +- Rebuild to fix problems with vendorarch/lib (#661697) * Fri Dec 10 2010 Paul Howarth <paul@xxxxxxxxxxxx> - 0.08-1 - Update to 0.08 @@ -102,7 +116,7 @@ JavaScript, Python and PHP. - Mass rebuild with perl-5.12.0 * Mon Dec 7 2009 Stepan Kasal <skasal@xxxxxxxxxx> - 0.07-5 -- rebuild against perl 5.10.1 +- Rebuild against perl 5.10.1 * Fri Sep 18 2009 Paul Howarth <paul@xxxxxxxxxxxx> 0.07-4 - Add runtime dependencies not determined automatically by RPM -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel