Introduce build-condition for optional tests, and spec clean-up
- Introduce build-condition for optional tests - Drop EL-5 support - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %install section - Drop explicit %clean section - Use %license where possible - Simplify find command using -delete - Classify buildreqs by usage
This commit is contained in:
parent
9d54f25e34
commit
c6c28f1091
2
.rpmlint
Normal file
2
.rpmlint
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from Config import *
|
||||||
|
addFilter("spelling-error %description -l en_US qw -> ");
|
||||||
@ -1,40 +1,54 @@
|
|||||||
Name: perl-IPC-System-Simple
|
# Run optional tests
|
||||||
|
%bcond_without perl_IPC_System_Simple_enables_optional_test
|
||||||
|
|
||||||
|
Name: perl-IPC-System-Simple
|
||||||
Version: 1.25
|
Version: 1.25
|
||||||
Release: 11%{?dist}
|
Release: 12%{?dist}
|
||||||
License: GPL+ or Artistic
|
License: GPL+ or Artistic
|
||||||
Group: Development/Libraries
|
Summary: Run commands simply, with detailed diagnostics
|
||||||
Summary: Run commands simply, with detailed diagnostics
|
|
||||||
URL: http://search.cpan.org/dist/IPC-System-Simple
|
URL: http://search.cpan.org/dist/IPC-System-Simple
|
||||||
Source0: http://search.cpan.org/CPAN/authors/id/P/PJ/PJF/IPC-System-Simple-%{version}.tar.gz
|
Source0: http://search.cpan.org/CPAN/authors/id/P/PJ/PJF/IPC-System-Simple-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -un)
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
# Module Build
|
||||||
|
BuildRequires: coreutils
|
||||||
|
BuildRequires: findutils
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: perl
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
BuildRequires: perl(BSD::Resource)
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
|
||||||
|
# Module Runtime
|
||||||
BuildRequires: perl(Carp)
|
BuildRequires: perl(Carp)
|
||||||
BuildRequires: perl(Config)
|
BuildRequires: perl(Config)
|
||||||
BuildRequires: perl(constant)
|
BuildRequires: perl(constant)
|
||||||
BuildRequires: perl(Exporter)
|
BuildRequires: perl(Exporter)
|
||||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
|
|
||||||
BuildRequires: perl(File::Basename)
|
|
||||||
BuildRequires: perl(File::Spec)
|
|
||||||
BuildRequires: perl(List::Util)
|
BuildRequires: perl(List::Util)
|
||||||
BuildRequires: perl(Pod::Coverage::TrustPod)
|
|
||||||
BuildRequires: perl(POSIX)
|
BuildRequires: perl(POSIX)
|
||||||
BuildRequires: perl(re)
|
BuildRequires: perl(re)
|
||||||
BuildRequires: perl(Scalar::Util)
|
BuildRequires: perl(Scalar::Util)
|
||||||
BuildRequires: perl(strict)
|
BuildRequires: perl(strict)
|
||||||
|
BuildRequires: perl(warnings)
|
||||||
|
# Test Suite
|
||||||
|
BuildRequires: perl(File::Basename)
|
||||||
BuildRequires: perl(Test)
|
BuildRequires: perl(Test)
|
||||||
BuildRequires: perl(Test::More)
|
BuildRequires: perl(Test::More)
|
||||||
|
%if %{with perl_IPC_System_Simple_enables_optional_test}
|
||||||
|
# Optional Tests
|
||||||
|
BuildRequires: perl(BSD::Resource)
|
||||||
BuildRequires: perl(Test::NoWarnings)
|
BuildRequires: perl(Test::NoWarnings)
|
||||||
|
# Author Tests
|
||||||
%if !%{defined perl_bootstrap}
|
%if !%{defined perl_bootstrap}
|
||||||
# Break build-cycle: perl-IPC-System-Simple → perl-Test-Perl-Critic
|
# Break build-cycle: perl-IPC-System-Simple → perl-Test-Perl-Critic
|
||||||
# → perl-Perl-Critic → perl-PPI → perl-IO-All → perl-File-MimeInfo
|
# → perl-Perl-Critic → perl-PPI → perl-IO-All → perl-File-MimeInfo
|
||||||
# → perl-File-BaseDir → perl-IPC-System-Simple
|
# → perl-File-BaseDir → perl-IPC-System-Simple
|
||||||
|
BuildRequires: perl(English)
|
||||||
BuildRequires: perl(Test::Perl::Critic)
|
BuildRequires: perl(Test::Perl::Critic)
|
||||||
%endif
|
%endif
|
||||||
|
# Release Tests (wants Test::Pod 1.41 but EL-6 doesn't have it)
|
||||||
|
BuildRequires: perl(Pod::Coverage::TrustPod)
|
||||||
BuildRequires: perl(Test::Pod)
|
BuildRequires: perl(Test::Pod)
|
||||||
BuildRequires: perl(Test::Pod::Coverage) >= 1.08
|
BuildRequires: perl(Test::Pod::Coverage) >= 1.08
|
||||||
BuildRequires: perl(warnings)
|
%endif
|
||||||
|
# Dependencies
|
||||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -43,7 +57,7 @@ was successful is _hard_. Let's face it, '$?' isn't the nicest variable
|
|||||||
in the world to play with, and even if you _do_ check it, producing a
|
in the world to play with, and even if you _do_ check it, producing a
|
||||||
well-formatted error string takes a lot of work. 'IPC::System::Simple'
|
well-formatted error string takes a lot of work. 'IPC::System::Simple'
|
||||||
takes the hard work out of calling external commands. In fact, if you
|
takes the hard work out of calling external commands. In fact, if you
|
||||||
want to be really lazy, you can just write:
|
want to be really lazy, you can just write:
|
||||||
|
|
||||||
use IPC::System::Simple qw(system);
|
use IPC::System::Simple qw(system);
|
||||||
|
|
||||||
@ -61,23 +75,39 @@ perl Makefile.PL INSTALLDIRS=vendor
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
make pure_install DESTDIR=%{buildroot}
|
make pure_install DESTDIR=%{buildroot}
|
||||||
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
find %{buildroot} -type f -name .packlist -delete
|
||||||
%{_fixperms} %{buildroot}
|
%{_fixperms} -c %{buildroot}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test TEST_AUTHOR=1 AUTHOR_TESTING=1 RELEASE_TESTING=1
|
make test \
|
||||||
|
%if %{with perl_IPC_System_Simple_enables_optional_test}
|
||||||
%clean
|
TEST_AUTHOR=1 \
|
||||||
rm -rf %{buildroot}
|
%{!?perl_bootstrap:AUTHOR_TESTING=1} \
|
||||||
|
RELEASE_TESTING=1
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc Changes LICENSE README examples/
|
%if 0%{?_licensedir:1}
|
||||||
|
%license LICENSE
|
||||||
|
%else
|
||||||
|
%doc LICENSE
|
||||||
|
%endif
|
||||||
|
%doc Changes README examples/
|
||||||
%{perl_vendorlib}/IPC/
|
%{perl_vendorlib}/IPC/
|
||||||
%{_mandir}/man3/IPC::System::Simple.3pm*
|
%{_mandir}/man3/IPC::System::Simple.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 10 2017 Paul Howarth <paul@city-fan.org> - 1.25-12
|
||||||
|
- Drop EL-5 support
|
||||||
|
- Drop BuildRoot: and Group: tags
|
||||||
|
- Drop explicit buildroot cleaning in %%install section
|
||||||
|
- Drop explicit %%clean section
|
||||||
|
- Introduce build-condition for optional tests
|
||||||
|
- Use %%license where possible
|
||||||
|
- Simplify find command using -delete
|
||||||
|
- Classify buildreqs by usage
|
||||||
|
|
||||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.25-11
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.25-11
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user