Spec clean-up

- Drop %defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
- Don't delete the extra tests when bootstrapping, but don't run them either
This commit is contained in:
Paul Howarth 2012-08-28 13:37:19 +01:00
parent 3b1bb7f092
commit 4a545199ab
1 changed files with 12 additions and 9 deletions

View File

@ -1,12 +1,12 @@
# We don't really need ExtUtils::MakeMaker ≥ 6.31
%global old_eumm %(perl -MExtUtils::MakeMaker -e 'printf "%d\\n", $ExtUtils::MakeMaker::VERSION < 6.31 ? 1 : 0;' 2>/dev/null || echo 0)
%global old_eumm %(perl -MExtUtils::MakeMaker -e 'print (($ExtUtils::MakeMaker::VERSION < 6.31) ? 1 : 0);' 2>/dev/null || echo 0)
# Test suite needs patching if we have Test::More < 0.88
%global old_test_more %(perl -MTest::More -e 'printf "%d\\n", $Test::More::VERSION < 0.88 ? 1 : 0;' 2>/dev/null || echo 0)
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
Name: perl-Perl-OSType
Version: 1.002
Release: 240%{?dist}
Release: 241%{?dist}
Summary: Map Perl operating system names to generic types
License: GPL+ or Artistic
Group: Development/Libraries
@ -21,7 +21,7 @@ BuildRequires: perl(Exporter)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Test::More)
# Optional tests
# Optional tests, not run for this dual-lived module when bootstrapping
%if !%{defined perl_bootstrap}
BuildRequires: perl(Pod::Coverage::TrustPod)
BuildRequires: perl(Test::CPAN::Meta)
@ -62,25 +62,28 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
%{_fixperms} %{buildroot}
%check
%if %{defined perl_bootstrap}
rm -rf xt
make test
%if !%{defined perl_bootstrap}
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
%endif
make test TEST_FILES="t/*.t xt/*/*.t"
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc Changes LICENSE README
%{perl_vendorlib}/Perl/
%{_mandir}/man3/Perl::OSType.3pm*
%changelog
* Tue Aug 28 2012 Paul Howarth <paul@city-fan.org> - 1.002-241
- Drop %%defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
- Don't delete the extra tests when bootstrapping, but don't run them either
* Fri Aug 17 2012 Petr Pisar <ppisar@redhat.com> - 1.002-240
- Increase release to replace perl sub-package (bug #848961)