c8f1dd
# We need to patch the test suite if we have an old version of Test::More
c8f1dd
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
c8f1dd
# Run extra test
c8f1dd
%if 0%{?fedora}
c8f1dd
%bcond_without perl_Dist_CheckConflicts_enables_extra_test
c8f1dd
%else
c8f1dd
%bcond_with perl_Dist_CheckConflicts_enables_extra_test
c8f1dd
%endif
c8f1dd
c8f1dd
Name:		perl-Dist-CheckConflicts
c8f1dd
Version:	0.11
c8f1dd
Release:	11%{?dist}
c8f1dd
Summary:	Declare version conflicts for your dist
c8f1dd
Group:		Development/Libraries
c8f1dd
License:	GPL+ or Artistic
c8f1dd
URL:		http://search.cpan.org/dist/Dist-CheckConflicts/
c8f1dd
Source0:	http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Dist-CheckConflicts-%{version}.tar.gz
c8f1dd
Patch0:		Dist-CheckConflicts-0.11-old-Test::More.patch
c8f1dd
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
c8f1dd
BuildArch:	noarch
c8f1dd
# Module Build
c8f1dd
BuildRequires:	perl-generators
c8f1dd
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.30
c8f1dd
# Module
c8f1dd
BuildRequires:	perl(base)
c8f1dd
BuildRequires:	perl(Carp)
c8f1dd
BuildRequires:	perl(Exporter)
c8f1dd
BuildRequires:	perl(Module::Runtime) >= 0.009
c8f1dd
BuildRequires:	perl(strict)
c8f1dd
BuildRequires:	perl(warnings)
c8f1dd
# Test Suite
c8f1dd
BuildRequires:	perl(File::Spec)
c8f1dd
BuildRequires:	perl(IO::Handle)
c8f1dd
BuildRequires:	perl(IPC::Open3)
c8f1dd
BuildRequires:	perl(lib)
c8f1dd
BuildRequires:	perl(Test::Fatal)
c8f1dd
BuildRequires:	perl(Test::More) >= 0.47
c8f1dd
# Extra Tests
c8f1dd
%if %{with perl_Dist_CheckConflicts_enables_extra_test}
c8f1dd
BuildRequires:	perl(Pod::Coverage::TrustPod)
c8f1dd
BuildRequires:	perl(Test::EOL)
c8f1dd
BuildRequires:	perl(Test::NoTabs)
c8f1dd
BuildRequires:	perl(Test::Pod) >= 1.41
c8f1dd
BuildRequires:	perl(Test::Pod::Coverage) >= 1.08
c8f1dd
%endif
c8f1dd
# Runtime
c8f1dd
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
c8f1dd
c8f1dd
%description
c8f1dd
One shortcoming of the CPAN clients that currently exist is that they have no
c8f1dd
way of specifying conflicting downstream dependencies of modules. This module
c8f1dd
attempts to work around this issue by allowing you to specify conflicting
c8f1dd
versions of modules separately, and deal with them after the module is done
c8f1dd
installing.
c8f1dd
c8f1dd
For instance, say you have a module Foo, and some other module Bar uses Foo. If
c8f1dd
Foo were to change its API in a non-backwards-compatible way, this would cause
c8f1dd
Bar to break until it is updated to use the new API. Foo can't just depend on
c8f1dd
the fixed version of Bar, because this will cause a circular dependency
c8f1dd
(because Bar is already depending on Foo), and this doesn't express intent
c8f1dd
properly anyway - Foo doesn't use Bar at all. The ideal solution would be for
c8f1dd
there to be a way to specify conflicting versions of modules in a way that would
c8f1dd
let CPAN clients update conflicting modules automatically after an existing
c8f1dd
module is upgraded, but until that happens, this module will allow users to do
c8f1dd
this manually.
c8f1dd
c8f1dd
%prep
c8f1dd
%setup -q -n Dist-CheckConflicts-%{version}
c8f1dd
c8f1dd
# Test suite needs patching if we have Test::More < 0.88
c8f1dd
%if %{old_test_more}
c8f1dd
%patch0
c8f1dd
%endif
c8f1dd
c8f1dd
%build
c8f1dd
perl Makefile.PL INSTALLDIRS=vendor
c8f1dd
make %{?_smp_mflags}
c8f1dd
c8f1dd
%install
c8f1dd
rm -rf %{buildroot}
c8f1dd
make pure_install DESTDIR=%{buildroot}
c8f1dd
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
c8f1dd
%{_fixperms} %{buildroot}
c8f1dd
c8f1dd
%check
c8f1dd
make test
c8f1dd
%if %{with perl_Dist_CheckConflicts_enables_extra_test}
c8f1dd
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
c8f1dd
%endif
c8f1dd
c8f1dd
%clean
c8f1dd
rm -rf %{buildroot}
c8f1dd
c8f1dd
%files
c8f1dd
%doc Changes LICENSE README
c8f1dd
%{perl_vendorlib}/Dist/
c8f1dd
%{_mandir}/man3/Dist::CheckConflicts.3pm*
c8f1dd
c8f1dd
%changelog
c8f1dd
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-11
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c8f1dd
c8f1dd
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-10
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c8f1dd
c8f1dd
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-9
c8f1dd
- Perl 5.26 rebuild
c8f1dd
c8f1dd
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-8
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c8f1dd
c8f1dd
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-7
c8f1dd
- Perl 5.24 rebuild
c8f1dd
c8f1dd
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-6
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c8f1dd
c8f1dd
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-5
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c8f1dd
c8f1dd
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-4
c8f1dd
- Perl 5.22 rebuild
c8f1dd
c8f1dd
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-3
c8f1dd
- Perl 5.20 rebuild
c8f1dd
c8f1dd
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c8f1dd
c8f1dd
* Thu Apr  3 2014 Paul Howarth <paul@city-fan.org> - 0.11-1
c8f1dd
- Update to 0.11
c8f1dd
  - Drop the dep on List::MoreUtils
