Spec clean-up

- Classify buildreqs by usage
- Make %files list more explicit
- Drop %defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Drop buildroot cleaning from %install section
- Drop legacy Group: tag
epel9
Paul Howarth 7 years ago
parent 7c48464e28
commit ee3902a3f7

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

@ -1,64 +1,75 @@
Name: perl-Class-Trigger
Version: 0.14
Release: 24%{?dist}
Release: 25%{?dist}
Summary: Mixin to add / call inheritable triggers
Group: Development/Libraries
License: GPL+ or Artistic
URL: https://metacpan.org/release/Class-Trigger
Source0: https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Class-Trigger-%{version}.tar.gz
Source0: https://cpan.metacpan.org/modules/by-module/Class/Class-Trigger-%{version}.tar.gz
BuildArch: noarch
# Build
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl-interpreter
BuildRequires: perl-generators
BuildRequires: perl(base)
BuildRequires: perl(Carp)
BuildRequires: perl-interpreter
BuildRequires: perl(inc::Module::Install)
BuildRequires: perl(Module::Install::Include)
BuildRequires: perl(Module::Install::Metadata)
BuildRequires: perl(Module::Install::TestBase)
BuildRequires: perl(Module::Install::WriteAll)
BuildRequires: sed
# Runtime
BuildRequires: perl(Carp)
BuildRequires: perl(strict)
BuildRequires: perl(vars)
# Test Suite
BuildRequires: perl(base)
BuildRequires: perl(IO::Scalar)
BuildRequires: perl(IO::WrapTie)
BuildRequires: perl(lib)
BuildRequires: perl(strict)
BuildRequires: perl(Test::More)
BuildRequires: perl(vars)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
# Dependencies
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description
%{summary}.
%prep
%setup -q -n Class-Trigger-%{version}
# Remove bundled libraries
rm -r inc
sed -i -e '/^inc\// d' MANIFEST
%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
%defattr(-,root,root,-)
%doc Changes README
%{perl_vendorlib}/Class
%{_mandir}/man3/*.3*
%{perl_vendorlib}/Class/
%{_mandir}/man3/Class::Trigger.3*
%changelog
* Wed Jul 4 2018 Paul Howarth <paul@city-fan.org> - 0.14-25
- Spec clean-up
- Classify buildreqs by usage
- Make %%files list more explicit
- Drop %%defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Drop buildroot cleaning from %%install section
- Drop legacy Group: tag
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.14-24
- Perl 5.28 rebuild

Loading…
Cancel
Save