[perl-Business-ISBN-Data] Spec clean-up

Paul Howarth pghmcfc at fedoraproject.org
Fri Jan 20 14:17:53 UTC 2012


commit fd308c3b76e1a32eab0c1875148b0d6b4c6edef8
Author: Paul Howarth <paul at city-fan.org>
Date:   Fri Jan 20 14:16:59 2012 +0000

    Spec clean-up
    
    - Clean up for modern rpmbuild:
      - Drop BuildRoot specification
      - Drop %clean section
      - Don't bother cleaning buildroot in %install section
      - Make %files list more explicit
      - Use DESTDIR rather than PERL_INSTALL_ROOT
      - Use %{_fixperms} macro rather than our own chmod incantation
      - Replace provides filter with version that works with rpm ≥ 4.9
    - Include tests as %doc since they're referred to by examples/README

 .gitignore                   |    2 +-
 perl-Business-ISBN-Data.spec |   60 ++++++++++++++++-------------------------
 2 files changed, 25 insertions(+), 37 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5916175..31b93b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-Business-ISBN-Data-20081208.tar.gz
+/Business-ISBN-Data-[0-9.]*.tar.gz
diff --git a/perl-Business-ISBN-Data.spec b/perl-Business-ISBN-Data.spec
index 401dc24..bed6aa7 100644
--- a/perl-Business-ISBN-Data.spec
+++ b/perl-Business-ISBN-Data.spec
@@ -1,72 +1,60 @@
 Name:           perl-Business-ISBN-Data
 Version:        20081208
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        The data pack for Business::ISBN
-
 Group:          Development/Libraries
 License:        GPL+ or Artistic
 URL:            http://search.cpan.org/dist/Business-ISBN-Data/
 Source0:        http://search.cpan.org/CPAN/authors/id/B/BD/BDFOY/Business-ISBN-Data-%{version}.tar.gz
-BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-
 BuildArch:      noarch
-
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  perl(Test::More)
 BuildRequires:  perl(Test::Pod)
 BuildRequires:  perl(Test::Pod::Coverage)
 BuildRequires:  perl(Test::Prereq)
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+
+# Remove bogus provide of perl(Business::ISBN)
+%global __provides_exclude ^perl\\(Business::ISBN\\)$
 
 %description
 This is a data pack for Business::ISBN.  You can update
 the ISBN data without changing the version of Business::ISBN.
 Most of the interesting stuff is in Business::ISBN.
 
-
 %prep
 %setup -q -n Business-ISBN-Data-%{version}
 
-# Filter unwanted Provides:
-cat << \EOF > %{name}-prov
-#!/bin/sh
-%{__perl_provides} $* |\
-  sed -e '/perl(Business::ISBN)/d'
-EOF
-
-%define __perl_provides %{_builddir}/Business-ISBN-Data-%{version}/%{name}-prov
-chmod +x %{__perl_provides}
-
-
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
 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 -depth -type d -exec rmdir {} 2>/dev/null ';'
-chmod -R u+w $RPM_BUILD_ROOT/*
-
+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
 
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %files
-%defattr(-,root,root,-)
-%doc Changes README LICENSE examples/
-%{perl_vendorlib}/*
-%{_mandir}/man3/*.3*
-
+%doc Changes README LICENSE examples/ t/
+%{perl_vendorlib}/Business/
+%{_mandir}/man3/Business::ISBN::Data.3*
 
 %changelog
+* Fri Jan 20 2012 Paul Howarth <paul at city-fan.org> - 20081208-8
+- Clean up for modern rpmbuild:
+  - Drop BuildRoot specification
+  - Drop %%clean section
+  - Don't bother cleaning buildroot in %%install section
+  - Make %%files list more explicit
+  - Use DESTDIR rather than PERL_INSTALL_ROOT
+  - Use %%{_fixperms} macro rather than our own chmod incantation
+  - Replace provides filter with version that works with rpm ≥ 4.9
+- Include tests as %%doc since they're referred to by examples/README
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 20081208-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 



More information about the perl-devel mailing list