[perl-Spiffy] Modernize spec file

Petr Pisar ppisar at fedoraproject.org
Mon Oct 29 12:34:55 UTC 2012


commit 5038e3ad8f8bf3326950462dbb381fa7013ca38e
Author: Petr Písař <ppisar at redhat.com>
Date:   Mon Oct 29 13:33:19 2012 +0100

    Modernize spec file

 perl-Spiffy.spec |   29 ++++++++---------------------
 1 files changed, 8 insertions(+), 21 deletions(-)
---
diff --git a/perl-Spiffy.spec b/perl-Spiffy.spec
index fb85d33..a9e1a84 100644
--- a/perl-Spiffy.spec
+++ b/perl-Spiffy.spec
@@ -6,7 +6,6 @@ License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Spiffy/
 Source0:        http://www.cpan.org/authors/id/I/IN/INGY/Spiffy-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  perl(Cwd)
 BuildRequires:  perl(File::Find)
@@ -29,19 +28,15 @@ Requires:       perl(Filter::Util::Call)
 Requires:       perl(Scalar::Util)
 Requires:       perl(YAML)
 
-# Filter bogus provide of perl(DB) (rpm < 4.9)
-%global provfilt /bin/sh -c "%{__perl_provides} | sed -e '/^perl(DB)$/d'"
-%define __perl_provides %{provfilt}
-
-# Equivalent filter for rpm 4.9 onwards
-%global __provides_exclude ^perl\\(DB\\)
+# Filter bogus provide of perl(DB)
+%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(DB\\)
 
 %description
 "Spiffy" is a framework and methodology for doing object oriented (OO)
-programming in Perl. Spiffy combines the best parts of Exporter.pm,
-base.pm, mixin.pm and SUPER.pm into one magic foundation class. It attempts
-to fix all the nits and warts of traditional Perl OO, in a clean,
-straightforward and (perhaps someday) standard way.
+programming in Perl. Spiffy combines the best parts of Exporter.pm, base.pm,
+mixin.pm and SUPER.pm into one magic foundation class. It attempts to fix all
+the nits and warts of traditional Perl OO, in a clean, straightforward and
+(perhaps someday) standard way.
 
 %prep
 %setup -q -n Spiffy-%{version}
@@ -51,23 +46,14 @@ straightforward and (perhaps someday) standard way.
 make %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
-make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
-
+make pure_install DESTDIR=$RPM_BUILD_ROOT
 find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
-
 %{_fixperms} $RPM_BUILD_ROOT/*
 
 %check
 make test
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
-%defattr(-,root,root,-)
 %doc Changes README
 %{perl_vendorlib}/Spiffy*
 %{_mandir}/man3/Spiffy.3pm*
@@ -75,6 +61,7 @@ rm -rf $RPM_BUILD_ROOT
 %changelog
 * Mon Oct 29 2012 Petr Pisar <ppisar at redhat.com> - 0.31-1
 - 0.31 bump
+- Modernize spec file
 
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.30-20
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild


More information about the scm-commits mailing list