2240dc
# Run optional tests
2240dc
%if ! (0%{?rhel})
2240dc
%bcond_without perl_IPC_System_Simple_enables_optional_test
2240dc
%else
2240dc
%bcond_with perl_IPC_System_Simple_enables_optional_test
2240dc
%endif
2240dc
2240dc
Name:		perl-IPC-System-Simple
2240dc
Version:	1.25
2240dc
Release:	18%{?dist}
2240dc
License:	GPL+ or Artistic
2240dc
Summary:	Run commands simply, with detailed diagnostics
2240dc
URL:		http://search.cpan.org/dist/IPC-System-Simple
2240dc
Source0:	http://search.cpan.org/CPAN/authors/id/P/PJ/PJF/IPC-System-Simple-%{version}.tar.gz
2240dc
# Fix random test failures with Test-Simple 1.302065, proposed to upstream,
2240dc
# <https://github.com/pjf/ipc-system-simple/issues/21>
2240dc
Patch0:     IPC-System-Simple-1.25-Use-exucatable-name-as-a-source-of-taintedness.patch
2240dc
BuildArch:	noarch
2240dc
# Module Build
2240dc
BuildRequires:	coreutils
2240dc
BuildRequires:	findutils
2240dc
BuildRequires:	make
2240dc
BuildRequires:	perl-interpreter
2240dc
BuildRequires:	perl-generators
2240dc
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.30
2240dc
# Module Runtime
2240dc
BuildRequires:	perl(Carp)
2240dc
BuildRequires:	perl(Config)
2240dc
BuildRequires:	perl(constant)
2240dc
BuildRequires:	perl(Exporter)
2240dc
BuildRequires:	perl(List::Util)
2240dc
BuildRequires:	perl(POSIX)
2240dc
BuildRequires:	perl(re)
2240dc
BuildRequires:	perl(Scalar::Util)
2240dc
BuildRequires:	perl(strict)
2240dc
BuildRequires:	perl(warnings)
2240dc
# Test Suite
2240dc
BuildRequires:	perl(File::Basename)
2240dc
BuildRequires:	perl(Test)
2240dc
BuildRequires:	perl(Test::More)
2240dc
%if %{with perl_IPC_System_Simple_enables_optional_test}
2240dc
# Optional Tests
2240dc
BuildRequires:	perl(BSD::Resource)
2240dc
BuildRequires:	perl(Test::NoWarnings)
2240dc
# Author Tests
2240dc
%if !%{defined perl_bootstrap}
2240dc
# Break build-cycle: perl-IPC-System-Simple → perl-Test-Perl-Critic
2240dc
# → perl-Perl-Critic → perl-PPI → perl-IO-All → perl-File-MimeInfo
2240dc
# → perl-File-BaseDir → perl-IPC-System-Simple
2240dc
BuildRequires:	perl(English)
2240dc
BuildRequires:	perl(Test::Perl::Critic)
2240dc
%endif
2240dc
# Release Tests (wants Test::Pod 1.41 but EL-6 doesn't have it)
2240dc
BuildRequires:	perl(Pod::Coverage::TrustPod)
2240dc
BuildRequires:	perl(Test::Pod)
2240dc
BuildRequires:	perl(Test::Pod::Coverage) >= 1.08
2240dc
%endif
2240dc
# Dependencies
2240dc
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
2240dc
2240dc
%description
2240dc
Calling Perl's in-built 'system()' function is easy; determining if it
2240dc
was successful is _hard_. Let's face it, '$?' isn't the nicest variable
2240dc
in the world to play with, and even if you _do_ check it, producing a
2240dc
well-formatted error string takes a lot of work. 'IPC::System::Simple'
2240dc
takes the hard work out of calling external commands. In fact, if you
2240dc
want to be really lazy, you can just write:
2240dc
2240dc
    use IPC::System::Simple qw(system);
