[perl-Guard/epel7] Spec tidy-up

Paul Howarth pghmcfc at fedoraproject.org
Mon Feb 17 17:42:42 UTC 2014


commit 96be09fac67fdd3a028025f7adc84046e68fbbdd
Author: Paul Howarth <paul at city-fan.org>
Date:   Mon Feb 17 17:39:10 2014 +0000

    Spec tidy-up
    
    - Specify all dependencies
    - Drop %defattr, redundant since rpm 4.4
    - Make %files list more explicit
    - Use DESTDIR rather than PERL_INSTALL_ROOT
    - Don't need to remove empty directories from the buildroot
    - Don't use macros for commands

 perl-Guard.spec |   45 +++++++++++++++++++++++++--------------------
 1 files changed, 25 insertions(+), 20 deletions(-)
---
diff --git a/perl-Guard.spec b/perl-Guard.spec
index 2b5985b..4f1e66a 100644
--- a/perl-Guard.spec
+++ b/perl-Guard.spec
@@ -1,14 +1,16 @@
 Name:           perl-Guard
 Version:        1.022
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Safe cleanup blocks
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Guard/
 Source0:        http://www.cpan.org/authors/id/M/ML/MLEHMANN/Guard-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildRequires:  perl(Exporter)
 BuildRequires:  perl(ExtUtils::MakeMaker)
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+BuildRequires:  perl(XSLoader)
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
 %description
 This module implements so-called "guards". A guard is something
@@ -19,34 +21,37 @@ cleaned up when expected.
 %setup -q -n Guard-%{version}
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
 make %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
-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 f -name '*.bs' -size 0 -exec rm -f {} \;
-find $RPM_BUILD_ROOT -depth -type d -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} -type f -name '*.bs' -size 0 -exec rm -f {} ';'
+%{_fixperms} %{buildroot}
 
 %check
 make test
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
 %files
-%defattr(-,root,root,-)
 %doc Changes COPYING README
-%{perl_vendorarch}/auto/*
-%{perl_vendorarch}/Guard*
-%{_mandir}/man3/*
+%{perl_vendorarch}/auto/Guard/
+%{perl_vendorarch}/Guard.pm
+%{_mandir}/man3/Guard.3pm*
 
 %changelog
+* Mon Feb 17 2014 Paul Howarth <paul at city-fan.org> - 1.022-7
+- Specify all dependencies
+- Drop %%defattr, redundant since rpm 4.4
+- Make %%files list more explicit
+- Use DESTDIR rather than PERL_INSTALL_ROOT
+- Don't need to remove empty directories from the buildroot
+- Don't use macros for commands
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.022-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
@@ -72,13 +77,13 @@ rm -rf $RPM_BUILD_ROOT
 - Perl mass rebuild
 
 * Fri Dec 17 2010 Marcela Maslanova <mmaslano at redhat.com> - 1.021-4
-- 661697 rebuild for fixing problems with vendorach/lib
+- Rebuild to fix problems with vendorarch/lib (#661697)
 
 * Sun May 02 2010 Marcela Maslanova <mmaslano at redhat.com> - 1.021-3
 - Mass rebuild with perl-5.12.0
 
 * Mon Dec  7 2009 Stepan Kasal <skasal at redhat.com> - 1.021-2
-- rebuild against perl 5.10.1
+- Rebuild against perl 5.10.1
 
 * Sun Nov 08 2009 Nicolas Chuavet <kwizart at fedoraproject.org> - 1.021-1
 - Specfile autogenerated by cpanspec 1.78.



More information about the perl-devel mailing list