Spec tidy-up

- Use author-independent source URL
- Install into vendor directory
- Use %{make_build} and %{make_install}
- Drop redundant find commands in %install section
- Drop redundant explicit dependencies and filtering of them
- Avoid need to remove *.list files in %check
- Make %files list more explicit
epel9 imports/e9/perl-Test-DistManifest-1.014-15.el9
Paul Howarth 5 years ago
parent 9c0d5914a5
commit 5acf622f71

@ -1,14 +1,21 @@
# noarch, but to avoid debug* files interfering with manifest test:
%global debug_package %{nil}
Name: perl-Test-DistManifest
Version: 1.014
Release: 14%{?dist}
Release: 15%{?dist}
Summary: Author test that validates a package MANIFEST
License: GPL+ or Artistic
URL: https://metacpan.org/release/Test-DistManifest
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-DistManifest-%{version}.tar.gz
Source0: https://cpan.metacpan.org/modules/by-module/Test/Test-DistManifest-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl-interpreter
# Build:
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Run-time:
@ -23,14 +30,9 @@ BuildRequires: perl(Test::Builder)
BuildRequires: perl(if)
BuildRequires: perl(Test::Builder::Tester)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::NoWarnings) >= 0.084
# Test::Warnings not used
# Test::Warnings not used without $ENV{AUTHOR_TESTING}
# Dependencies:
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(Module::Manifest) >= 0.07
Requires: perl(Test::Builder)
# Filter underspecifed dependencies
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\((Module::Manifest|Test::Builder)\\)$
%description
This Perl module provides a simple method of testing that a MANIFEST matches
@ -40,27 +42,33 @@ the distribution.
%setup -q -n Test-DistManifest-%{version}
%build
PERL_MM_FALLBACK_SILENCE_WARNING=1 perl Makefile.PL INSTALLDIRS=perl OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
PERL_MM_FALLBACK_SILENCE_WARNING=1 perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
%{_fixperms} $RPM_BUILD_ROOT/*
%{make_install}
%{_fixperms} -c %{buildroot}
%check
# post-install rpmbuild scripts contaminates RPM_BUILD_ROOT (bug #672538).
rm *.list
make test
%files
%license LICENSE
%doc Changes CONTRIBUTING examples README
%{perl_privlib}/*
%{_mandir}/man3/*
%doc Changes CONTRIBUTING README examples/
%{perl_vendorlib}/Test/
%{_mandir}/man3/Test::DistManifest.3*
%changelog
* Thu Sep 26 2019 Paul Howarth <paul@city-fan.org> - 1.014-15
- Spec tidy-up
- Use author-independent source URL
- Install into vendor directory
- Use %%{make_build} and %%{make_install}
- Drop redundant find commands in %%install section
- Drop redundant explicit dependencies and filtering of them
- Avoid need to remove *.list files in %%check
- Make %%files list more explicit
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.014-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

Loading…
Cancel
Save