c8f1dd
    (https://github.com/doy/dist-checkconflicts/pull/8)
c8f1dd
- Update patch for building with Test::More < 0.88
c8f1dd
- Don't try to run the extra tests for EPEL builds
c8f1dd
- Specify version requirements for extra test modules
c8f1dd
c8f1dd
* Wed Dec 18 2013 Paul Howarth <paul@city-fan.org> - 0.10-1
c8f1dd
- Update to 0.10
c8f1dd
  - We need Module::Runtime 0.009 for module_notional_filename (#6)
c8f1dd
- Update patch for building with Test::More < 0.88
c8f1dd
- Drop %%defattr, redundant since rpm 4.4
c8f1dd
c8f1dd
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.09-3
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c8f1dd
c8f1dd
* Fri Jul 26 2013 Petr Pisar <ppisar@redhat.com> - 0.09-2
c8f1dd
- Perl 5.18 rebuild
c8f1dd
c8f1dd
* Mon Jul 22 2013 Paul Howarth <paul@city-fan.org> - 0.09-1
c8f1dd
- Update to 0.09
c8f1dd
  - Support Perl 5.6.x
c8f1dd
c8f1dd
* Wed Jul 10 2013 Paul Howarth <paul@city-fan.org> - 0.08-1
c8f1dd
- Update to 0.08
c8f1dd
  - Instead of silently ignoring conflicts that do not compile, issue a
c8f1dd
    conflict warning (CPAN RT#75486)
c8f1dd
- BR: perl(Module::Runtime)
c8f1dd
- Classify buildreqs by usage
c8f1dd
- Explicitly run the extra tests
c8f1dd
c8f1dd
* Sat Jun 22 2013 Paul Howarth <paul@city-fan.org> - 0.06-1
c8f1dd
- Update to 0.06
c8f1dd
  - Add optional runtime conflict warnings
c8f1dd
  - Require 5.8.1, clean up a few things and add a few more tests
c8f1dd
  - Use Exporter instead of Sub::Exporter
c8f1dd
- Update patch for building with Test::More < 0.88
c8f1dd
- Drop patch for building with old ExtUtils::MakeMaker, no longer needed
c8f1dd
- Don't need to remove empty directories from the buildroot
c8f1dd
c8f1dd
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.02-8
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c8f1dd
c8f1dd
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.02-7
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c8f1dd
c8f1dd
* Tue Jun 19 2012 Petr Pisar <ppisar@redhat.com> - 0.02-6
c8f1dd
- Perl 5.16 rebuild
c8f1dd
c8f1dd
* Wed Jan 11 2012 Paul Howarth <paul@city-fan.org> - 0.02-5
c8f1dd
- Pod::Coverage::TrustPod now available in all supported releases
c8f1dd
- BR: perl(Carp)
c8f1dd
c8f1dd
* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 0.02-4
c8f1dd
- Perl mass rebuild
c8f1dd
c8f1dd
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.02-3
c8f1dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c8f1dd
c8f1dd
* Wed Jan  5 2011 Paul Howarth <paul@city-fan.org> - 0.02-2
c8f1dd
- Sanitize for Fedora submission
c8f1dd
c8f1dd
* Tue Jan  4 2011 Paul Howarth <paul@city-fan.org> - 0.02-1
c8f1dd
- Initial RPM version