Spec tidy-up

- Specify all build dependencies
- Drop redundant buildroot cleaning in %install section
- Don't need to remove empty directories from the buildroot
- Simplify find command using -delete
- Fix permissions verbosely
- Make %files list more explicit
- Use tabs consistently
epel9
Paul Howarth 5 years ago
parent c2fa913c9d
commit c21b06d505

@ -1,27 +1,32 @@
Name: perl-OLE-Storage_Lite Name: perl-OLE-Storage_Lite
Version: 0.19 Version: 0.19
Release: 26%{?dist} Release: 27%{?dist}
Summary: Simple Class for OLE document interface Summary: Simple Class for OLE document interface
License: GPL+ or Artistic License: GPL+ or Artistic
URL: https://metacpan.org/release/OLE-Storage_Lite
Source0: https://cpan.metacpan.org/authors/id/J/JM/JMCNAMARA/OLE-Storage_Lite-%{version}.tar.gz Source0: https://cpan.metacpan.org/authors/id/J/JM/JMCNAMARA/OLE-Storage_Lite-%{version}.tar.gz
Url: https://metacpan.org/release/OLE-Storage_Lite
BuildArch: noarch BuildArch: noarch
BuildRequires: perl-interpreter # Build:
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl-generators BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(ExtUtils::MakeMaker)
# Run-time: # Run-time:
BuildRequires: perl(Exporter) BuildRequires: perl(Exporter)
BuildRequires: perl(Fcntl) BuildRequires: perl(Fcntl)
BuildRequires: perl(IO::File) BuildRequires: perl(IO::File)
BuildRequires: perl(IO::Handle) BuildRequires: perl(IO::Handle)
# IO::Scalar not used at tests BuildRequires: perl(IO::Scalar)
BuildRequires: perl(POSIX) BuildRequires: perl(POSIX)
BuildRequires: perl(strict) BuildRequires: perl(strict)
BuildRequires: perl(Time::Local) BuildRequires: perl(Time::Local)
BuildRequires: perl(vars) BuildRequires: perl(vars)
# Tests: # Tests:
BuildRequires: perl(Test::More) BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) # Dependencies:
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(IO::Scalar) Requires: perl(IO::Scalar)
%description %description
@ -29,18 +34,18 @@ Simple Class for OLE document interface.
%prep %prep
%setup -q -n OLE-Storage_Lite-%{version} %setup -q -n OLE-Storage_Lite-%{version}
%{__perl} -pi -e 's/\r\n/\n/g' Changes README sample/{README,*.pl}
# Fix line endings
perl -pi -e 's/\r\n/\n/g' Changes README sample/{README,*.pl}
%build %build
%{__perl} Makefile.PL INSTALLDIRS=vendor perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT make pure_install DESTDIR=%{buildroot}
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find %{buildroot} -type f -name .packlist -delete
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' %{_fixperms} -c %{buildroot}
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
%check %check
make test make test
@ -48,9 +53,19 @@ make test
%files %files
%doc Changes README sample/ %doc Changes README sample/
%{perl_vendorlib}/OLE/ %{perl_vendorlib}/OLE/
%{_mandir}/man3/*.3* %{_mandir}/man3/OLE::Storage_Lite.3*
%changelog %changelog
* Mon Oct 7 2019 Paul Howarth <paul@city-fan.org> - 0.19-27
- Spec tidy-up
- Specify all build dependencies
- Drop redundant buildroot cleaning in %%install section
- Don't need to remove empty directories from the buildroot
- Simplify find command using -delete
- Fix permissions verbosely
- Make %%files list more explicit
- Use tabs consistently
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.19-26 * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.19-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

Loading…
Cancel
Save