2240dc
2240dc
and all of your "system" commands will either succeed (run to completion and
2240dc
return a zero exit value), or die with rich diagnostic messages.
2240dc
2240dc
%prep
2240dc
%setup -q -n IPC-System-Simple-%{version}
2240dc
%patch0 -p1
2240dc
2240dc
# Avoid doc-file dependencies
2240dc
chmod -c -x examples/*.pl
2240dc
2240dc
%build
2240dc
perl Makefile.PL INSTALLDIRS=vendor
2240dc
make %{?_smp_mflags}
2240dc
2240dc
%install
2240dc
make pure_install DESTDIR=%{buildroot}
2240dc
find %{buildroot} -type f -name .packlist -delete
2240dc
%{_fixperms} -c %{buildroot}
2240dc
2240dc
%check
2240dc
make test \
2240dc
%if %{with perl_IPC_System_Simple_enables_optional_test}
2240dc
	TEST_AUTHOR=1 \
2240dc
	%{!?perl_bootstrap:AUTHOR_TESTING=1} \
2240dc
	RELEASE_TESTING=1
2240dc
%endif
2240dc
2240dc
%files
2240dc
%if 0%{?_licensedir:1}
2240dc
%license LICENSE
2240dc
%else
2240dc
%doc LICENSE
2240dc
%endif
2240dc
%doc Changes README examples/
2240dc
%{perl_vendorlib}/IPC/
2240dc
%{_mandir}/man3/IPC::System::Simple.3*
2240dc
2240dc
%changelog
2240dc
* Fri Mar 29 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.25-18
2240dc
- Rebuild with enable hardening (bug #1636329)
2240dc
2240dc
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.25-17
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2240dc
2240dc
* Wed Aug 02 2017 Petr Pisar <ppisar@redhat.com> - 1.25-16
2240dc
- Fix random test failures with Test-Simple 1.302065
2240dc
2240dc
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.25-15
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2240dc
2240dc
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.25-14
2240dc
- Perl 5.26 re-rebuild of bootstrapped packages
2240dc
2240dc
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.25-13
2240dc
- Perl 5.26 rebuild
2240dc
2240dc
* Mon Apr 10 2017 Paul Howarth <paul@city-fan.org> - 1.25-12
2240dc
- Drop EL-5 support
2240dc
  - Drop BuildRoot: and Group: tags
2240dc
  - Drop explicit buildroot cleaning in %%install section
2240dc
  - Drop explicit %%clean section
2240dc
- Introduce build-condition for optional tests
2240dc
- Use %%license where possible
2240dc
- Simplify find command using -delete
2240dc
- Classify buildreqs by usage
2240dc
2240dc
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.25-11
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2240dc
2240dc
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.25-10
2240dc
- Perl 5.24 re-rebuild of bootstrapped packages
2240dc
2240dc
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.25-9
2240dc
- Perl 5.24 rebuild
2240dc
2240dc
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.25-8
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2240dc
2240dc
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-7
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2240dc
2240dc
* Wed Jun 10 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.25-6
2240dc
- Perl 5.22 re-rebuild of bootstrapped packages
2240dc
2240dc
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.25-5
2240dc
- Perl 5.22 rebuild
2240dc
2240dc
* Tue Apr 21 2015 Petr Pisar <ppisar@redhat.com> - 1.25-4
2240dc
- Break build-cycle: perl-IPC-System-Simple → perl-Test-Perl-Critic
2240dc
  → perl-Perl-Critic → perl-PPI → perl-IO-All → perl-File-MimeInfo
2240dc
  → perl-File-BaseDir → perl-IPC-System-Simple
2240dc
2240dc
2240dc
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.25-3
2240dc
- Perl 5.20 rebuild
2240dc
2240dc
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-2
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2240dc
2240dc
* Sun Oct 20 2013 Paul Howarth <paul@city-fan.org> - 1.25-1
2240dc
- Update to 1.25
2240dc
  - No longer ship unrequired file Debian_CPANTS.txt (GH #7)
2240dc
2240dc
* Fri Oct 18 2013 Paul Howarth <paul@city-fan.org> - 1.24-1
2240dc
- Update to 1.24
2240dc
  - No longer mark BSD::Resource as required (GH #6)
2240dc
  - Skip core-dump tests on OS X; they're not as straightforward as the test
2240dc
    script would like (GH #5)
2240dc
2240dc
* Wed Oct  9 2013 Paul Howarth <paul@city-fan.org> - 1.23-1
2240dc
- Update to 1.23
2240dc
  - Silence "Statement unlikely to be reached" warning
2240dc
  - Repository information fix, and typo fixes
2240dc
  - Converted to using dzil
2240dc
- Specify all dependencies
2240dc
- Don't need to remove empty directories from the buildroot
2240dc
- Restore EL-5 compatibility
2240dc
2240dc
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.21-8
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2240dc
2240dc
* Wed Jul 31 2013 Petr Pisar <ppisar@redhat.com> - 1.21-7
2240dc
- Perl 5.18 rebuild
2240dc
2240dc
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.21-6
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2240dc
2240dc
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.21-5
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2240dc
2240dc
* Sat Jun 23 2012 Petr Pisar <ppisar@redhat.com> - 1.21-4
2240dc
- Perl 5.16 rebuild
2240dc
2240dc
* Thu Jan 12 2012 Paul Howarth <paul@city-fan.org> - 1.21-3
2240dc
- Run author tests too for completeness
2240dc
- Add buildreqs needed for author tests
2240dc
- Add buildreqs for core perl modules, which may be dual-lived
2240dc
- Use DESTDIR rather than PERL_INSTALL_ROOT
2240dc
- Make %%files list more explicit
2240dc
2240dc
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1.21-2
2240dc
- Perl mass rebuild
2240dc
2240dc
* Fri Mar 18 2011 Iain Arnell <iarnell@gmail.com> - 1.21-1
2240dc
- Update to latest upstream version
2240dc
- Clean up spec for modern rpmbuild
2240dc
2240dc
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.18-6
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2240dc
2240dc
* Mon Dec 20 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.18-5
2240dc
- Rebuild to fix problems with vendorarch/lib (#661697)
2240dc
2240dc
* Sun May 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.18-4
2240dc
- Mass rebuild with perl-5.12.0
2240dc
2240dc
* Mon Dec 07 2009 Stepan Kasal <skasal@redhat.com> - 1.18-3
2240dc
- Rebuild against perl 5.10.1
2240dc
2240dc
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.18-2
2240dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2240dc
2240dc
* Thu Mar 05 2009 Chris Weyl <cweyl@alumni.drew.edu> - 1.18-1
2240dc
- Submission
2240dc
2240dc
* Thu Mar 05 2009 Chris Weyl <cweyl@alumni.drew.edu> - 1.18-0
2240dc
- Initial RPM packaging
2240dc
- Generated with cpan2dist (CPANPLUS::Dist::RPM version 0.0.8)
2240dc