[perl-Test-Unit-Lite/el6] Tidy-up

Paul Howarth pghmcfc at fedoraproject.org
Sat Sep 24 18:35:58 UTC 2011


commit e6b2bf0145bf76a0cd820c01d6beddb40ee19579
Author: Paul Howarth <paul at city-fan.org>
Date:   Sat Sep 24 19:34:42 2011 +0100

    Tidy-up
    
    - BR: perl(Carp) and perl(Cwd)
    - Make %files list more explicit
    - Reduce requires filtering to what's actually needed
    - Don't use macros for commands

 perl-Test-Unit-Lite.spec |   68 +++++++++++++++++++++++++---------------------
 1 files changed, 37 insertions(+), 31 deletions(-)
---
diff --git a/perl-Test-Unit-Lite.spec b/perl-Test-Unit-Lite.spec
index 6100f7a..764d7aa 100644
--- a/perl-Test-Unit-Lite.spec
+++ b/perl-Test-Unit-Lite.spec
@@ -1,62 +1,68 @@
-Name:           perl-Test-Unit-Lite
-Epoch:          1
-Version:        0.12
-Release:        9%{?dist}
-Summary:        Unit testing without external dependencies
-License:        GPL+ or Artistic
-Group:          Development/Libraries
-URL:            http://search.cpan.org/dist/Test-Unit-Lite/
-Source0:        http://search.cpan.org/CPAN/authors/id/D/DE/DEXTER/Test-Unit-Lite-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch:      noarch
-BuildRequires:  perl(Module::Build)
-BuildRequires:  perl(Taint::Runtime)
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-# Filter unwanted provides (rpm 4.9 onwards)
-%global private_symbols ^perl\\(Test::Unit::(Debug|HarnessUnit|Result|TestCase|TestRunner|TestSuite)\\)$
-%global __provides_exclude %private_symbols
-%global __requires_exclude %private_symbols
+Name:		perl-Test-Unit-Lite
+Epoch:		1
+Version:	0.12
+Release:	10%{?dist}
+Summary:	Unit testing without external dependencies
+License:	GPL+ or Artistic
+Group:		Development/Libraries
+URL:		http://search.cpan.org/dist/Test-Unit-Lite/
+Source0:	http://search.cpan.org/CPAN/authors/id/D/DE/DEXTER/Test-Unit-Lite-%{version}.tar.gz
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildArch:	noarch
+BuildRequires:	perl(Carp)
+BuildRequires:	perl(Cwd)
+BuildRequires:	perl(Module::Build)
+BuildRequires:	perl(Taint::Runtime)
+Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+
+# Filter unwanted provides and requires (rpm 4.9 onwards)
+%global __provides_exclude ^perl\\(Test::Unit::(Debug|HarnessUnit|Result|TestCase|TestRunner|TestSuite)\\)$
+%global __requires_exclude ^perl\\(Test::Unit::Test(Runner|Suite)\\)
 
 %description
-This framework provides lighter version of Test::Unit framework. It
+This framework provides a lighter version of Test::Unit framework. It
 implements some of the Test::Unit classes and methods needed to run test
-units. The Test::Unit::Lite tries to be compatible with public API of
+units. Test::Unit::Lite tries to be compatible with public API of
 Test::Unit. It doesn't implement all classes and methods at 100% and only
 those necessary to run tests are available.
 
 %prep
 %setup -q -n Test-Unit-Lite-%{version}
 
-# Filter unwanted provides (prior to rpm 4.9)
+# Filter unwanted provides and (prior to rpm 4.9)
+# Unwanted requires not actually detected prior to rpm 4.9
 %global provfilt /bin/sh -c "%{__perl_provides} | grep -Evx 'perl\\(Test::Unit::(Debug|HarnessUnit|Result|TestCase|TestRunner|TestSuite)\\)'"
 %define __perl_provides %{provfilt}
 
 %build
-%{__perl} Build.PL installdirs=vendor
+perl Build.PL installdirs=vendor
 ./Build
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
-./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
-
-%{_fixperms} $RPM_BUILD_ROOT/*
+rm -rf %{buildroot}
+./Build install destdir=%{buildroot} create_packlist=0
+find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
+%{_fixperms} %{buildroot}
 
 %check
 ./Build test
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
 %doc Changes LICENSE README
-%{perl_vendorlib}/*
-%{_mandir}/man3/*
+%{perl_vendorlib}/Test/
+%{_mandir}/man3/Test::Unit::Lite.3pm*
 
 %changelog
+* Sat Sep 24 2011 Paul Howarth <paul at city-fan.org> - 1:0.12-10
+- BR: perl(Carp) and perl(Cwd)
+- Make %%files list more explicit
+- Reduce requires filtering to what's actually needed
+- Don't use macros for commands
+
 * Wed Jun 22 2011 Petr Pisar <ppisar at redhat.com> - 1:0.12-9
 - Do not require private modules
 



More information about the perl-devel mailing list