[perl-Sub-Install] Spec clean-up
Paul Howarth
pghmcfc at fedoraproject.org
Thu Aug 23 10:18:52 UTC 2012
commit 3d8ee9c6fbce3d796fb7b024e0920c13b4d5190c
Author: Paul Howarth <paul at city-fan.org>
Date: Thu Aug 23 11:06:19 2012 +0100
Spec clean-up
- Be more selective about what to exclude when bootstrapping
- Don't use macros for commands
- Drop %defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
- Make %files list more explicit
- Fix typo in %description
.gitignore | 3 +-
perl-Sub-Install.spec | 54 ++++++++++++++++++++++++++----------------------
2 files changed, 30 insertions(+), 27 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c2ebbaf..8486097 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-Sub-Install-0.925.tar.gz
-/Sub-Install-0.926.tar.gz
+/Sub-Install-[0-9.]*.tar.gz
diff --git a/perl-Sub-Install.spec b/perl-Sub-Install.spec
index ede937e..4dd36c8 100644
--- a/perl-Sub-Install.spec
+++ b/perl-Sub-Install.spec
@@ -1,67 +1,71 @@
Name: perl-Sub-Install
Version: 0.926
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Install subroutines into packages easily
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Sub-Install/
Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Sub-Install-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
+# ================= Module Build ============================
BuildRequires: perl(ExtUtils::MakeMaker)
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-%if !%{defined perl_bootstrap}
-# Run-time:
+# ================= Run-time ================================
BuildRequires: perl(Carp)
BuildRequires: perl(Scalar::Util)
-# Tests:
+# ================= Test Suite ==============================
BuildRequires: perl(Test::More)
+%if !%{defined perl_bootstrap}
+# Test::Output -> Sub::Exporter -> Sub::Install
+BuildRequires: perl(Test::Output)
+# Test::Perl::Critic -> Perl::Critic -> Exception::Class ->
+# Test::EOL -> Pod::Coverage::TrustPod -> Pod::Eventual ->
+# Mixin::Linewise -> Sub::Exporter -> Sub::Install
BuildRequires: perl(Test::Perl::Critic)
+%endif
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
-%endif
+# ================= Run-time ================================
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description
This module makes it easy to install subroutines into packages without the
-unslightly mess of no strict or typeglobs lying about where just anyone
+unsightly mess of no strict or typeglobs lying about where just anyone
can see them.
%prep
%setup -q -n Sub-Install-%{version}
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
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}/*
+%{_fixperms} %{buildroot}
%check
-# you'll note a number of tests are skipped due to Test::Output not being
-# present. However, Test::Output requires Sub::Exporter which requires...
-# Sub::Install. Holy circular loop, Batman! :)
-%if !%{defined perl_bootstrap}
-PERL_TEST_CRITIC=1 make test
-%endif
+make test %{!?perl_bootstrap:PERL_TEST_CRITIC=1}
%clean
rm -rf %{buildroot}
%files
-%defattr(-,root,root,-)
-%doc Changes README LICENSE
-%{perl_vendorlib}/*
-%{_mandir}/man3/*
+%doc Changes LICENSE README
+%{perl_vendorlib}/Sub/
+%{_mandir}/man3/Sub::Install.3pm*
%changelog
+* Thu Aug 23 2012 Paul Howarth <paul at city-fan.org> - 0.926-6
+- Be more selective about what to exclude when bootstrapping
+- Don't use macros for commands
+- Drop %%defattr, redundant since rpm 4.4
+- Don't need to remove empty directories from the buildroot
+- Make %%files list more explicit
+- Fix typo in %%description
+
* Mon Aug 20 2012 Petr Pisar <ppisar at redhat.com> - 0.926-5
- Specify all dependencies
More information about the perl-devel
mailing list