Spec tidy-up

- Use author-independent source URL
- Enhance %description
- Fix permissions verbosely
- Make %files list more explicit
epel9
Paul Howarth 5 years ago
parent a7804a388f
commit f25d322066

@ -0,0 +1,3 @@
from Config import *
addFilter("spelling-error %description -l en_US unmock -> ")

@ -7,12 +7,13 @@
Name: perl-Test-MockModule Name: perl-Test-MockModule
Version: 0.170.0 Version: 0.170.0
Release: 4%{?dist} Release: 5%{?dist}
Summary: Override subroutines in a module for unit testing Summary: Override subroutines in a module for unit testing
License: GPL+ or Artistic License: GPL+ or Artistic
URL: https://metacpan.org/release/Test-MockModule URL: https://metacpan.org/release/Test-MockModule
Source0: https://cpan.metacpan.org/authors/id/G/GF/GFRANKS/Test-MockModule-v%{version}.tar.gz Source0: https://cpan.metacpan.org/modules/by-module/Test/Test-MockModule-v%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
# Build:
BuildRequires: coreutils BuildRequires: coreutils
BuildRequires: perl-generators BuildRequires: perl-generators
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
@ -26,39 +27,54 @@ BuildRequires: perl(SUPER)
BuildRequires: perl(vars) BuildRequires: perl(vars)
# Tests: # Tests:
BuildRequires: perl(lib) BuildRequires: perl(lib)
BuildRequires: perl(Test::More) BuildRequires: perl(parent)
BuildRequires: perl(Test::Warnings) BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Test::Warnings)
%if %{with perl_Test_MockModule_enables_optional_test} %if %{with perl_Test_MockModule_enables_optional_test}
# Optional tests: # Optional tests:
BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(Test::Pod::Coverage) >= 1.00 BuildRequires: perl(Test::Pod::Coverage) >= 1.00
%endif %endif
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) # Dependencies:
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description %description
%{summary}. Test::MockModule lets you temporarily redefine subroutines in other packages
for the purposes of unit testing.
A Test::MockModule object is set up to mock subroutines for a given module. The
object remembers the original subroutine so it can easily be restored. This
happens automatically when all MockModule objects for the given module go out
of scope, or when you unmock() the subroutine.
%prep %prep
%setup -q -n Test-MockModule-v%{version} %setup -q -n Test-MockModule-v%{version}
%build %build
%{__perl} Build.PL installdirs=vendor perl Build.PL installdirs=vendor
./Build ./Build
%install %install
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 ./Build install --destdir=%{buildroot} --create_packlist=0
chmod -R u+w $RPM_BUILD_ROOT/* %{_fixperms} -c %{buildroot}
%check %check
./Build test ./Build test
%files %files
%doc Changes README.md
%license LICENSE %license LICENSE
%{perl_vendorlib}/Test %doc Changes README.md
%{_mandir}/man3/*.3* %{perl_vendorlib}/Test/
%{_mandir}/man3/Test::MockModule.3*
%changelog %changelog
* Tue Oct 8 2019 Paul Howarth <paul@city-fan.org> - 0.170.0-5
- Spec tidy-up
- Use author-independent source URL
- Enhance %%description
- Fix permissions verbosely
- Make %%files list more explicit
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.170.0-4 * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.170.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

Loading…
Cancel
Save