Spec tidy-up

- Use author-independent source URL
- Specify all dependencies
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Simplify find command using -delete
- Don't need to remove empty directories from the buildroot
- Fix permissions verbosely
- Package CONTRIBUTING.mkdn and LICENSE files
- Make %files list more explicit
This commit is contained in:
Paul Howarth 2019-10-25 10:50:32 +01:00
parent fe6cf0426b
commit c5bf8852e7

View File

@ -7,28 +7,38 @@
Name: perl-IO-CaptureOutput
Version: 1.1104
Release: 14%{?dist}
Release: 15%{?dist}
Summary: Capture STDOUT/STDERR from sub-processes and XS/C modules
License: GPL+ or Artistic
URL: https://metacpan.org/release/IO-CaptureOutput
Source0: https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/IO-CaptureOutput-%{version}.tar.gz
Source0: https://cpan.metacpan.org/modules/by-module/IO/IO-CaptureOutput-%{version}.tar.gz
BuildArch: noarch
# Build:
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.17
# Run-time:
BuildRequires: perl(Carp)
BuildRequires: perl(Config)
BuildRequires: perl(Exporter)
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Temp) >= 0.16
BuildRequires: perl(strict)
BuildRequires: perl(Symbol)
BuildRequires: perl(vars)
BuildRequires: perl(warnings)
# Tests:
# BuildRequires: perl(File::Spec) >= 3.27
BuildRequires: perl(File::Spec) >= 3.27
BuildRequires: perl(IO::File)
BuildRequires: perl(Test::More) >= 0.62
# Optional test:
%if %{with perl_IO_CaptureOutput_enables_optional_test}
BuildRequires: perl(Inline::C)
#BuildRequires: perl(Inline::C)
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
# Dependencies:
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description
%{summary}.
@ -37,26 +47,35 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%setup -q -n IO-CaptureOutput-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
perl Makefile.PL INSTALLDIRS=vendor
make %{_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -delete
%{_fixperms} -c %{buildroot}
%check
make test
%files
%doc Changes README
%{perl_vendorlib}/IO
%{_mandir}/man3/*.3*
%license LICENSE
%doc Changes CONTRIBUTING.mkdn README
%{perl_vendorlib}/IO/
%{_mandir}/man3/IO::CaptureOutput.3*
%changelog
* Fri Oct 25 2019 Paul Howarth <paul@city-fan.org> - 1.1104-15
- Spec tidy-up
- Use author-independent source URL
- Specify all dependencies
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Simplify find command using -delete
- Don't need to remove empty directories from the buildroot
- Fix permissions verbosely
- Package CONTRIBUTING.mkdn and LICENSE files
- Make %%files list more explicit
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1104-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild