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
This commit is contained in:
parent
b1a9567e74
commit
3d8ee9c6fb
|
@ -1,2 +1 @@
|
|||
Sub-Install-0.925.tar.gz
|
||||
/Sub-Install-0.926.tar.gz
|
||||
/Sub-Install-[0-9.]*.tar.gz
|
||||
|
|
|
@ -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@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@redhat.com> - 0.926-5
|
||||
- Specify all dependencies
|
||||
|
||||
|
|
Loading…
Reference in New Issue